diff --git a/java-dataproc-metastore/README.md b/java-dataproc-metastore/README.md index e65653a91b7f..ef8ea97918e3 100644 --- a/java-dataproc-metastore/README.md +++ b/java-dataproc-metastore/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.16.0 + 26.18.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dataproc-metastore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc-metastore/2.20.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataproc-metastore/2.21.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles 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 index eea98c4c58b4..37f81003643e 100644 --- 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 @@ -2535,6 +2535,297 @@ public final UnaryCallable deleteBackupCallable( return stub.deleteBackupCallable(); } + // 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. 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 index e37a564b0e83..74cc0eb4ca33 100644 --- 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 @@ -225,6 +225,47 @@ public UnaryCallSettings deleteBackupSettings() return ((DataprocMetastoreStubSettings) getStubSettings()).deleteBackupOperationSettings(); } + /** 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() { @@ -509,6 +550,46 @@ public UnaryCallSettings.Builder deleteBackupSet return getStubSettingsBuilder().deleteBackupOperationSettings(); } + /** 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> 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 index 232670c2f065..8dccef0ca847 100644 --- 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 @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "DataprocMetastoreClient", "rpcs": { + "AlterMetadataResourceLocation": { + "methods": ["alterMetadataResourceLocationAsync", "alterMetadataResourceLocationOperationCallable", "alterMetadataResourceLocationCallable"] + }, "CreateBackup": { "methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"] }, @@ -55,6 +58,12 @@ "ListServices": { "methods": ["listServices", "listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] }, + "MoveTableToDatabase": { + "methods": ["moveTableToDatabaseAsync", "moveTableToDatabaseOperationCallable", "moveTableToDatabaseCallable"] + }, + "QueryMetadata": { + "methods": ["queryMetadataAsync", "queryMetadataOperationCallable", "queryMetadataCallable"] + }, "RestoreService": { "methods": ["restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceAsync", "restoreServiceOperationCallable", "restoreServiceCallable"] }, 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 index 2da9dc59aa33..20d2735c86c3 100644 --- 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 @@ -28,6 +28,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse; import com.google.cloud.metastore.v1.Backup; import com.google.cloud.metastore.v1.CreateBackupRequest; import com.google.cloud.metastore.v1.CreateMetadataImportRequest; @@ -46,7 +48,11 @@ 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.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.MoveTableToDatabaseResponse; import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.QueryMetadataResponse; import com.google.cloud.metastore.v1.Restore; import com.google.cloud.metastore.v1.RestoreServiceRequest; import com.google.cloud.metastore.v1.Service; @@ -200,6 +206,41 @@ public UnaryCallable deleteBackupCallable() { throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); } + 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()"); 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 index f25e309f8364..4a61203c9a4d 100644 --- 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 @@ -54,6 +54,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse; import com.google.cloud.metastore.v1.Backup; import com.google.cloud.metastore.v1.CreateBackupRequest; import com.google.cloud.metastore.v1.CreateMetadataImportRequest; @@ -72,7 +74,11 @@ 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.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.MoveTableToDatabaseResponse; import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.QueryMetadataResponse; import com.google.cloud.metastore.v1.Restore; import com.google.cloud.metastore.v1.RestoreServiceRequest; import com.google.cloud.metastore.v1.Service; @@ -181,6 +187,22 @@ public class DataprocMetastoreStubSettings extends StubSettings deleteBackupSettings; private final OperationCallSettings deleteBackupOperationSettings; + 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; @@ -543,6 +565,44 @@ public UnaryCallSettings deleteBackupSettings() return deleteBackupOperationSettings; } + /** 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() { @@ -702,6 +762,15 @@ protected DataprocMetastoreStubSettings(Builder settingsBuilder) throws IOExcept createBackupOperationSettings = settingsBuilder.createBackupOperationSettings().build(); deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().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(); @@ -761,6 +830,22 @@ public static class Builder extends StubSettings.Builder deleteBackupSettings; private final OperationCallSettings.Builder deleteBackupOperationSettings; + 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; @@ -842,6 +927,12 @@ protected Builder(ClientContext clientContext) { createBackupOperationSettings = OperationCallSettings.newBuilder(); deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteBackupOperationSettings = OperationCallSettings.newBuilder(); + 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(); @@ -865,6 +956,9 @@ protected Builder(ClientContext clientContext) { getBackupSettings, createBackupSettings, deleteBackupSettings, + queryMetadataSettings, + moveTableToDatabaseSettings, + alterMetadataResourceLocationSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -902,6 +996,15 @@ protected Builder(DataprocMetastoreStubSettings settings) { createBackupOperationSettings = settings.createBackupOperationSettings.toBuilder(); deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); deleteBackupOperationSettings = settings.deleteBackupOperationSettings.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(); @@ -925,6 +1028,9 @@ protected Builder(DataprocMetastoreStubSettings settings) { getBackupSettings, createBackupSettings, deleteBackupSettings, + queryMetadataSettings, + moveTableToDatabaseSettings, + alterMetadataResourceLocationSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -1034,6 +1140,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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")) @@ -1275,6 +1396,81 @@ private static Builder initDefaults(Builder builder) { .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; } @@ -1453,6 +1649,52 @@ public UnaryCallSettings.Builder deleteBackupSet return deleteBackupOperationSettings; } + /** 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> 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 index f4599902f149..9303fd7c5051 100644 --- 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 @@ -33,6 +33,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse; import com.google.cloud.metastore.v1.Backup; import com.google.cloud.metastore.v1.CreateBackupRequest; import com.google.cloud.metastore.v1.CreateMetadataImportRequest; @@ -51,7 +53,11 @@ 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.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.MoveTableToDatabaseResponse; import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.QueryMetadataResponse; import com.google.cloud.metastore.v1.Restore; import com.google.cloud.metastore.v1.RestoreServiceRequest; import com.google.cloud.metastore.v1.Service; @@ -224,6 +230,37 @@ public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + queryMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.metastore.v1.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.v1.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.v1.DataprocMetastore/AlterMetadataResourceLocation") + .setRequestMarshaller( + ProtoUtils.marshaller(AlterMetadataResourceLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -310,6 +347,20 @@ public class GrpcDataprocMetastoreStub extends DataprocMetastoreStub { private final UnaryCallable deleteBackupCallable; private final OperationCallable deleteBackupOperationCallable; + 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; @@ -516,6 +567,37 @@ protected GrpcDataprocMetastoreStub( return builder.build(); }) .build(); + GrpcCallSettings queryMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(queryMetadataMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service", String.valueOf(request.getService())); + return builder.build(); + }) + .build(); + GrpcCallSettings moveTableToDatabaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service", String.valueOf(request.getService())); + return builder.build(); + }) + .build(); + GrpcCallSettings + alterMetadataResourceLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service", String.valueOf(request.getService())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -686,6 +768,37 @@ protected GrpcDataprocMetastoreStub( settings.deleteBackupOperationSettings(), clientContext, operationsStub); + 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); @@ -861,6 +974,44 @@ public UnaryCallable deleteBackupCallable() { return deleteBackupOperationCallable; } + @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; 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 index fd3a2bbe68a3..e345f51189d2 100644 --- 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 @@ -42,6 +42,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse; import com.google.cloud.metastore.v1.Backup; import com.google.cloud.metastore.v1.CreateBackupRequest; import com.google.cloud.metastore.v1.CreateMetadataImportRequest; @@ -60,7 +62,11 @@ 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.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.MoveTableToDatabaseResponse; import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.QueryMetadataResponse; import com.google.cloud.metastore.v1.Restore; import com.google.cloud.metastore.v1.RestoreServiceRequest; import com.google.cloud.metastore.v1.Service; @@ -95,8 +101,11 @@ public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(Empty.getDescriptor()) + .add(MoveTableToDatabaseResponse.getDescriptor()) .add(MetadataImport.getDescriptor()) + .add(QueryMetadataResponse.getDescriptor()) .add(OperationMetadata.getDescriptor()) + .add(AlterMetadataResourceLocationResponse.getDescriptor()) .add(Service.getDescriptor()) .add(MetadataExport.getDescriptor()) .add(Backup.getDescriptor()) @@ -688,6 +697,127 @@ public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + queryMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.metastore.v1.DataprocMetastore/QueryMetadata") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{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.v1.DataprocMetastore/MoveTableToDatabase") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{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.v1.DataprocMetastore/AlterMetadataResourceLocation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{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() @@ -912,6 +1042,20 @@ public class HttpJsonDataprocMetastoreStub extends DataprocMetastoreStub { private final UnaryCallable deleteBackupCallable; private final OperationCallable deleteBackupOperationCallable; + 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; @@ -1163,6 +1307,41 @@ protected HttpJsonDataprocMetastoreStub( return builder.build(); }) .build(); + HttpJsonCallSettings queryMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(queryMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service", String.valueOf(request.getService())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + moveTableToDatabaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(moveTableToDatabaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service", String.valueOf(request.getService())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + alterMetadataResourceLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(alterMetadataResourceLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("service", String.valueOf(request.getService())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1339,6 +1518,37 @@ protected HttpJsonDataprocMetastoreStub( settings.deleteBackupOperationSettings(), clientContext, httpJsonOperationsStub); + 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); @@ -1382,6 +1592,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(getBackupMethodDescriptor); methodDescriptors.add(createBackupMethodDescriptor); methodDescriptors.add(deleteBackupMethodDescriptor); + methodDescriptors.add(queryMetadataMethodDescriptor); + methodDescriptors.add(moveTableToDatabaseMethodDescriptor); + methodDescriptors.add(alterMetadataResourceLocationMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); @@ -1540,6 +1753,44 @@ public UnaryCallable deleteBackupCallable() { return deleteBackupOperationCallable; } + @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; 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 index 8e63ac3d98be..de0ec1e36b29 100644 --- 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 @@ -1727,6 +1727,179 @@ public void deleteBackupExceptionTest2() throws 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(); 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 index 8933081d37c7..ffcb76b5f535 100644 --- 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 @@ -1577,6 +1577,177 @@ public void deleteBackupExceptionTest2() throws 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(); diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java index 42b4ebdc1be3..2fcb2d08c8e8 100644 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java +++ b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/MockDataprocMetastoreImpl.java @@ -372,4 +372,67 @@ public void deleteBackup( Exception.class.getName()))); } } + + @Override + public void queryMetadata( + QueryMetadataRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 QueryMetadata, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void moveTableToDatabase( + MoveTableToDatabaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 MoveTableToDatabase, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void alterMetadataResourceLocation( + AlterMetadataResourceLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) 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 AlterMetadataResourceLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } 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 index c0c3981e2153..54ba282f80f5 100644 --- 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 @@ -722,6 +722,150 @@ private DataprocMetastoreGrpc() {} return getDeleteBackupMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.QueryMetadataRequest, com.google.longrunning.Operation> + getQueryMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryMetadata", + requestType = com.google.cloud.metastore.v1.QueryMetadataRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.QueryMetadataRequest, com.google.longrunning.Operation> + getQueryMetadataMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.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.v1.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.v1.MoveTableToDatabaseRequest, + com.google.longrunning.Operation> + getMoveTableToDatabaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "MoveTableToDatabase", + requestType = com.google.cloud.metastore.v1.MoveTableToDatabaseRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest, + com.google.longrunning.Operation> + getMoveTableToDatabaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.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.v1.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.v1.AlterMetadataResourceLocationRequest, + com.google.longrunning.Operation> + getAlterMetadataResourceLocationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AlterMetadataResourceLocation", + requestType = com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest, + com.google.longrunning.Operation> + getAlterMetadataResourceLocationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.metastore.v1.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.v1.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 = @@ -997,6 +1141,51 @@ default void deleteBackup( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteBackupMethod(), responseObserver); } + + /** + * + * + *
+     * Query DPMS metadata.
+     * 
+ */ + default void queryMetadata( + com.google.cloud.metastore.v1.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.v1.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.v1.AlterMetadataResourceLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAlterMetadataResourceLocationMethod(), responseObserver); + } } /** @@ -1300,6 +1489,57 @@ public void deleteBackup( request, responseObserver); } + + /** + * + * + *
+     * Query DPMS metadata.
+     * 
+ */ + public void queryMetadata( + com.google.cloud.metastore.v1.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.v1.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.v1.AlterMetadataResourceLocationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1530,6 +1770,48 @@ public com.google.longrunning.Operation deleteBackup( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteBackupMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Query DPMS metadata.
+     * 
+ */ + public com.google.longrunning.Operation queryMetadata( + com.google.cloud.metastore.v1.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.v1.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.v1.AlterMetadataResourceLocationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAlterMetadataResourceLocationMethod(), getCallOptions(), request); + } } /** @@ -1763,6 +2045,50 @@ protected DataprocMetastoreFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Query DPMS metadata.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + queryMetadata(com.google.cloud.metastore.v1.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.v1.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.v1.AlterMetadataResourceLocationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAlterMetadataResourceLocationMethod(), getCallOptions()), + request); + } } private static final int METHODID_LIST_SERVICES = 0; @@ -1780,6 +2106,9 @@ protected DataprocMetastoreFutureStub build( 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_QUERY_METADATA = 15; + private static final int METHODID_MOVE_TABLE_TO_DATABASE = 16; + private static final int METHODID_ALTER_METADATA_RESOURCE_LOCATION = 17; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1879,6 +2208,21 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.metastore.v1.DeleteBackupRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_QUERY_METADATA: + serviceImpl.queryMetadata( + (com.google.cloud.metastore.v1.QueryMetadataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MOVE_TABLE_TO_DATABASE: + serviceImpl.moveTableToDatabase( + (com.google.cloud.metastore.v1.MoveTableToDatabaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ALTER_METADATA_RESOURCE_LOCATION: + serviceImpl.alterMetadataResourceLocation( + (com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1991,6 +2335,25 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.metastore.v1.DeleteBackupRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP))) + .addMethod( + getQueryMetadataMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.QueryMetadataRequest, + com.google.longrunning.Operation>(service, METHODID_QUERY_METADATA))) + .addMethod( + getMoveTableToDatabaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest, + com.google.longrunning.Operation>(service, METHODID_MOVE_TABLE_TO_DATABASE))) + .addMethod( + getAlterMetadataResourceLocationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest, + com.google.longrunning.Operation>( + service, METHODID_ALTER_METADATA_RESOURCE_LOCATION))) .build(); } @@ -2057,6 +2420,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetBackupMethod()) .addMethod(getCreateBackupMethod()) .addMethod(getDeleteBackupMethod()) + .addMethod(getQueryMetadataMethod()) + .addMethod(getMoveTableToDatabaseMethod()) + .addMethod(getAlterMetadataResourceLocationMethod()) .build(); } } diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationRequest.java new file mode 100644 index 000000000000..3fc66ae9e804 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationRequest.java @@ -0,0 +1,1081 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// 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.AlterMetadataResourceLocation][google.cloud.metastore.v1.DataprocMetastore.AlterMetadataResourceLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.AlterMetadataResourceLocationRequest} + */ +public final class AlterMetadataResourceLocationRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest.class, + com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest other = + (com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.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.v1.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.v1.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.v1.DataprocMetastore.AlterMetadataResourceLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.AlterMetadataResourceLocationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.AlterMetadataResourceLocationRequest) + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest.class, + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.metastore.v1.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.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest + getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest build() { + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest buildPartial() { + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest result = + new com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest) { + return mergeFrom( + (com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest other) { + if (other + == com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.AlterMetadataResourceLocationRequest) + private static final com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest(); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationRequestOrBuilder.java new file mode 100644 index 000000000000..87cc7ee478ab --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface AlterMetadataResourceLocationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.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-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationResponse.java new file mode 100644 index 000000000000..c0d6b9d0e4db --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationResponse.java @@ -0,0 +1,446 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// 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.AlterMetadataResourceLocation][google.cloud.metastore.v1.DataprocMetastore.AlterMetadataResourceLocation].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.AlterMetadataResourceLocationResponse} + */ +public final class AlterMetadataResourceLocationResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse.class, + com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse other = + (com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.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.v1.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.v1.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.v1.DataprocMetastore.AlterMetadataResourceLocation].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.AlterMetadataResourceLocationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.AlterMetadataResourceLocationResponse) + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse.class, + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse.Builder.class); + } + + // Construct using + // com.google.cloud.metastore.v1.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.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse + getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse build() { + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse buildPartial() { + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse result = + new com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse) { + return mergeFrom( + (com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse other) { + if (other + == com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.AlterMetadataResourceLocationResponse) + private static final com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse(); + } + + public static com.google.cloud.metastore.v1.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.v1.AlterMetadataResourceLocationResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationResponseOrBuilder.java new file mode 100644 index 000000000000..c695967499fd --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/AlterMetadataResourceLocationResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface AlterMetadataResourceLocationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.AlterMetadataResourceLocationResponse) + com.google.protobuf.MessageOrBuilder {} 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 index a92fa338822a..18895913ccc6 100644 --- 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 @@ -83,6 +83,16 @@ public enum MetastoreType implements com.google.protobuf.ProtocolMessageEnum { * METASTORE_TYPE_UNSPECIFIED = 0; */ METASTORE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The backend metastore is BigQuery.
+     * 
+ * + * BIGQUERY = 2; + */ + BIGQUERY(2), /** * * @@ -106,6 +116,16 @@ public enum MetastoreType implements com.google.protobuf.ProtocolMessageEnum { * 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; /** * * @@ -143,6 +163,8 @@ public static MetastoreType forNumber(int value) { switch (value) { case 0: return METASTORE_TYPE_UNSPECIFIED; + case 2: + return BIGQUERY; case 3: return DATAPROC_METASTORE; default: diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ErrorDetails.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ErrorDetails.java new file mode 100644 index 000000000000..36b8aa67ed7f --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ErrorDetails.java @@ -0,0 +1,807 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +/** + * + * + *
+ * Error details in public error message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ErrorDetails} + */ +public final class ErrorDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.ErrorDetails) + ErrorDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorDetails.newBuilder() to construct. + private ErrorDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorDetails() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_ErrorDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetDetails(); + 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_ErrorDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ErrorDetails.class, + com.google.cloud.metastore.v1.ErrorDetails.Builder.class); + } + + public static final int DETAILS_FIELD_NUMBER = 1; + + private static final class DetailsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_ErrorDetails_DetailsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField details_; + + private com.google.protobuf.MapField internalGetDetails() { + if (details_ == null) { + return com.google.protobuf.MapField.emptyMapField(DetailsDefaultEntryHolder.defaultEntry); + } + return details_; + } + + public int getDetailsCount() { + return internalGetDetails().getMap().size(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public boolean containsDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDetails().getMap().containsKey(key); + } + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDetails() { + return getDetailsMap(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.util.Map getDetailsMap() { + return internalGetDetails().getMap(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.lang.String getDetailsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().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, internalGetDetails(), DetailsDefaultEntryHolder.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 : + internalGetDetails().getMap().entrySet()) { + com.google.protobuf.MapEntry details__ = + DetailsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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.ErrorDetails)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.ErrorDetails other = + (com.google.cloud.metastore.v1.ErrorDetails) obj; + + if (!internalGetDetails().equals(other.internalGetDetails())) return false; + if (!getUnknownFields().equals(other.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 (!internalGetDetails().getMap().isEmpty()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + internalGetDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1.ErrorDetails parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.ErrorDetails parseFrom( + java.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.ErrorDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.ErrorDetails parseFrom( + com.google.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.ErrorDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.ErrorDetails 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.ErrorDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.ErrorDetails parseFrom( + java.io.InputStream input, 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.ErrorDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.ErrorDetails parseDelimitedFrom( + java.io.InputStream input, 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.ErrorDetails 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.ErrorDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @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.ErrorDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error details in public error message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.ErrorDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.ErrorDetails) + com.google.cloud.metastore.v1.ErrorDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_ErrorDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetDetails(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableDetails(); + 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_ErrorDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.ErrorDetails.class, + com.google.cloud.metastore.v1.ErrorDetails.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.ErrorDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableDetails().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_ErrorDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ErrorDetails getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.ErrorDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ErrorDetails build() { + com.google.cloud.metastore.v1.ErrorDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.ErrorDetails buildPartial() { + com.google.cloud.metastore.v1.ErrorDetails result = + new com.google.cloud.metastore.v1.ErrorDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.ErrorDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.details_ = internalGetDetails(); + result.details_.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.ErrorDetails) { + return mergeFrom((com.google.cloud.metastore.v1.ErrorDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.ErrorDetails other) { + if (other == com.google.cloud.metastore.v1.ErrorDetails.getDefaultInstance()) return this; + internalGetMutableDetails().mergeFrom(other.internalGetDetails()); + 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 details__ = + input.readMessage( + DetailsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDetails() + .getMutableMap() + .put(details__.getKey(), details__.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 details_; + + private com.google.protobuf.MapField internalGetDetails() { + if (details_ == null) { + return com.google.protobuf.MapField.emptyMapField(DetailsDefaultEntryHolder.defaultEntry); + } + return details_; + } + + private com.google.protobuf.MapField + internalGetMutableDetails() { + if (details_ == null) { + details_ = com.google.protobuf.MapField.newMapField(DetailsDefaultEntryHolder.defaultEntry); + } + if (!details_.isMutable()) { + details_ = details_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return details_; + } + + public int getDetailsCount() { + return internalGetDetails().getMap().size(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public boolean containsDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDetails().getMap().containsKey(key); + } + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDetails() { + return getDetailsMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.util.Map getDetailsMap() { + return internalGetDetails().getMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.lang.String getDetailsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDetails() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableDetails().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder removeDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableDetails().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableDetails() { + bitField0_ |= 0x00000001; + return internalGetMutableDetails().getMutableMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder putDetails(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableDetails().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder putAllDetails(java.util.Map values) { + internalGetMutableDetails().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.v1.ErrorDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.ErrorDetails) + private static final com.google.cloud.metastore.v1.ErrorDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.ErrorDetails(); + } + + public static com.google.cloud.metastore.v1.ErrorDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.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.ErrorDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ErrorDetailsOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ErrorDetailsOrBuilder.java new file mode 100644 index 000000000000..afe7e281d365 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/ErrorDetailsOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface ErrorDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.ErrorDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + int getDetailsCount(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + boolean containsDetails(java.lang.String key); + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getDetails(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + java.util.Map getDetailsMap(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + /* nullable */ + java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + java.lang.String getDetailsOrThrow(java.lang.String key); +} 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 index 3461bf48987f..19268e1189d3 100644 --- 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 @@ -40,6 +40,7 @@ private HiveMetastoreConfig(com.google.protobuf.GeneratedMessageV3.Builder bu private HiveMetastoreConfig() { version_ = ""; + endpointProtocol_ = 0; } @java.lang.Override @@ -76,6 +77,167 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.metastore.v1.HiveMetastoreConfig.Builder.class); } + /** + * + * + *
+   * Protocols available for serving the metastore service endpoint.
+   * 
+ * + * Protobuf enum {@code google.cloud.metastore.v1.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.v1.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.v1.HiveMetastoreConfig.EndpointProtocol) + } + public static final int VERSION_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -309,6 +471,48 @@ public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOr : 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.v1.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.v1.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * + * + * @return The endpointProtocol. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol() { + com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol result = + com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol.forNumber( + endpointProtocol_); + return result == null + ? com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED + : result; + } + public static final int AUXILIARY_VERSIONS_FIELD_NUMBER = 5; private static final class AuxiliaryVersionsDefaultEntryHolder { @@ -484,6 +688,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kerberosConfig_ != null) { output.writeMessage(3, getKerberosConfig()); } + if (endpointProtocol_ + != com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol + .ENDPOINT_PROTOCOL_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, endpointProtocol_); + } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAuxiliaryVersions(), @@ -514,6 +724,12 @@ public int getSerializedSize() { if (kerberosConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKerberosConfig()); } + if (endpointProtocol_ + != com.google.cloud.metastore.v1.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< @@ -548,6 +764,7 @@ public boolean equals(final java.lang.Object obj) { 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; @@ -570,6 +787,8 @@ public int hashCode() { 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(); @@ -745,6 +964,7 @@ public Builder clear() { kerberosConfigBuilder_.dispose(); kerberosConfigBuilder_ = null; } + endpointProtocol_ = 0; internalGetMutableAuxiliaryVersions().clear(); return this; } @@ -794,6 +1014,9 @@ private void buildPartial0(com.google.cloud.metastore.v1.HiveMetastoreConfig res kerberosConfigBuilder_ == null ? kerberosConfig_ : kerberosConfigBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { + result.endpointProtocol_ = endpointProtocol_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.auxiliaryVersions_ = internalGetAuxiliaryVersions(); result.auxiliaryVersions_.makeImmutable(); } @@ -855,8 +1078,11 @@ public Builder mergeFrom(com.google.cloud.metastore.v1.HiveMetastoreConfig other if (other.hasKerberosConfig()) { mergeKerberosConfig(other.getKerberosConfig()); } + if (other.endpointProtocol_ != 0) { + setEndpointProtocolValue(other.getEndpointProtocolValue()); + } internalGetMutableAuxiliaryVersions().mergeFrom(other.internalGetAuxiliaryVersions()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -907,6 +1133,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 32: + { + endpointProtocol_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 case 42: { com.google.protobuf.MapEntry< @@ -918,7 +1150,7 @@ public Builder mergeFrom( internalGetMutableAuxiliaryVersions() .getMutableMap() .put(auxiliaryVersions__.getKey(), auxiliaryVersions__.getValue()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 42 default: @@ -1462,6 +1694,111 @@ public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOr return kerberosConfigBuilder_; } + private int endpointProtocol_ = 0; + /** + * + * + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1.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.v1.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.v1.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * + * + * @return The endpointProtocol. + */ + @java.lang.Override + public com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol + getEndpointProtocol() { + com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol result = + com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol.forNumber( + endpointProtocol_); + return result == null + ? com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The protocol to use for the metastore service endpoint. If unspecified,
+     * defaults to `THRIFT`.
+     * 
+ * + * .google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * + * + * @param value The endpointProtocol to set. + * @return This builder for chaining. + */ + public Builder setEndpointProtocol( + com.google.cloud.metastore.v1.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.v1.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.v1.AuxiliaryVersionConfig> auxiliaryVersions_; @@ -1487,7 +1824,7 @@ public com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOr if (!auxiliaryVersions_.isMutable()) { auxiliaryVersions_ = auxiliaryVersions_.copy(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return auxiliaryVersions_; } @@ -1614,7 +1951,7 @@ public com.google.cloud.metastore.v1.AuxiliaryVersionConfig getAuxiliaryVersions } public Builder clearAuxiliaryVersions() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableAuxiliaryVersions().getMutableMap().clear(); return this; } @@ -1647,7 +1984,7 @@ public Builder removeAuxiliaryVersions(java.lang.String key) { @java.lang.Deprecated public java.util.Map getMutableAuxiliaryVersions() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return internalGetMutableAuxiliaryVersions().getMutableMap(); } /** @@ -1677,7 +2014,7 @@ public Builder putAuxiliaryVersions( throw new NullPointerException("map value"); } internalGetMutableAuxiliaryVersions().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** @@ -1702,7 +2039,7 @@ public Builder putAllAuxiliaryVersions( java.util.Map values) { internalGetMutableAuxiliaryVersions().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } 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 index 63ab4d5a6a52..4179ff46766a 100644 --- 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 @@ -173,6 +173,35 @@ java.lang.String getConfigOverridesOrDefault( */ com.google.cloud.metastore.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); + /** + * + * + *
+   * The protocol to use for the metastore service endpoint. If unspecified,
+   * defaults to `THRIFT`.
+   * 
+ * + * .google.cloud.metastore.v1.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.v1.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4; + * + * + * @return The endpointProtocol. + */ + com.google.cloud.metastore.v1.HiveMetastoreConfig.EndpointProtocol getEndpointProtocol(); + /** * * 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 index e6ae06d51d6b..d95522035d77 100644 --- 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 @@ -284,7 +284,7 @@ public interface DatabaseDumpOrBuilder * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return The enum numeric value on the wire for databaseType. */ @java.lang.Deprecated @@ -301,7 +301,7 @@ public interface DatabaseDumpOrBuilder * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return The databaseType. */ @java.lang.Deprecated @@ -334,6 +334,37 @@ public interface DatabaseDumpOrBuilder */ com.google.protobuf.ByteString getGcsUriBytes(); + /** + * + * + *
+     * The name of the source database.
+     * 
+ * + * string source_database = 3 [deprecated = true]; + * + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @return The bytes for sourceDatabase. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getSourceDatabaseBytes(); + /** * * @@ -388,6 +419,7 @@ private DatabaseDump(com.google.protobuf.GeneratedMessageV3.Builder builder) private DatabaseDump() { databaseType_ = 0; gcsUri_ = ""; + sourceDatabase_ = ""; type_ = 0; } @@ -563,7 +595,7 @@ private DatabaseType(int value) { * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return The enum numeric value on the wire for databaseType. */ @java.lang.Override @@ -583,7 +615,7 @@ public int getDatabaseTypeValue() { * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return The databaseType. */ @java.lang.Override @@ -651,6 +683,63 @@ public com.google.protobuf.ByteString getGcsUriBytes() { } } + 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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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; /** @@ -717,6 +806,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, type_); @@ -739,6 +831,9 @@ public int getSerializedSize() { 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.v1.DatabaseDumpSpec.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); @@ -761,6 +856,7 @@ public boolean equals(final java.lang.Object 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; @@ -777,6 +873,8 @@ public int hashCode() { 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(); @@ -924,6 +1022,7 @@ public Builder clear() { bitField0_ = 0; databaseType_ = 0; gcsUri_ = ""; + sourceDatabase_ = ""; type_ = 0; return this; } @@ -968,6 +1067,9 @@ private void buildPartial0(com.google.cloud.metastore.v1.MetadataImport.Database result.gcsUri_ = gcsUri_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceDatabase_ = sourceDatabase_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { result.type_ = type_; } } @@ -1028,6 +1130,11 @@ public Builder mergeFrom(com.google.cloud.metastore.v1.MetadataImport.DatabaseDu bitField0_ |= 0x00000002; onChanged(); } + if (!other.getSourceDatabase().isEmpty()) { + sourceDatabase_ = other.sourceDatabase_; + bitField0_ |= 0x00000004; + onChanged(); + } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } @@ -1069,10 +1176,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + sourceDatabase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 case 32: { type_ = input.readEnum(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 32 default: @@ -1107,7 +1220,7 @@ public Builder mergeFrom( * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return The enum numeric value on the wire for databaseType. */ @java.lang.Override @@ -1127,7 +1240,7 @@ public int getDatabaseTypeValue() { * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @param value The enum numeric value on the wire for databaseType to set. * @return This builder for chaining. */ @@ -1150,7 +1263,7 @@ public Builder setDatabaseTypeValue(int value) { * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return The databaseType. */ @java.lang.Override @@ -1176,7 +1289,7 @@ public Builder setDatabaseTypeValue(int value) { * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @param value The databaseType to set. * @return This builder for chaining. */ @@ -1203,7 +1316,7 @@ public Builder setDatabaseType( * * * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.database_type is - * deprecated. See google/cloud/metastore/v1/metastore.proto;l=588 + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=646 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1325,6 +1438,127 @@ public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object sourceDatabase_ = ""; + /** + * + * + *
+       * The name of the source database.
+       * 
+ * + * string source_database = 3 [deprecated = true]; + * + * @deprecated google.cloud.metastore.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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.v1.MetadataImport.DatabaseDump.source_database is + * deprecated. See google/cloud/metastore/v1/metastore.proto;l=653 + * @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; /** * @@ -1361,7 +1595,7 @@ public int getTypeValue() { */ public Builder setTypeValue(int value) { type_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1406,7 +1640,7 @@ public Builder setType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; type_ = value.getNumber(); onChanged(); return this; @@ -1426,7 +1660,7 @@ public Builder setType(com.google.cloud.metastore.v1.DatabaseDumpSpec.Type value * @return This builder for chaining. */ public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); type_ = 0; onChanged(); return this; 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 index 7553487e5c98..bf8546b9be6c 100644 --- 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 @@ -105,69 +105,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "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" + + "location}/federations/{federation}\"\312\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" + + "1.BackendMetastore.MetastoreType\"U\n\rMeta" + "storeType\022\036\n\032METASTORE_TYPE_UNSPECIFIED\020" - + "\000\022\026\n\022DATAPROC_METASTORE\020\003\"\267\001\n\026ListFedera" - + "tionsRequest\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372A%\022#m" - + "etastore.googleapis.com/Federation\022\027\n\tpa" - + "ge_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB" - + "\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030" - + "\005 \001(\tB\004\342A\001\001\"\203\001\n\027ListFederationsResponse\022" - + ":\n\013federations\030\001 \003(\0132%.google.cloud.meta" - + "store.v1.Federation\022\027\n\017next_page_token\030\002" - + " \001(\t\022\023\n\013unreachable\030\003 \003(\t\"R\n\024GetFederati" - + "onRequest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#metast" - + "ore.googleapis.com/Federation\"\317\001\n\027Create" - + "FederationRequest\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372" - + "A%\022#metastore.googleapis.com/Federation\022" - + "\033\n\rfederation_id\030\002 \001(\tB\004\342A\001\002\022?\n\nfederati" - + "on\030\003 \001(\0132%.google.cloud.metastore.v1.Fed" - + "erationB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"" - + "\253\001\n\027UpdateFederationRequest\0225\n\013update_ma" - + "sk\030\001 \001(\0132\032.google.protobuf.FieldMaskB\004\342A" - + "\001\002\022?\n\nfederation\030\002 \001(\0132%.google.cloud.me" + + "\000\022\014\n\010BIGQUERY\020\002\022\026\n\022DATAPROC_METASTORE\020\003\"" + + "\267\001\n\026ListFederationsRequest\022<\n\006parent\030\001 \001" + + "(\tB,\342A\001\002\372A%\022#metastore.googleapis.com/Fe" + + "deration\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npag" + + "e_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001" + + "\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"\203\001\n\027ListFedera" + + "tionsResponse\022:\n\013federations\030\001 \003(\0132%.goo" + + "gle.cloud.metastore.v1.Federation\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"" + + "R\n\024GetFederationRequest\022:\n\004name\030\001 \001(\tB,\342" + + "A\001\002\372A%\n#metastore.googleapis.com/Federat" + + "ion\"\317\001\n\027CreateFederationRequest\022<\n\006paren" + + "t\030\001 \001(\tB,\342A\001\002\372A%\022#metastore.googleapis.c" + + "om/Federation\022\033\n\rfederation_id\030\002 \001(\tB\004\342A" + + "\001\002\022?\n\nfederation\030\003 \001(\0132%.google.cloud.me" + "tastore.v1.FederationB\004\342A\001\002\022\030\n\nrequest_i" - + "d\030\003 \001(\tB\004\342A\001\001\"o\n\027DeleteFederationRequest" - + "\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#metastore.googl" - + "eapis.com/Federation\022\030\n\nrequest_id\030\002 \001(\t" - + "B\004\342A\001\0012\334\t\n\033DataprocMetastoreFederation\022\272" - + "\001\n\017ListFederations\0221.google.cloud.metast" - + "ore.v1.ListFederationsRequest\0322.google.c" - + "loud.metastore.v1.ListFederationsRespons" - + "e\"@\332A\006parent\202\323\344\223\0021\022//v1/{parent=projects" - + "/*/locations/*}/federations\022\247\001\n\rGetFeder" - + "ation\022/.google.cloud.metastore.v1.GetFed" - + "erationRequest\032%.google.cloud.metastore." - + "v1.Federation\">\332A\004name\202\323\344\223\0021\022//v1/{name=" - + "projects/*/locations/*/federations/*}\022\211\002" - + "\n\020CreateFederation\0222.google.cloud.metast" - + "ore.v1.CreateFederationRequest\032\035.google." - + "longrunning.Operation\"\241\001\312A9\n\nFederation\022" - + "+google.cloud.metastore.v1.OperationMeta" - + "data\332A\037parent,federation,federation_id\202\323" - + "\344\223\002=\"//v1/{parent=projects/*/locations/*" - + "}/federations:\nfederation\022\213\002\n\020UpdateFede" - + "ration\0222.google.cloud.metastore.v1.Updat" - + "eFederationRequest\032\035.google.longrunning." - + "Operation\"\243\001\312A9\n\nFederation\022+google.clou" - + "d.metastore.v1.OperationMetadata\332A\026feder" - + "ation,update_mask\202\323\344\223\002H2:/v1/{federation" - + ".name=projects/*/locations/*/federations" - + "/*}:\nfederation\022\355\001\n\020DeleteFederation\0222.g" - + "oogle.cloud.metastore.v1.DeleteFederatio" - + "nRequest\032\035.google.longrunning.Operation\"" - + "\205\001\312AD\n\025google.protobuf.Empty\022+google.clo" - + "ud.metastore.v1.OperationMetadata\332A\004name" - + "\202\323\344\223\0021*//v1/{name=projects/*/locations/*" - + "/federations/*}\032L\312A\030metastore.googleapis" - + ".com\322A.https://www.googleapis.com/auth/c" - + "loud-platformBx\n\035com.google.cloud.metast" - + "ore.v1B\030MetastoreFederationProtoP\001Z;clou" - + "d.google.com/go/metastore/apiv1/metastor" - + "epb;metastorepbb\006proto3" + + "d\030\004 \001(\tB\004\342A\001\001\"\253\001\n\027UpdateFederationReques" + + "t\0225\n\013update_mask\030\001 \001(\0132\032.google.protobuf" + + ".FieldMaskB\004\342A\001\002\022?\n\nfederation\030\002 \001(\0132%.g" + + "oogle.cloud.metastore.v1.FederationB\004\342A\001" + + "\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"o\n\027DeleteFed" + + "erationRequest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#m" + + "etastore.googleapis.com/Federation\022\030\n\nre" + + "quest_id\030\002 \001(\tB\004\342A\001\0012\334\t\n\033DataprocMetasto" + + "reFederation\022\272\001\n\017ListFederations\0221.googl" + + "e.cloud.metastore.v1.ListFederationsRequ" + + "est\0322.google.cloud.metastore.v1.ListFede" + + "rationsResponse\"@\332A\006parent\202\323\344\223\0021\022//v1/{p" + + "arent=projects/*/locations/*}/federation" + + "s\022\247\001\n\rGetFederation\022/.google.cloud.metas" + + "tore.v1.GetFederationRequest\032%.google.cl" + + "oud.metastore.v1.Federation\">\332A\004name\202\323\344\223" + + "\0021\022//v1/{name=projects/*/locations/*/fed" + + "erations/*}\022\211\002\n\020CreateFederation\0222.googl" + + "e.cloud.metastore.v1.CreateFederationReq" + + "uest\032\035.google.longrunning.Operation\"\241\001\312A" + + "9\n\nFederation\022+google.cloud.metastore.v1" + + ".OperationMetadata\332A\037parent,federation,f" + + "ederation_id\202\323\344\223\002=\"//v1/{parent=projects" + + "/*/locations/*}/federations:\nfederation\022" + + "\213\002\n\020UpdateFederation\0222.google.cloud.meta" + + "store.v1.UpdateFederationRequest\032\035.googl" + + "e.longrunning.Operation\"\243\001\312A9\n\nFederatio" + + "n\022+google.cloud.metastore.v1.OperationMe" + + "tadata\332A\026federation,update_mask\202\323\344\223\002H2:/" + + "v1/{federation.name=projects/*/locations" + + "/*/federations/*}:\nfederation\022\355\001\n\020Delete" + + "Federation\0222.google.cloud.metastore.v1.D" + + "eleteFederationRequest\032\035.google.longrunn" + + "ing.Operation\"\205\001\312AD\n\025google.protobuf.Emp" + + "ty\022+google.cloud.metastore.v1.OperationM" + + "etadata\332A\004name\202\323\344\223\0021*//v1/{name=projects" + + "/*/locations/*/federations/*}\032L\312A\030metast" + + "ore.googleapis.com\322A.https://www.googlea" + + "pis.com/auth/cloud-platformBx\n\035com.googl" + + "e.cloud.metastore.v1B\030MetastoreFederatio" + + "nProtoP\001Z;cloud.google.com/go/metastore/" + + "apiv1/metastorepb;metastorepbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( 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 index d8abcd2d5253..609ac062c7b2 100644 --- 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 @@ -199,6 +199,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_metastore_v1_DatabaseDumpSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_QueryMetadataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_QueryMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_QueryMetadataResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_QueryMetadataResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ErrorDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ErrorDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_ErrorDetails_DetailsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_ErrorDetails_DetailsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1_AlterMetadataResourceLocationResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -262,292 +294,335 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "services/{service}B\022\n\020metastore_config\"r" + "\n\021MaintenanceWindow\0220\n\013hour_of_day\030\001 \001(\013" + "2\033.google.protobuf.Int32Value\022+\n\013day_of_" - + "week\030\002 \001(\0162\026.google.type.DayOfWeek\"\327\003\n\023H" + + "week\030\002 \001(\0162\026.google.type.DayOfWeek\"\200\005\n\023H" + "iveMetastoreConfig\022\025\n\007version\030\001 \001(\tB\004\342A\001" + "\005\022]\n\020config_overrides\030\002 \003(\0132C.google.clo" + "ud.metastore.v1.HiveMetastoreConfig.Conf" + "igOverridesEntry\022B\n\017kerberos_config\030\003 \001(" + "\0132).google.cloud.metastore.v1.KerberosCo" - + "nfig\022a\n\022auxiliary_versions\030\005 \003(\0132E.googl" - + "e.cloud.metastore.v1.HiveMetastoreConfig" - + ".AuxiliaryVersionsEntry\0326\n\024ConfigOverrid" - + "esEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032" - + "k\n\026AuxiliaryVersionsEntry\022\013\n\003key\030\001 \001(\t\022@" - + "\n\005value\030\002 \001(\01321.google.cloud.metastore.v" - + "1.AuxiliaryVersionConfig:\0028\001\"s\n\016Kerberos" - + "Config\0221\n\006keytab\030\001 \001(\0132!.google.cloud.me" - + "tastore.v1.Secret\022\021\n\tprincipal\030\002 \001(\t\022\033\n\023" - + "krb5_config_gcs_uri\030\003 \001(\t\")\n\006Secret\022\026\n\014c" - + "loud_secret\030\002 \001(\tH\000B\007\n\005value\"#\n\020Encrypti" - + "onConfig\022\017\n\007kms_key\030\001 \001(\t\"\213\002\n\026AuxiliaryV" - + "ersionConfig\022\017\n\007version\030\001 \001(\t\022`\n\020config_" - + "overrides\030\002 \003(\0132F.google.cloud.metastore" - + ".v1.AuxiliaryVersionConfig.ConfigOverrid" - + "esEntry\022F\n\016network_config\030\003 \001(\0132(.google" - + ".cloud.metastore.v1.NetworkConfigB\004\342A\001\003\032" - + "6\n\024ConfigOverridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - + "value\030\002 \001(\t:\0028\001\"\325\001\n\rNetworkConfig\022J\n\tcon" - + "sumers\030\001 \003(\01321.google.cloud.metastore.v1" - + ".NetworkConfig.ConsumerB\004\342A\001\005\032x\n\010Consume" - + "r\022@\n\nsubnetwork\030\001 \001(\tB*\342A\001\005\372A#\n!compute." - + "googleapis.com/SubnetworkH\000\022\032\n\014endpoint_" - + "uri\030\003 \001(\tB\004\342A\001\003B\016\n\014vpc_resource\"\232\001\n\017Tele" - + "metryConfig\022H\n\nlog_format\030\001 \001(\01624.google" - + ".cloud.metastore.v1.TelemetryConfig.LogF" - + "ormat\"=\n\tLogFormat\022\032\n\026LOG_FORMAT_UNSPECI" - + "FIED\020\000\022\n\n\006LEGACY\020\001\022\010\n\004JSON\020\002\"\243\001\n\032Metadat" - + "aManagementActivity\022I\n\020metadata_exports\030" - + "\001 \003(\0132).google.cloud.metastore.v1.Metada" - + "taExportB\004\342A\001\003\022:\n\010restores\030\002 \003(\0132\".googl" - + "e.cloud.metastore.v1.RestoreB\004\342A\001\003\"\352\006\n\016M" - + "etadataImport\022U\n\rdatabase_dump\030\006 \001(\01326.g" - + "oogle.cloud.metastore.v1.MetadataImport." - + "DatabaseDumpB\004\342A\001\005H\000\022\022\n\004name\030\001 \001(\tB\004\342A\001\005" - + "\022\023\n\013description\030\002 \001(\t\0225\n\013create_time\030\003 \001" - + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013" - + "update_time\030\004 \001(\0132\032.google.protobuf.Time" - + "stampB\004\342A\001\003\0222\n\010end_time\030\007 \001(\0132\032.google.p" - + "rotobuf.TimestampB\004\342A\001\003\022D\n\005state\030\005 \001(\0162/" - + ".google.cloud.metastore.v1.MetadataImpor" - + "t.StateB\004\342A\001\003\032\377\001\n\014DatabaseDump\022^\n\rdataba" - + "se_type\030\001 \001(\0162C.google.cloud.metastore.v" - + "1.MetadataImport.DatabaseDump.DatabaseTy" - + "peB\002\030\001\022\017\n\007gcs_uri\030\002 \001(\t\022D\n\004type\030\004 \001(\01620." - + "google.cloud.metastore.v1.DatabaseDumpSp" - + "ec.TypeB\004\342A\001\001\"8\n\014DatabaseType\022\035\n\031DATABAS" - + "E_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\t" - + "SUCCEEDED\020\002\022\014\n\010UPDATING\020\003\022\n\n\006FAILED\020\004:\213\001" - + "\352A\207\001\n\'metastore.googleapis.com/MetadataI" - + "mport\022\\projects/{project}/locations/{loc" - + "ation}/services/{service}/metadataImport" - + "s/{metadata_import}B\n\n\010metadata\"\237\003\n\016Meta" - + "dataExport\022#\n\023destination_gcs_uri\030\004 \001(\tB" - + "\004\342A\001\003H\000\0224\n\nstart_time\030\001 \001(\0132\032.google.pro" - + "tobuf.TimestampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132" - + "\032.google.protobuf.TimestampB\004\342A\001\003\022D\n\005sta" - + "te\030\003 \001(\0162/.google.cloud.metastore.v1.Met" - + "adataExport.StateB\004\342A\001\003\022R\n\022database_dump" - + "_type\030\005 \001(\01620.google.cloud.metastore.v1." - + "DatabaseDumpSpec.TypeB\004\342A\001\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\004B\r\n\013de" - + "stination\"\226\004\n\006Backup\022\022\n\004name\030\001 \001(\tB\004\342A\001\005" - + "\0225\n\013create_time\030\002 \001(\0132\032.google.protobuf." - + "TimestampB\004\342A\001\003\0222\n\010end_time\030\003 \001(\0132\032.goog" - + "le.protobuf.TimestampB\004\342A\001\003\022<\n\005state\030\004 \001" - + "(\0162\'.google.cloud.metastore.v1.Backup.St" - + "ateB\004\342A\001\003\022B\n\020service_revision\030\005 \001(\0132\".go" - + "ogle.cloud.metastore.v1.ServiceB\004\342A\001\003\022\023\n" - + "\013description\030\006 \001(\t\022 \n\022restoring_services" - + "\030\007 \003(\tB\004\342A\001\003\"a\n\005State\022\025\n\021STATE_UNSPECIFI" - + "ED\020\000\022\014\n\010CREATING\020\001\022\014\n\010DELETING\020\002\022\n\n\006ACTI" - + "VE\020\003\022\n\n\006FAILED\020\004\022\r\n\tRESTORING\020\005:q\352An\n\037me" - + "tastore.googleapis.com/Backup\022Kprojects/" - + "{project}/locations/{location}/services/" - + "{service}/backups/{backup}\"\350\003\n\007Restore\0224" - + "\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Tim" - + "estampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.google." - + "protobuf.TimestampB\004\342A\001\003\022=\n\005state\030\003 \001(\0162" - + "(.google.cloud.metastore.v1.Restore.Stat" - + "eB\004\342A\001\003\0228\n\006backup\030\004 \001(\tB(\342A\001\003\372A!\n\037metast" - + "ore.googleapis.com/Backup\022B\n\004type\030\005 \001(\0162" - + "..google.cloud.metastore.v1.Restore.Rest" - + "oreTypeB\004\342A\001\003\022\025\n\007details\030\006 \001(\tB\004\342A\001\003\"U\n\005" - + "State\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\tCANCELLE" - + "D\020\004\"H\n\013RestoreType\022\034\n\030RESTORE_TYPE_UNSPE" - + "CIFIED\020\000\022\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"\375\001" - + "\n\rScalingConfig\022N\n\rinstance_size\030\001 \001(\01625" - + ".google.cloud.metastore.v1.ScalingConfig" - + ".InstanceSizeH\000\022\030\n\016scaling_factor\030\002 \001(\002H" - + "\000\"q\n\014InstanceSize\022\035\n\031INSTANCE_SIZE_UNSPE" - + "CIFIED\020\000\022\017\n\013EXTRA_SMALL\020\001\022\t\n\005SMALL\020\002\022\n\n\006" - + "MEDIUM\020\003\022\t\n\005LARGE\020\004\022\017\n\013EXTRA_LARGE\020\005B\017\n\r" - + "scaling_model\"\261\001\n\023ListServicesRequest\0229\n" - + "\006parent\030\001 \001(\tB)\342A\001\002\372A\"\022 metastore.google" - + "apis.com/Service\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001" - + "\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 " - + "\001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"z\n\024Lis" - + "tServicesResponse\0224\n\010services\030\001 \003(\0132\".go" - + "ogle.cloud.metastore.v1.Service\022\027\n\017next_" - + "page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"L\n" - + "\021GetServiceRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372A" - + "\"\n metastore.googleapis.com/Service\"\300\001\n\024" - + "CreateServiceRequest\0229\n\006parent\030\001 \001(\tB)\342A" - + "\001\002\372A\"\022 metastore.googleapis.com/Service\022" - + "\030\n\nservice_id\030\002 \001(\tB\004\342A\001\002\0229\n\007service\030\003 \001" - + "(\0132\".google.cloud.metastore.v1.ServiceB\004" - + "\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\242\001\n\024Updat" - + "eServiceRequest\0225\n\013update_mask\030\001 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\004\342A\001\002\0229\n\007servic" - + "e\030\002 \001(\0132\".google.cloud.metastore.v1.Serv" - + "iceB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"i\n\024D" - + "eleteServiceRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372" - + "A\"\n metastore.googleapis.com/Service\022\030\n\n" - + "request_id\030\002 \001(\tB\004\342A\001\001\"\277\001\n\032ListMetadataI" - + "mportsRequest\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'" - + "metastore.googleapis.com/MetadataImport\022" - + "\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003" - + " \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010orde" - + "r_by\030\005 \001(\tB\004\342A\001\001\"\220\001\n\033ListMetadataImports" - + "Response\022C\n\020metadata_imports\030\001 \003(\0132).goo" - + "gle.cloud.metastore.v1.MetadataImport\022\027\n" - + "\017next_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 " - + "\003(\t\"Z\n\030GetMetadataImportRequest\022>\n\004name\030" - + "\001 \001(\tB0\342A\001\002\372A)\n\'metastore.googleapis.com" - + "/MetadataImport\"\345\001\n\033CreateMetadataImport" - + "Request\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'metast" - + "ore.googleapis.com/MetadataImport\022 \n\022met" - + "adata_import_id\030\002 \001(\tB\004\342A\001\002\022H\n\017metadata_" - + "import\030\003 \001(\0132).google.cloud.metastore.v1" - + ".MetadataImportB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(" - + "\tB\004\342A\001\001\"\270\001\n\033UpdateMetadataImportRequest\022" - + "5\n\013update_mask\030\001 \001(\0132\032.google.protobuf.F" - + "ieldMaskB\004\342A\001\002\022H\n\017metadata_import\030\002 \001(\0132" - + ").google.cloud.metastore.v1.MetadataImpo" - + "rtB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"\257\001\n\022L" - + "istBackupsRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372" - + "A!\022\037metastore.googleapis.com/Backup\022\027\n\tp" - + "age_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\t" - + "B\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by" - + "\030\005 \001(\tB\004\342A\001\001\"w\n\023ListBackupsResponse\0222\n\007b" - + "ackups\030\001 \003(\0132!.google.cloud.metastore.v1" - + ".Backup\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" - + "achable\030\003 \003(\t\"J\n\020GetBackupRequest\0226\n\004nam" - + "e\030\001 \001(\tB(\342A\001\002\372A!\n\037metastore.googleapis.c" - + "om/Backup\"\273\001\n\023CreateBackupRequest\0228\n\006par" - + "ent\030\001 \001(\tB(\342A\001\002\372A!\022\037metastore.googleapis" - + ".com/Backup\022\027\n\tbackup_id\030\002 \001(\tB\004\342A\001\002\0227\n\006" - + "backup\030\003 \001(\0132!.google.cloud.metastore.v1" - + ".BackupB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"" - + "g\n\023DeleteBackupRequest\0226\n\004name\030\001 \001(\tB(\342A" - + "\001\002\372A!\n\037metastore.googleapis.com/Backup\022\030" - + "\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\"\362\001\n\025ExportMetad" - + "ataRequest\022 \n\026destination_gcs_folder\030\002 \001" - + "(\tH\000\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n metastor" - + "e.googleapis.com/Service\022\030\n\nrequest_id\030\003" - + " \001(\tB\004\342A\001\001\022R\n\022database_dump_type\030\004 \001(\01620" - + ".google.cloud.metastore.v1.DatabaseDumpS" - + "pec.TypeB\004\342A\001\001B\r\n\013destination\"\363\001\n\025Restor" - + "eServiceRequest\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A" - + "\"\n metastore.googleapis.com/Service\0228\n\006b" - + "ackup\030\002 \001(\tB(\342A\001\002\372A!\n\037metastore.googleap" - + "is.com/Backup\022J\n\014restore_type\030\003 \001(\0162..go" - + "ogle.cloud.metastore.v1.Restore.RestoreT" - + "ypeB\004\342A\001\001\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\207\002\n\021" - + "OperationMetadata\0225\n\013create_time\030\001 \001(\0132\032" - + ".google.protobuf.TimestampB\004\342A\001\003\0222\n\010end_" - + "time\030\002 \001(\0132\032.google.protobuf.TimestampB\004" - + "\342A\001\003\022\024\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\t" - + "B\004\342A\001\003\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026" - + "requested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013ap" - + "i_version\030\007 \001(\tB\004\342A\001\003\"\274\001\n\020LocationMetada" - + "ta\022k\n!supported_hive_metastore_versions\030" - + "\001 \003(\0132@.google.cloud.metastore.v1.Locati" - + "onMetadata.HiveMetastoreVersion\032;\n\024HiveM" - + "etastoreVersion\022\017\n\007version\030\001 \001(\t\022\022\n\nis_d" - + "efault\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\004AVR" - + "O\020\0022\274\033\n\021DataprocMetastore\022\256\001\n\014ListServic" - + "es\022..google.cloud.metastore.v1.ListServi" - + "cesRequest\032/.google.cloud.metastore.v1.L" - + "istServicesResponse\"=\332A\006parent\202\323\344\223\002.\022,/v" - + "1/{parent=projects/*/locations/*}/servic" - + "es\022\233\001\n\nGetService\022,.google.cloud.metasto" - + "re.v1.GetServiceRequest\032\".google.cloud.m" - + "etastore.v1.Service\";\332A\004name\202\323\344\223\002.\022,/v1/" - + "{name=projects/*/locations/*/services/*}" - + "\022\364\001\n\rCreateService\022/.google.cloud.metast" - + "ore.v1.CreateServiceRequest\032\035.google.lon" - + "grunning.Operation\"\222\001\312A6\n\007Service\022+googl" - + "e.cloud.metastore.v1.OperationMetadata\332A" - + "\031parent,service,service_id\202\323\344\223\0027\",/v1/{p" - + "arent=projects/*/locations/*}/services:\007" - + "service\022\366\001\n\rUpdateService\022/.google.cloud" - + ".metastore.v1.UpdateServiceRequest\032\035.goo" - + "gle.longrunning.Operation\"\224\001\312A6\n\007Service" - + "\022+google.cloud.metastore.v1.OperationMet" - + "adata\332A\023service,update_mask\202\323\344\223\002?24/v1/{" - + "service.name=projects/*/locations/*/serv" - + "ices/*}:\007service\022\344\001\n\rDeleteService\022/.goo" - + "gle.cloud.metastore.v1.DeleteServiceRequ" - + "est\032\035.google.longrunning.Operation\"\202\001\312AD" - + "\n\025google.protobuf.Empty\022+google.cloud.me" - + "tastore.v1.OperationMetadata\332A\004name\202\323\344\223\002" - + ".*,/v1/{name=projects/*/locations/*/serv" - + "ices/*}\022\325\001\n\023ListMetadataImports\0225.google" - + ".cloud.metastore.v1.ListMetadataImportsR" - + "equest\0326.google.cloud.metastore.v1.ListM" - + "etadataImportsResponse\"O\332A\006parent\202\323\344\223\002@\022" - + ">/v1/{parent=projects/*/locations/*/serv" - + "ices/*}/metadataImports\022\302\001\n\021GetMetadataI" - + "mport\0223.google.cloud.metastore.v1.GetMet" - + "adataImportRequest\032).google.cloud.metast" - + "ore.v1.MetadataImport\"M\332A\004name\202\323\344\223\002@\022>/v" + + "nfig\022Z\n\021endpoint_protocol\030\004 \001(\0162?.google" + + ".cloud.metastore.v1.HiveMetastoreConfig." + + "EndpointProtocol\022a\n\022auxiliary_versions\030\005" + + " \003(\0132E.google.cloud.metastore.v1.HiveMet" + + "astoreConfig.AuxiliaryVersionsEntry\0326\n\024C" + + "onfigOverridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\032k\n\026AuxiliaryVersionsEntry\022\013\n" + + "\003key\030\001 \001(\t\022@\n\005value\030\002 \001(\01321.google.cloud" + + ".metastore.v1.AuxiliaryVersionConfig:\0028\001" + + "\"K\n\020EndpointProtocol\022!\n\035ENDPOINT_PROTOCO" + + "L_UNSPECIFIED\020\000\022\n\n\006THRIFT\020\001\022\010\n\004GRPC\020\002\"s\n" + + "\016KerberosConfig\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\006Se" + + "cret\022\026\n\014cloud_secret\030\002 \001(\tH\000B\007\n\005value\"#\n" + + "\020EncryptionConfig\022\017\n\007kms_key\030\001 \001(\t\"\213\002\n\026A" + + "uxiliaryVersionConfig\022\017\n\007version\030\001 \001(\t\022`" + + "\n\020config_overrides\030\002 \003(\0132F.google.cloud." + + "metastore.v1.AuxiliaryVersionConfig.Conf" + + "igOverridesEntry\022F\n\016network_config\030\003 \001(\013" + + "2(.google.cloud.metastore.v1.NetworkConf" + + "igB\004\342A\001\003\0326\n\024ConfigOverridesEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\325\001\n\rNetworkConf" + + "ig\022J\n\tconsumers\030\001 \003(\01321.google.cloud.met" + + "astore.v1.NetworkConfig.ConsumerB\004\342A\001\005\032x" + + "\n\010Consumer\022@\n\nsubnetwork\030\001 \001(\tB*\342A\001\005\372A#\n" + + "!compute.googleapis.com/SubnetworkH\000\022\032\n\014" + + "endpoint_uri\030\003 \001(\tB\004\342A\001\003B\016\n\014vpc_resource" + + "\"\232\001\n\017TelemetryConfig\022H\n\nlog_format\030\001 \001(\016" + + "24.google.cloud.metastore.v1.TelemetryCo" + + "nfig.LogFormat\"=\n\tLogFormat\022\032\n\026LOG_FORMA" + + "T_UNSPECIFIED\020\000\022\n\n\006LEGACY\020\001\022\010\n\004JSON\020\002\"\243\001" + + "\n\032MetadataManagementActivity\022I\n\020metadata" + + "_exports\030\001 \003(\0132).google.cloud.metastore." + + "v1.MetadataExportB\004\342A\001\003\022:\n\010restores\030\002 \003(" + + "\0132\".google.cloud.metastore.v1.RestoreB\004\342" + + "A\001\003\"\207\007\n\016MetadataImport\022U\n\rdatabase_dump\030" + + "\006 \001(\01326.google.cloud.metastore.v1.Metada" + + "taImport.DatabaseDumpB\004\342A\001\005H\000\022\022\n\004name\030\001 " + + "\001(\tB\004\342A\001\005\022\023\n\013description\030\002 \001(\t\0225\n\013create" + + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + + "\004\342A\001\003\0225\n\013update_time\030\004 \001(\0132\032.google.prot" + + "obuf.TimestampB\004\342A\001\003\0222\n\010end_time\030\007 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\022D\n\005stat" + + "e\030\005 \001(\0162/.google.cloud.metastore.v1.Meta" + + "dataImport.StateB\004\342A\001\003\032\234\002\n\014DatabaseDump\022" + + "^\n\rdatabase_type\030\001 \001(\0162C.google.cloud.me" + + "tastore.v1.MetadataImport.DatabaseDump.D" + + "atabaseTypeB\002\030\001\022\017\n\007gcs_uri\030\002 \001(\t\022\033\n\017sour" + + "ce_database\030\003 \001(\tB\002\030\001\022D\n\004type\030\004 \001(\01620.go" + + "ogle.cloud.metastore.v1.DatabaseDumpSpec" + + ".TypeB\004\342A\001\001\"8\n\014DatabaseType\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\tSU" + + "CCEEDED\020\002\022\014\n\010UPDATING\020\003\022\n\n\006FAILED\020\004:\213\001\352A" + + "\207\001\n\'metastore.googleapis.com/MetadataImp" + + "ort\022\\projects/{project}/locations/{locat" + + "ion}/services/{service}/metadataImports/" + + "{metadata_import}B\n\n\010metadata\"\237\003\n\016Metada" + + "taExport\022#\n\023destination_gcs_uri\030\004 \001(\tB\004\342" + + "A\001\003H\000\0224\n\nstart_time\030\001 \001(\0132\032.google.proto" + + "buf.TimestampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032." + + "google.protobuf.TimestampB\004\342A\001\003\022D\n\005state" + + "\030\003 \001(\0162/.google.cloud.metastore.v1.Metad" + + "ataExport.StateB\004\342A\001\003\022R\n\022database_dump_t" + + "ype\030\005 \001(\01620.google.cloud.metastore.v1.Da" + + "tabaseDumpSpec.TypeB\004\342A\001\003\"U\n\005State\022\025\n\021ST" + + "ATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEE" + + "DED\020\002\022\n\n\006FAILED\020\003\022\r\n\tCANCELLED\020\004B\r\n\013dest" + + "ination\"\226\004\n\006Backup\022\022\n\004name\030\001 \001(\tB\004\342A\001\005\0225" + + "\n\013create_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestampB\004\342A\001\003\0222\n\010end_time\030\003 \001(\0132\032.google" + + ".protobuf.TimestampB\004\342A\001\003\022<\n\005state\030\004 \001(\016" + + "2\'.google.cloud.metastore.v1.Backup.Stat" + + "eB\004\342A\001\003\022B\n\020service_revision\030\005 \001(\0132\".goog" + + "le.cloud.metastore.v1.ServiceB\004\342A\001\003\022\023\n\013d" + + "escription\030\006 \001(\t\022 \n\022restoring_services\030\007" + + " \003(\tB\004\342A\001\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}\"\350\003\n\007Restore\0224\n\n" + + "start_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\004\342A\001\003\022=\n\005state\030\003 \001(\0162(." + + "google.cloud.metastore.v1.Restore.StateB" + + "\004\342A\001\003\0228\n\006backup\030\004 \001(\tB(\342A\001\003\372A!\n\037metastor" + + "e.googleapis.com/Backup\022B\n\004type\030\005 \001(\0162.." + + "google.cloud.metastore.v1.Restore.Restor" + + "eTypeB\004\342A\001\003\022\025\n\007details\030\006 \001(\tB\004\342A\001\003\"U\n\005St" + + "ate\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_UNSPECI" + + "FIED\020\000\022\010\n\004FULL\020\001\022\021\n\rMETADATA_ONLY\020\002\"\375\001\n\r" + + "ScalingConfig\022N\n\rinstance_size\030\001 \001(\01625.g" + + "oogle.cloud.metastore.v1.ScalingConfig.I" + + "nstanceSizeH\000\022\030\n\016scaling_factor\030\002 \001(\002H\000\"" + + "q\n\014InstanceSize\022\035\n\031INSTANCE_SIZE_UNSPECI" + + "FIED\020\000\022\017\n\013EXTRA_SMALL\020\001\022\t\n\005SMALL\020\002\022\n\n\006ME" + + "DIUM\020\003\022\t\n\005LARGE\020\004\022\017\n\013EXTRA_LARGE\020\005B\017\n\rsc" + + "aling_model\"\261\001\n\023ListServicesRequest\0229\n\006p" + + "arent\030\001 \001(\tB)\342A\001\002\372A\"\022 metastore.googleap" + + "is.com/Service\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022" + + "\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(" + + "\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"z\n\024ListS" + + "ervicesResponse\0224\n\010services\030\001 \003(\0132\".goog" + + "le.cloud.metastore.v1.Service\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"L\n\021G" + + "etServiceRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372A\"\n" + + " metastore.googleapis.com/Service\"\300\001\n\024Cr" + + "eateServiceRequest\0229\n\006parent\030\001 \001(\tB)\342A\001\002" + + "\372A\"\022 metastore.googleapis.com/Service\022\030\n" + + "\nservice_id\030\002 \001(\tB\004\342A\001\002\0229\n\007service\030\003 \001(\013" + + "2\".google.cloud.metastore.v1.ServiceB\004\342A" + + "\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\242\001\n\024UpdateS" + + "erviceRequest\0225\n\013update_mask\030\001 \001(\0132\032.goo" + + "gle.protobuf.FieldMaskB\004\342A\001\002\0229\n\007service\030" + + "\002 \001(\0132\".google.cloud.metastore.v1.Servic" + + "eB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"i\n\024Del" + + "eteServiceRequest\0227\n\004name\030\001 \001(\tB)\342A\001\002\372A\"" + + "\n metastore.googleapis.com/Service\022\030\n\nre" + + "quest_id\030\002 \001(\tB\004\342A\001\001\"\277\001\n\032ListMetadataImp" + + "ortsRequest\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'me" + + "tastore.googleapis.com/MetadataImport\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001" + + "(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_" + + "by\030\005 \001(\tB\004\342A\001\001\"\220\001\n\033ListMetadataImportsRe" + + "sponse\022C\n\020metadata_imports\030\001 \003(\0132).googl" + + "e.cloud.metastore.v1.MetadataImport\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(" + + "\t\"Z\n\030GetMetadataImportRequest\022>\n\004name\030\001 " + + "\001(\tB0\342A\001\002\372A)\n\'metastore.googleapis.com/M" + + "etadataImport\"\345\001\n\033CreateMetadataImportRe" + + "quest\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\022\'metastor" + + "e.googleapis.com/MetadataImport\022 \n\022metad" + + "ata_import_id\030\002 \001(\tB\004\342A\001\002\022H\n\017metadata_im" + + "port\030\003 \001(\0132).google.cloud.metastore.v1.M" + + "etadataImportB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB" + + "\004\342A\001\001\"\270\001\n\033UpdateMetadataImportRequest\0225\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.Fie" + + "ldMaskB\004\342A\001\002\022H\n\017metadata_import\030\002 \001(\0132)." + + "google.cloud.metastore.v1.MetadataImport" + + "B\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"\257\001\n\022Lis" + + "tBackupsRequest\0228\n\006parent\030\001 \001(\tB(\342A\001\002\372A!" + + "\022\037metastore.googleapis.com/Backup\022\027\n\tpag" + + "e_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004" + + "\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005" + + " \001(\tB\004\342A\001\001\"w\n\023ListBackupsResponse\0222\n\007bac" + + "kups\030\001 \003(\0132!.google.cloud.metastore.v1.B" + + "ackup\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreac" + + "hable\030\003 \003(\t\"J\n\020GetBackupRequest\0226\n\004name\030" + + "\001 \001(\tB(\342A\001\002\372A!\n\037metastore.googleapis.com" + + "/Backup\"\273\001\n\023CreateBackupRequest\0228\n\006paren" + + "t\030\001 \001(\tB(\342A\001\002\372A!\022\037metastore.googleapis.c" + + "om/Backup\022\027\n\tbackup_id\030\002 \001(\tB\004\342A\001\002\0227\n\006ba" + + "ckup\030\003 \001(\0132!.google.cloud.metastore.v1.B" + + "ackupB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"g\n" + + "\023DeleteBackupRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002" + + "\372A!\n\037metastore.googleapis.com/Backup\022\030\n\n" + + "request_id\030\002 \001(\tB\004\342A\001\001\"\362\001\n\025ExportMetadat" + + "aRequest\022 \n\026destination_gcs_folder\030\002 \001(\t" + + "H\000\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n metastore." + + "googleapis.com/Service\022\030\n\nrequest_id\030\003 \001" + + "(\tB\004\342A\001\001\022R\n\022database_dump_type\030\004 \001(\01620.g" + + "oogle.cloud.metastore.v1.DatabaseDumpSpe" + + "c.TypeB\004\342A\001\001B\r\n\013destination\"\363\001\n\025RestoreS" + + "erviceRequest\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n" + + " metastore.googleapis.com/Service\0228\n\006bac" + + "kup\030\002 \001(\tB(\342A\001\002\372A!\n\037metastore.googleapis" + + ".com/Backup\022J\n\014restore_type\030\003 \001(\0162..goog" + + "le.cloud.metastore.v1.Restore.RestoreTyp" + + "eB\004\342A\001\001\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\"\207\002\n\021Op" + + "erationMetadata\0225\n\013create_time\030\001 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\0222\n\010end_ti" + + "me\030\002 \001(\0132\032.google.protobuf.TimestampB\004\342A" + + "\001\003\022\024\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004" + + "\342A\001\003\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026re" + + "quested_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_" + + "version\030\007 \001(\tB\004\342A\001\003\"\274\001\n\020LocationMetadata" + + "\022k\n!supported_hive_metastore_versions\030\001 " + + "\003(\0132@.google.cloud.metastore.v1.Location" + + "Metadata.HiveMetastoreVersion\032;\n\024HiveMet" + + "astoreVersion\022\017\n\007version\030\001 \001(\t\022\022\n\nis_def" + + "ault\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\"g\n\024QueryMetadataRequest\022:\n\007service\030\001 \001" + + "(\tB)\342A\001\002\372A\"\n metastore.googleapis.com/Se" + + "rvice\022\023\n\005query\030\002 \001(\tB\004\342A\001\002\"4\n\025QueryMetad" + + "ataResponse\022\033\n\023result_manifest_uri\030\001 \001(\t" + + "\"\205\001\n\014ErrorDetails\022E\n\007details\030\001 \003(\01324.goo" + + "gle.cloud.metastore.v1.ErrorDetails.Deta" + + "ilsEntry\032.\n\014DetailsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\254\001\n\032MoveTableToDatabase" + + "Request\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n metas" + + "tore.googleapis.com/Service\022\030\n\ntable_nam" + + "e\030\002 \001(\tB\004\342A\001\002\022\025\n\007db_name\030\003 \001(\tB\004\342A\001\002\022!\n\023" + + "destination_db_name\030\004 \001(\tB\004\342A\001\002\"\035\n\033MoveT" + + "ableToDatabaseResponse\"\233\001\n$AlterMetadata" + + "ResourceLocationRequest\022:\n\007service\030\001 \001(\t" + + "B)\342A\001\002\372A\"\n metastore.googleapis.com/Serv" + + "ice\022\033\n\rresource_name\030\002 \001(\tB\004\342A\001\002\022\032\n\014loca" + + "tion_uri\030\003 \001(\tB\004\342A\001\002\"\'\n%AlterMetadataRes" + + "ourceLocationResponse2\340!\n\021DataprocMetast" + + "ore\022\256\001\n\014ListServices\022..google.cloud.meta" + + "store.v1.ListServicesRequest\032/.google.cl" + + "oud.metastore.v1.ListServicesResponse\"=\332" + + "A\006parent\202\323\344\223\002.\022,/v1/{parent=projects/*/l" + + "ocations/*}/services\022\233\001\n\nGetService\022,.go" + + "ogle.cloud.metastore.v1.GetServiceReques" + + "t\032\".google.cloud.metastore.v1.Service\";\332" + + "A\004name\202\323\344\223\002.\022,/v1/{name=projects/*/locat" + + "ions/*/services/*}\022\364\001\n\rCreateService\022/.g" + + "oogle.cloud.metastore.v1.CreateServiceRe" + + "quest\032\035.google.longrunning.Operation\"\222\001\312" + + "A6\n\007Service\022+google.cloud.metastore.v1.O" + + "perationMetadata\332A\031parent,service,servic" + + "e_id\202\323\344\223\0027\",/v1/{parent=projects/*/locat" + + "ions/*}/services:\007service\022\366\001\n\rUpdateServ" + + "ice\022/.google.cloud.metastore.v1.UpdateSe" + + "rviceRequest\032\035.google.longrunning.Operat" + + "ion\"\224\001\312A6\n\007Service\022+google.cloud.metasto" + + "re.v1.OperationMetadata\332A\023service,update" + + "_mask\202\323\344\223\002?24/v1/{service.name=projects/" + + "*/locations/*/services/*}:\007service\022\344\001\n\rD" + + "eleteService\022/.google.cloud.metastore.v1" + + ".DeleteServiceRequest\032\035.google.longrunni" + + "ng.Operation\"\202\001\312AD\n\025google.protobuf.Empt" + + "y\022+google.cloud.metastore.v1.OperationMe" + + "tadata\332A\004name\202\323\344\223\002.*,/v1/{name=projects/" + + "*/locations/*/services/*}\022\325\001\n\023ListMetada" + + "taImports\0225.google.cloud.metastore.v1.Li" + + "stMetadataImportsRequest\0326.google.cloud." + + "metastore.v1.ListMetadataImportsResponse" + + "\"O\332A\006parent\202\323\344\223\002@\022>/v1/{parent=projects/" + + "*/locations/*/services/*}/metadataImport" + + "s\022\302\001\n\021GetMetadataImport\0223.google.cloud.m" + + "etastore.v1.GetMetadataImportRequest\032).g" + + "oogle.cloud.metastore.v1.MetadataImport\"" + + "M\332A\004name\202\323\344\223\002@\022>/v1/{name=projects/*/loc" + + "ations/*/services/*/metadataImports/*}\022\263" + + "\002\n\024CreateMetadataImport\0226.google.cloud.m" + + "etastore.v1.CreateMetadataImportRequest\032" + + "\035.google.longrunning.Operation\"\303\001\312A=\n\016Me" + + "tadataImport\022+google.cloud.metastore.v1." + + "OperationMetadata\332A)parent,metadata_impo" + + "rt,metadata_import_id\202\323\344\223\002Q\">/v1/{parent" + + "=projects/*/locations/*/services/*}/meta" + + "dataImports:\017metadata_import\022\265\002\n\024UpdateM" + + "etadataImport\0226.google.cloud.metastore.v" + + "1.UpdateMetadataImportRequest\032\035.google.l" + + "ongrunning.Operation\"\305\001\312A=\n\016MetadataImpo" + + "rt\022+google.cloud.metastore.v1.OperationM" + + "etadata\332A\033metadata_import,update_mask\202\323\344" + + "\223\002a2N/v1/{metadata_import.name=projects/" + + "*/locations/*/services/*/metadataImports" + + "/*}:\017metadata_import\022\355\001\n\016ExportMetadata\022" + + "0.google.cloud.metastore.v1.ExportMetada" + + "taRequest\032\035.google.longrunning.Operation" + + "\"\211\001\312A=\n\016MetadataExport\022+google.cloud.met" + + "astore.v1.OperationMetadata\202\323\344\223\002C\">/v1/{" + + "service=projects/*/locations/*/services/" + + "*}:exportMetadata:\001*\022\360\001\n\016RestoreService\022" + + "0.google.cloud.metastore.v1.RestoreServi" + + "ceRequest\032\035.google.longrunning.Operation" + + "\"\214\001\312A6\n\007Restore\022+google.cloud.metastore." + + "v1.OperationMetadata\332A\016service,backup\202\323\344" + + "\223\002<\"7/v1/{service=projects/*/locations/*" + + "/services/*}:restore:\001*\022\265\001\n\013ListBackups\022" + + "-.google.cloud.metastore.v1.ListBackupsR" + + "equest\032..google.cloud.metastore.v1.ListB" + + "ackupsResponse\"G\332A\006parent\202\323\344\223\0028\0226/v1/{pa" + + "rent=projects/*/locations/*/services/*}/" + + "backups\022\242\001\n\tGetBackup\022+.google.cloud.met" + + "astore.v1.GetBackupRequest\032!.google.clou" + + "d.metastore.v1.Backup\"E\332A\004name\202\323\344\223\0028\0226/v" + "1/{name=projects/*/locations/*/services/" - + "*/metadataImports/*}\022\263\002\n\024CreateMetadataI" - + "mport\0226.google.cloud.metastore.v1.Create" - + "MetadataImportRequest\032\035.google.longrunni" - + "ng.Operation\"\303\001\312A=\n\016MetadataImport\022+goog" - + "le.cloud.metastore.v1.OperationMetadata\332" - + "A)parent,metadata_import,metadata_import" - + "_id\202\323\344\223\002Q\">/v1/{parent=projects/*/locati" - + "ons/*/services/*}/metadataImports:\017metad" - + "ata_import\022\265\002\n\024UpdateMetadataImport\0226.go" - + "ogle.cloud.metastore.v1.UpdateMetadataIm" - + "portRequest\032\035.google.longrunning.Operati" - + "on\"\305\001\312A=\n\016MetadataImport\022+google.cloud.m" - + "etastore.v1.OperationMetadata\332A\033metadata" - + "_import,update_mask\202\323\344\223\002a2N/v1/{metadata" - + "_import.name=projects/*/locations/*/serv" - + "ices/*/metadataImports/*}:\017metadata_impo" - + "rt\022\355\001\n\016ExportMetadata\0220.google.cloud.met" - + "astore.v1.ExportMetadataRequest\032\035.google" - + ".longrunning.Operation\"\211\001\312A=\n\016MetadataEx" - + "port\022+google.cloud.metastore.v1.Operatio" - + "nMetadata\202\323\344\223\002C\">/v1/{service=projects/*" - + "/locations/*/services/*}:exportMetadata:" - + "\001*\022\360\001\n\016RestoreService\0220.google.cloud.met" - + "astore.v1.RestoreServiceRequest\032\035.google" - + ".longrunning.Operation\"\214\001\312A6\n\007Restore\022+g" - + "oogle.cloud.metastore.v1.OperationMetada" - + "ta\332A\016service,backup\202\323\344\223\002<\"7/v1/{service=" - + "projects/*/locations/*/services/*}:resto" - + "re:\001*\022\265\001\n\013ListBackups\022-.google.cloud.met" - + "astore.v1.ListBackupsRequest\032..google.cl" - + "oud.metastore.v1.ListBackupsResponse\"G\332A" - + "\006parent\202\323\344\223\0028\0226/v1/{parent=projects/*/lo" - + "cations/*/services/*}/backups\022\242\001\n\tGetBac" - + "kup\022+.google.cloud.metastore.v1.GetBacku" - + "pRequest\032!.google.cloud.metastore.v1.Bac" - + "kup\"E\332A\004name\202\323\344\223\0028\0226/v1/{name=projects/*" - + "/locations/*/services/*/backups/*}\022\370\001\n\014C" - + "reateBackup\022..google.cloud.metastore.v1." - + "CreateBackupRequest\032\035.google.longrunning" - + ".Operation\"\230\001\312A5\n\006Backup\022+google.cloud.m" - + "etastore.v1.OperationMetadata\332A\027parent,b" - + "ackup,backup_id\202\323\344\223\002@\"6/v1/{parent=proje" - + "cts/*/locations/*/services/*}/backups:\006b" - + "ackup\022\354\001\n\014DeleteBackup\022..google.cloud.me" - + "tastore.v1.DeleteBackupRequest\032\035.google." - + "longrunning.Operation\"\214\001\312AD\n\025google.prot" - + "obuf.Empty\022+google.cloud.metastore.v1.Op" - + "erationMetadata\332A\004name\202\323\344\223\0028*6/v1/{name=" - + "projects/*/locations/*/services/*/backup" - + "s/*}\032L\312A\030metastore.googleapis.com\322A.http" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rmB\226\003\n\035com.google.cloud.metastore.v1B\016Me" - + "tastoreProtoP\001Z;cloud.google.com/go/meta" - + "store/apiv1/metastorepb;metastorepb\312\002\031Go" - + "ogle\\Cloud\\Metastore\\V1\352AN\n\036compute.goog" - + "leapis.com/Network\022,projects/{project}/g" - + "lobal/networks/{network}\352Aa\n!compute.goo" - + "gleapis.com/Subnetwork\022 + * Request message for + * [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1.DataprocMetastore.MoveTableToDatabase]. + * + * + * Protobuf type {@code google.cloud.metastore.v1.MoveTableToDatabaseRequest} + */ +public final class MoveTableToDatabaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest.class, + com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest other = + (com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.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.v1.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.v1.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.v1.DataprocMetastore.MoveTableToDatabase].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MoveTableToDatabaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MoveTableToDatabaseRequest) + com.google.cloud.metastore.v1.MoveTableToDatabaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest.class, + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.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.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MoveTableToDatabaseRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MoveTableToDatabaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MoveTableToDatabaseRequest build() { + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MoveTableToDatabaseRequest buildPartial() { + com.google.cloud.metastore.v1.MoveTableToDatabaseRequest result = + new com.google.cloud.metastore.v1.MoveTableToDatabaseRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest) { + return mergeFrom((com.google.cloud.metastore.v1.MoveTableToDatabaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MoveTableToDatabaseRequest other) { + if (other == com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MoveTableToDatabaseRequest) + private static final com.google.cloud.metastore.v1.MoveTableToDatabaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MoveTableToDatabaseRequest(); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseRequestOrBuilder.java new file mode 100644 index 000000000000..7c9cd62d5792 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseRequestOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface MoveTableToDatabaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.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-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseResponse.java new file mode 100644 index 000000000000..247c36e95954 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseResponse.java @@ -0,0 +1,434 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// 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.MoveTableToDatabase][google.cloud.metastore.v1.DataprocMetastore.MoveTableToDatabase].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MoveTableToDatabaseResponse} + */ +public final class MoveTableToDatabaseResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MoveTableToDatabaseResponse.class, + com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.MoveTableToDatabaseResponse other = + (com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.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.v1.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.v1.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.v1.DataprocMetastore.MoveTableToDatabase].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.MoveTableToDatabaseResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.MoveTableToDatabaseResponse) + com.google.cloud.metastore.v1.MoveTableToDatabaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.MoveTableToDatabaseResponse.class, + com.google.cloud.metastore.v1.MoveTableToDatabaseResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.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.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_MoveTableToDatabaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MoveTableToDatabaseResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.MoveTableToDatabaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MoveTableToDatabaseResponse build() { + com.google.cloud.metastore.v1.MoveTableToDatabaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.MoveTableToDatabaseResponse buildPartial() { + com.google.cloud.metastore.v1.MoveTableToDatabaseResponse result = + new com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse) { + return mergeFrom((com.google.cloud.metastore.v1.MoveTableToDatabaseResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.MoveTableToDatabaseResponse other) { + if (other == com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.MoveTableToDatabaseResponse) + private static final com.google.cloud.metastore.v1.MoveTableToDatabaseResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.MoveTableToDatabaseResponse(); + } + + public static com.google.cloud.metastore.v1.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.v1.MoveTableToDatabaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseResponseOrBuilder.java new file mode 100644 index 000000000000..00126c5b3061 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/MoveTableToDatabaseResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface MoveTableToDatabaseResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.MoveTableToDatabaseResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataRequest.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataRequest.java new file mode 100644 index 000000000000..92af30c890f7 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataRequest.java @@ -0,0 +1,850 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// 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.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.QueryMetadataRequest} + */ +public final class QueryMetadataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.QueryMetadataRequest.class, + com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.QueryMetadataRequest other = + (com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.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.v1.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.v1.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.v1.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.QueryMetadataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.QueryMetadataRequest) + com.google.cloud.metastore.v1.QueryMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.QueryMetadataRequest.class, + com.google.cloud.metastore.v1.QueryMetadataRequest.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.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.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.QueryMetadataRequest getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.QueryMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.QueryMetadataRequest build() { + com.google.cloud.metastore.v1.QueryMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.QueryMetadataRequest buildPartial() { + com.google.cloud.metastore.v1.QueryMetadataRequest result = + new com.google.cloud.metastore.v1.QueryMetadataRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest) { + return mergeFrom((com.google.cloud.metastore.v1.QueryMetadataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.QueryMetadataRequest other) { + if (other == com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.QueryMetadataRequest) + private static final com.google.cloud.metastore.v1.QueryMetadataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.QueryMetadataRequest(); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataRequestOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataRequestOrBuilder.java new file mode 100644 index 000000000000..040fd3a72bf6 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface QueryMetadataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.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-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataResponse.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataResponse.java new file mode 100644 index 000000000000..111403d11b50 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataResponse.java @@ -0,0 +1,647 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// 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.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.QueryMetadataResponse} + */ +public final class QueryMetadataResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1.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(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.QueryMetadataResponse.class, + com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1.QueryMetadataResponse other = + (com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1.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.v1.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.v1.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.v1.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.v1.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1.QueryMetadataResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1.QueryMetadataResponse) + com.google.cloud.metastore.v1.QueryMetadataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.metastore.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1.QueryMetadataResponse.class, + com.google.cloud.metastore.v1.QueryMetadataResponse.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1.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.v1.MetastoreProto + .internal_static_google_cloud_metastore_v1_QueryMetadataResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.QueryMetadataResponse getDefaultInstanceForType() { + return com.google.cloud.metastore.v1.QueryMetadataResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1.QueryMetadataResponse build() { + com.google.cloud.metastore.v1.QueryMetadataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1.QueryMetadataResponse buildPartial() { + com.google.cloud.metastore.v1.QueryMetadataResponse result = + new com.google.cloud.metastore.v1.QueryMetadataResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse) { + return mergeFrom((com.google.cloud.metastore.v1.QueryMetadataResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1.QueryMetadataResponse other) { + if (other == com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1.QueryMetadataResponse) + private static final com.google.cloud.metastore.v1.QueryMetadataResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1.QueryMetadataResponse(); + } + + public static com.google.cloud.metastore.v1.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.v1.QueryMetadataResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataResponseOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataResponseOrBuilder.java new file mode 100644 index 000000000000..f90c2c3aa0c7 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/QueryMetadataResponseOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1/metastore.proto + +package com.google.cloud.metastore.v1; + +public interface QueryMetadataResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1.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-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 index 703538155886..1c999e9ba3aa 100644 --- 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 @@ -238,6 +238,48 @@ service DataprocMetastore { metadata_type: "google.cloud.metastore.v1.OperationMetadata" }; } + + // Query DPMS metadata. + rpc QueryMetadata(QueryMetadataRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{service=projects/*/locations/*/services/*}:queryMetadata" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "QueryMetadataResponse" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } + + // Move a table to another database. + rpc MoveTableToDatabase(MoveTableToDatabaseRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{service=projects/*/locations/*/services/*}:moveTableToDatabase" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "MoveTableToDatabaseResponse" + metadata_type: "google.cloud.metastore.v1.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: "/v1/{service=projects/*/locations/*/services/*}:alterLocation" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "AlterMetadataResourceLocationResponse" + metadata_type: "google.cloud.metastore.v1.OperationMetadata" + }; + } } // A managed metastore service that serves metadata queries. @@ -425,6 +467,18 @@ message MaintenanceWindow { // 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]; @@ -442,6 +496,10 @@ message HiveMetastoreConfig { // 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 @@ -592,6 +650,9 @@ message MetadataImport { // 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]; @@ -1441,3 +1502,101 @@ message DatabaseDumpSpec { AVRO = 2; } } + +// Request message for +// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.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.v1.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; +} + +// Error details in public error message for +// [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1.DataprocMetastore.QueryMetadata]. +message ErrorDetails { + // Additional structured details about this error. + // + // Keys define the failure items. + // Value describes the exception or details of the item. + map details = 1; +} + +// Request message for +// [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1.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.v1.DataprocMetastore.MoveTableToDatabase]. +message MoveTableToDatabaseResponse {} + +// Request message for +// [DataprocMetastore.AlterMetadataResourceLocation][google.cloud.metastore.v1.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.v1.DataprocMetastore.AlterMetadataResourceLocation]. +message AlterMetadataResourceLocationResponse {} 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 index c9b6ec6a23c0..dbe25125fe6e 100644 --- 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 @@ -188,6 +188,9 @@ message BackendMetastore { // 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; } diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ErrorDetails.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ErrorDetails.java new file mode 100644 index 000000000000..3a1ad7012082 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ErrorDetails.java @@ -0,0 +1,808 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +/** + * + * + *
+ * Error details in public error message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ErrorDetails} + */ +public final class ErrorDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1alpha.ErrorDetails) + ErrorDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorDetails.newBuilder() to construct. + private ErrorDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorDetails() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto + .internal_static_google_cloud_metastore_v1alpha_ErrorDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetDetails(); + 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_ErrorDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ErrorDetails.class, + com.google.cloud.metastore.v1alpha.ErrorDetails.Builder.class); + } + + public static final int DETAILS_FIELD_NUMBER = 1; + + private static final class DetailsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.metastore.v1alpha.MetastoreProto + .internal_static_google_cloud_metastore_v1alpha_ErrorDetails_DetailsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField details_; + + private com.google.protobuf.MapField internalGetDetails() { + if (details_ == null) { + return com.google.protobuf.MapField.emptyMapField(DetailsDefaultEntryHolder.defaultEntry); + } + return details_; + } + + public int getDetailsCount() { + return internalGetDetails().getMap().size(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public boolean containsDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDetails().getMap().containsKey(key); + } + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDetails() { + return getDetailsMap(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.util.Map getDetailsMap() { + return internalGetDetails().getMap(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.lang.String getDetailsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().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, internalGetDetails(), DetailsDefaultEntryHolder.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 : + internalGetDetails().getMap().entrySet()) { + com.google.protobuf.MapEntry details__ = + DetailsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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.ErrorDetails)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1alpha.ErrorDetails other = + (com.google.cloud.metastore.v1alpha.ErrorDetails) obj; + + if (!internalGetDetails().equals(other.internalGetDetails())) return false; + if (!getUnknownFields().equals(other.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 (!internalGetDetails().getMap().isEmpty()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + internalGetDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails parseFrom( + java.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.ErrorDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails parseFrom( + com.google.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.ErrorDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails 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.ErrorDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails parseFrom( + java.io.InputStream input, 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.ErrorDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails parseDelimitedFrom( + java.io.InputStream input, 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.ErrorDetails 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.ErrorDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @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.ErrorDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error details in public error message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1alpha.ErrorDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1alpha.ErrorDetails) + com.google.cloud.metastore.v1alpha.ErrorDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1alpha.MetastoreProto + .internal_static_google_cloud_metastore_v1alpha_ErrorDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetDetails(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableDetails(); + 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_ErrorDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1alpha.ErrorDetails.class, + com.google.cloud.metastore.v1alpha.ErrorDetails.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1alpha.ErrorDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableDetails().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_ErrorDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ErrorDetails getDefaultInstanceForType() { + return com.google.cloud.metastore.v1alpha.ErrorDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ErrorDetails build() { + com.google.cloud.metastore.v1alpha.ErrorDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1alpha.ErrorDetails buildPartial() { + com.google.cloud.metastore.v1alpha.ErrorDetails result = + new com.google.cloud.metastore.v1alpha.ErrorDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1alpha.ErrorDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.details_ = internalGetDetails(); + result.details_.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.ErrorDetails) { + return mergeFrom((com.google.cloud.metastore.v1alpha.ErrorDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1alpha.ErrorDetails other) { + if (other == com.google.cloud.metastore.v1alpha.ErrorDetails.getDefaultInstance()) + return this; + internalGetMutableDetails().mergeFrom(other.internalGetDetails()); + 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 details__ = + input.readMessage( + DetailsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDetails() + .getMutableMap() + .put(details__.getKey(), details__.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 details_; + + private com.google.protobuf.MapField internalGetDetails() { + if (details_ == null) { + return com.google.protobuf.MapField.emptyMapField(DetailsDefaultEntryHolder.defaultEntry); + } + return details_; + } + + private com.google.protobuf.MapField + internalGetMutableDetails() { + if (details_ == null) { + details_ = com.google.protobuf.MapField.newMapField(DetailsDefaultEntryHolder.defaultEntry); + } + if (!details_.isMutable()) { + details_ = details_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return details_; + } + + public int getDetailsCount() { + return internalGetDetails().getMap().size(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public boolean containsDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDetails().getMap().containsKey(key); + } + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDetails() { + return getDetailsMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.util.Map getDetailsMap() { + return internalGetDetails().getMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.lang.String getDetailsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDetails() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableDetails().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder removeDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableDetails().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableDetails() { + bitField0_ |= 0x00000001; + return internalGetMutableDetails().getMutableMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder putDetails(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableDetails().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder putAllDetails(java.util.Map values) { + internalGetMutableDetails().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.ErrorDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1alpha.ErrorDetails) + private static final com.google.cloud.metastore.v1alpha.ErrorDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1alpha.ErrorDetails(); + } + + public static com.google.cloud.metastore.v1alpha.ErrorDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.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.ErrorDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ErrorDetailsOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ErrorDetailsOrBuilder.java new file mode 100644 index 000000000000..4beab6b27882 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/ErrorDetailsOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1alpha/metastore.proto + +package com.google.cloud.metastore.v1alpha; + +public interface ErrorDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1alpha.ErrorDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + int getDetailsCount(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + boolean containsDetails(java.lang.String key); + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getDetails(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + java.util.Map getDetailsMap(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + /* nullable */ + java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + java.lang.String getDetailsOrThrow(java.lang.String key); +} 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 index c87c3a95b35e..c590ee1a6ce6 100644 --- 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 @@ -235,6 +235,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_ErrorDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ErrorDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1alpha_ErrorDetails_DetailsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1alpha_ErrorDetails_DetailsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_metastore_v1alpha_MoveTableToDatabaseRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -533,149 +541,152 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024QueryMetadataRequest\022:\n\007service\030\001 \001(\tB)" + "\342A\001\002\372A\"\n metastore.googleapis.com/Servic" + "e\022\023\n\005query\030\002 \001(\tB\004\342A\001\002\"4\n\025QueryMetadataR" - + "esponse\022\033\n\023result_manifest_uri\030\001 \001(\t\"\254\001\n" - + "\032MoveTableToDatabaseRequest\022:\n\007service\030\001" - + " \001(\tB)\342A\001\002\372A\"\n metastore.googleapis.com/" - + "Service\022\030\n\ntable_name\030\002 \001(\tB\004\342A\001\002\022\025\n\007db_" - + "name\030\003 \001(\tB\004\342A\001\002\022!\n\023destination_db_name\030" - + "\004 \001(\tB\004\342A\001\002\"\035\n\033MoveTableToDatabaseRespon" - + "se\"\233\001\n$AlterMetadataResourceLocationRequ" - + "est\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n metastore" - + ".googleapis.com/Service\022\033\n\rresource_name" - + "\030\002 \001(\tB\004\342A\001\002\022\032\n\014location_uri\030\003 \001(\tB\004\342A\001\002" - + "\"\'\n%AlterMetadataResourceLocationRespons" - + "e2\310%\n\021DataprocMetastore\022\275\001\n\014ListServices" - + "\0223.google.cloud.metastore.v1alpha.ListSe" - + "rvicesRequest\0324.google.cloud.metastore.v" - + "1alpha.ListServicesResponse\"B\332A\006parent\202\323" - + "\344\223\0023\0221/v1alpha/{parent=projects/*/locati" - + "ons/*}/services\022\252\001\n\nGetService\0221.google." - + "cloud.metastore.v1alpha.GetServiceReques" - + "t\032\'.google.cloud.metastore.v1alpha.Servi" - + "ce\"@\332A\004name\202\323\344\223\0023\0221/v1alpha/{name=projec" - + "ts/*/locations/*/services/*}\022\203\002\n\rCreateS" - + "ervice\0224.google.cloud.metastore.v1alpha." - + "CreateServiceRequest\032\035.google.longrunnin" - + "g.Operation\"\234\001\312A;\n\007Service\0220google.cloud" - + ".metastore.v1alpha.OperationMetadata\332A\031p" - + "arent,service,service_id\202\323\344\223\002<\"1/v1alpha" - + "/{parent=projects/*/locations/*}/service" - + "s:\007service\022\205\002\n\rUpdateService\0224.google.cl" - + "oud.metastore.v1alpha.UpdateServiceReque" - + "st\032\035.google.longrunning.Operation\"\236\001\312A;\n" - + "\007Service\0220google.cloud.metastore.v1alpha" - + ".OperationMetadata\332A\023service,update_mask" - + "\202\323\344\223\002D29/v1alpha/{service.name=projects/" - + "*/locations/*/services/*}:\007service\022\363\001\n\rD" - + "eleteService\0224.google.cloud.metastore.v1" - + "alpha.DeleteServiceRequest\032\035.google.long" - + "running.Operation\"\214\001\312AI\n\025google.protobuf" - + ".Empty\0220google.cloud.metastore.v1alpha.O" - + "perationMetadata\332A\004name\202\323\344\223\0023*1/v1alpha/" - + "{name=projects/*/locations/*/services/*}" - + "\022\344\001\n\023ListMetadataImports\022:.google.cloud." - + "metastore.v1alpha.ListMetadataImportsReq" - + "uest\032;.google.cloud.metastore.v1alpha.Li" - + "stMetadataImportsResponse\"T\332A\006parent\202\323\344\223" - + "\002E\022C/v1alpha/{parent=projects/*/location" - + "s/*/services/*}/metadataImports\022\321\001\n\021GetM" - + "etadataImport\0228.google.cloud.metastore.v" - + "1alpha.GetMetadataImportRequest\032..google" - + ".cloud.metastore.v1alpha.MetadataImport\"" - + "R\332A\004name\202\323\344\223\002E\022C/v1alpha/{name=projects/" - + "*/locations/*/services/*/metadataImports" - + "/*}\022\302\002\n\024CreateMetadataImport\022;.google.cl" - + "oud.metastore.v1alpha.CreateMetadataImpo" - + "rtRequest\032\035.google.longrunning.Operation" - + "\"\315\001\312AB\n\016MetadataImport\0220google.cloud.met" - + "astore.v1alpha.OperationMetadata\332A)paren" - + "t,metadata_import,metadata_import_id\202\323\344\223" - + "\002V\"C/v1alpha/{parent=projects/*/location" - + "s/*/services/*}/metadataImports:\017metadat" - + "a_import\022\304\002\n\024UpdateMetadataImport\022;.goog" - + "le.cloud.metastore.v1alpha.UpdateMetadat" - + "aImportRequest\032\035.google.longrunning.Oper" - + "ation\"\317\001\312AB\n\016MetadataImport\0220google.clou" - + "d.metastore.v1alpha.OperationMetadata\332A\033" - + "metadata_import,update_mask\202\323\344\223\002f2S/v1al" - + "pha/{metadata_import.name=projects/*/loc" - + "ations/*/services/*/metadataImports/*}:\017" - + "metadata_import\022\374\001\n\016ExportMetadata\0225.goo" - + "gle.cloud.metastore.v1alpha.ExportMetada" - + "taRequest\032\035.google.longrunning.Operation" - + "\"\223\001\312AB\n\016MetadataExport\0220google.cloud.met" - + "astore.v1alpha.OperationMetadata\202\323\344\223\002H\"C" - + "/v1alpha/{service=projects/*/locations/*" - + "/services/*}:exportMetadata:\001*\022\377\001\n\016Resto" - + "reService\0225.google.cloud.metastore.v1alp" - + "ha.RestoreServiceRequest\032\035.google.longru" - + "nning.Operation\"\226\001\312A;\n\007Restore\0220google.c" - + "loud.metastore.v1alpha.OperationMetadata" - + "\332A\016service,backup\202\323\344\223\002A\" details = 1; +} + // Request message for // [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1alpha.DataprocMetastore.MoveTableToDatabase]. message MoveTableToDatabaseRequest { diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ErrorDetails.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ErrorDetails.java new file mode 100644 index 000000000000..ddce74e594c7 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ErrorDetails.java @@ -0,0 +1,807 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +/** + * + * + *
+ * Error details in public error message for
+ * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
+ * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ErrorDetails} + */ +public final class ErrorDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.metastore.v1beta.ErrorDetails) + ErrorDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorDetails.newBuilder() to construct. + private ErrorDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorDetails() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto + .internal_static_google_cloud_metastore_v1beta_ErrorDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetDetails(); + 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_ErrorDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ErrorDetails.class, + com.google.cloud.metastore.v1beta.ErrorDetails.Builder.class); + } + + public static final int DETAILS_FIELD_NUMBER = 1; + + private static final class DetailsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.metastore.v1beta.MetastoreProto + .internal_static_google_cloud_metastore_v1beta_ErrorDetails_DetailsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField details_; + + private com.google.protobuf.MapField internalGetDetails() { + if (details_ == null) { + return com.google.protobuf.MapField.emptyMapField(DetailsDefaultEntryHolder.defaultEntry); + } + return details_; + } + + public int getDetailsCount() { + return internalGetDetails().getMap().size(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public boolean containsDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDetails().getMap().containsKey(key); + } + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDetails() { + return getDetailsMap(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.util.Map getDetailsMap() { + return internalGetDetails().getMap(); + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.lang.String getDetailsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().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, internalGetDetails(), DetailsDefaultEntryHolder.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 : + internalGetDetails().getMap().entrySet()) { + com.google.protobuf.MapEntry details__ = + DetailsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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.ErrorDetails)) { + return super.equals(obj); + } + com.google.cloud.metastore.v1beta.ErrorDetails other = + (com.google.cloud.metastore.v1beta.ErrorDetails) obj; + + if (!internalGetDetails().equals(other.internalGetDetails())) return false; + if (!getUnknownFields().equals(other.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 (!internalGetDetails().getMap().isEmpty()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + internalGetDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails parseFrom( + java.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.ErrorDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails parseFrom( + com.google.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.ErrorDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails 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.ErrorDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails parseFrom( + java.io.InputStream input, 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.ErrorDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails parseDelimitedFrom( + java.io.InputStream input, 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.ErrorDetails 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.ErrorDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @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.ErrorDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Error details in public error message for
+   * [DataprocMetastore.QueryMetadata][google.cloud.metastore.v1beta.DataprocMetastore.QueryMetadata].
+   * 
+ * + * Protobuf type {@code google.cloud.metastore.v1beta.ErrorDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.metastore.v1beta.ErrorDetails) + com.google.cloud.metastore.v1beta.ErrorDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.metastore.v1beta.MetastoreProto + .internal_static_google_cloud_metastore_v1beta_ErrorDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetDetails(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableDetails(); + 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_ErrorDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.metastore.v1beta.ErrorDetails.class, + com.google.cloud.metastore.v1beta.ErrorDetails.Builder.class); + } + + // Construct using com.google.cloud.metastore.v1beta.ErrorDetails.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableDetails().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_ErrorDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ErrorDetails getDefaultInstanceForType() { + return com.google.cloud.metastore.v1beta.ErrorDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ErrorDetails build() { + com.google.cloud.metastore.v1beta.ErrorDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.metastore.v1beta.ErrorDetails buildPartial() { + com.google.cloud.metastore.v1beta.ErrorDetails result = + new com.google.cloud.metastore.v1beta.ErrorDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.metastore.v1beta.ErrorDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.details_ = internalGetDetails(); + result.details_.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.ErrorDetails) { + return mergeFrom((com.google.cloud.metastore.v1beta.ErrorDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.metastore.v1beta.ErrorDetails other) { + if (other == com.google.cloud.metastore.v1beta.ErrorDetails.getDefaultInstance()) return this; + internalGetMutableDetails().mergeFrom(other.internalGetDetails()); + 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 details__ = + input.readMessage( + DetailsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDetails() + .getMutableMap() + .put(details__.getKey(), details__.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 details_; + + private com.google.protobuf.MapField internalGetDetails() { + if (details_ == null) { + return com.google.protobuf.MapField.emptyMapField(DetailsDefaultEntryHolder.defaultEntry); + } + return details_; + } + + private com.google.protobuf.MapField + internalGetMutableDetails() { + if (details_ == null) { + details_ = com.google.protobuf.MapField.newMapField(DetailsDefaultEntryHolder.defaultEntry); + } + if (!details_.isMutable()) { + details_ = details_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return details_; + } + + public int getDetailsCount() { + return internalGetDetails().getMap().size(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public boolean containsDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetDetails().getMap().containsKey(key); + } + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getDetails() { + return getDetailsMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.util.Map getDetailsMap() { + return internalGetDetails().getMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + @java.lang.Override + public java.lang.String getDetailsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetDetails().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearDetails() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableDetails().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder removeDetails(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableDetails().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableDetails() { + bitField0_ |= 0x00000001; + return internalGetMutableDetails().getMutableMap(); + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder putDetails(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableDetails().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * Additional structured details about this error.
+     *
+     * Keys define the failure items.
+     * Value describes the exception or details of the item.
+     * 
+ * + * map<string, string> details = 1; + */ + public Builder putAllDetails(java.util.Map values) { + internalGetMutableDetails().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.ErrorDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.metastore.v1beta.ErrorDetails) + private static final com.google.cloud.metastore.v1beta.ErrorDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.metastore.v1beta.ErrorDetails(); + } + + public static com.google.cloud.metastore.v1beta.ErrorDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.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.ErrorDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ErrorDetailsOrBuilder.java b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ErrorDetailsOrBuilder.java new file mode 100644 index 000000000000..c6aefe8dd622 --- /dev/null +++ b/java-dataproc-metastore/proto-google-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/ErrorDetailsOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/metastore/v1beta/metastore.proto + +package com.google.cloud.metastore.v1beta; + +public interface ErrorDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.metastore.v1beta.ErrorDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + int getDetailsCount(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + boolean containsDetails(java.lang.String key); + /** Use {@link #getDetailsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getDetails(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + java.util.Map getDetailsMap(); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + /* nullable */ + java.lang.String getDetailsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Additional structured details about this error.
+   *
+   * Keys define the failure items.
+   * Value describes the exception or details of the item.
+   * 
+ * + * map<string, string> details = 1; + */ + java.lang.String getDetailsOrThrow(java.lang.String key); +} 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 index 90fd3d813318..4460f673474b 100644 --- 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 @@ -235,6 +235,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_ErrorDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ErrorDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_metastore_v1beta_ErrorDetails_DetailsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_metastore_v1beta_ErrorDetails_DetailsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_metastore_v1beta_MoveTableToDatabaseRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -532,147 +540,150 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "aRequest\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n meta" + "store.googleapis.com/Service\022\023\n\005query\030\002 " + "\001(\tB\004\342A\001\002\"4\n\025QueryMetadataResponse\022\033\n\023re" - + "sult_manifest_uri\030\001 \001(\t\"\254\001\n\032MoveTableToD" - + "atabaseRequest\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"" - + "\n metastore.googleapis.com/Service\022\030\n\nta" - + "ble_name\030\002 \001(\tB\004\342A\001\002\022\025\n\007db_name\030\003 \001(\tB\004\342" - + "A\001\002\022!\n\023destination_db_name\030\004 \001(\tB\004\342A\001\002\"\035" - + "\n\033MoveTableToDatabaseResponse\"\233\001\n$AlterM" - + "etadataResourceLocationRequest\022:\n\007servic" - + "e\030\001 \001(\tB)\342A\001\002\372A\"\n metastore.googleapis.c" - + "om/Service\022\033\n\rresource_name\030\002 \001(\tB\004\342A\001\002\022" - + "\032\n\014location_uri\030\003 \001(\tB\004\342A\001\002\"\'\n%AlterMeta" - + "dataResourceLocationResponse2\217%\n\021Datapro" - + "cMetastore\022\272\001\n\014ListServices\0222.google.clo" - + "ud.metastore.v1beta.ListServicesRequest\032" - + "3.google.cloud.metastore.v1beta.ListServ" - + "icesResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1beta/{" - + "parent=projects/*/locations/*}/services\022" - + "\247\001\n\nGetService\0220.google.cloud.metastore." - + "v1beta.GetServiceRequest\032&.google.cloud." - + "metastore.v1beta.Service\"?\332A\004name\202\323\344\223\0022\022" - + "0/v1beta/{name=projects/*/locations/*/se" - + "rvices/*}\022\200\002\n\rCreateService\0223.google.clo" - + "ud.metastore.v1beta.CreateServiceRequest" - + "\032\035.google.longrunning.Operation\"\232\001\312A:\n\007S" - + "ervice\022/google.cloud.metastore.v1beta.Op" - + "erationMetadata\332A\031parent,service,service" - + "_id\202\323\344\223\002;\"0/v1beta/{parent=projects/*/lo" - + "cations/*}/services:\007service\022\202\002\n\rUpdateS" - + "ervice\0223.google.cloud.metastore.v1beta.U" - + "pdateServiceRequest\032\035.google.longrunning" - + ".Operation\"\234\001\312A:\n\007Service\022/google.cloud." - + "metastore.v1beta.OperationMetadata\332A\023ser" - + "vice,update_mask\202\323\344\223\002C28/v1beta/{service" - + ".name=projects/*/locations/*/services/*}" - + ":\007service\022\360\001\n\rDeleteService\0223.google.clo" - + "ud.metastore.v1beta.DeleteServiceRequest" - + "\032\035.google.longrunning.Operation\"\212\001\312AH\n\025g" - + "oogle.protobuf.Empty\022/google.cloud.metas" - + "tore.v1beta.OperationMetadata\332A\004name\202\323\344\223" - + "\0022*0/v1beta/{name=projects/*/locations/*" - + "/services/*}\022\341\001\n\023ListMetadataImports\0229.g" - + "oogle.cloud.metastore.v1beta.ListMetadat" - + "aImportsRequest\032:.google.cloud.metastore" - + ".v1beta.ListMetadataImportsResponse\"S\332A\006" - + "parent\202\323\344\223\002D\022B/v1beta/{parent=projects/*" - + "/locations/*/services/*}/metadataImports" - + "\022\316\001\n\021GetMetadataImport\0227.google.cloud.me" - + "tastore.v1beta.GetMetadataImportRequest\032" - + "-.google.cloud.metastore.v1beta.Metadata" - + "Import\"Q\332A\004name\202\323\344\223\002D\022B/v1beta/{name=pro" - + "jects/*/locations/*/services/*/metadataI" - + "mports/*}\022\277\002\n\024CreateMetadataImport\022:.goo" - + "gle.cloud.metastore.v1beta.CreateMetadat" - + "aImportRequest\032\035.google.longrunning.Oper" - + "ation\"\313\001\312AA\n\016MetadataImport\022/google.clou" - + "d.metastore.v1beta.OperationMetadata\332A)p" - + "arent,metadata_import,metadata_import_id" - + "\202\323\344\223\002U\"B/v1beta/{parent=projects/*/locat" - + "ions/*/services/*}/metadataImports:\017meta" - + "data_import\022\301\002\n\024UpdateMetadataImport\022:.g" - + "oogle.cloud.metastore.v1beta.UpdateMetad" - + "ataImportRequest\032\035.google.longrunning.Op" - + "eration\"\315\001\312AA\n\016MetadataImport\022/google.cl" + + "sult_manifest_uri\030\001 \001(\t\"\211\001\n\014ErrorDetails" + + "\022I\n\007details\030\001 \003(\01328.google.cloud.metasto" + + "re.v1beta.ErrorDetails.DetailsEntry\032.\n\014D" + + "etailsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"\254\001\n\032MoveTableToDatabaseRequest\022:\n\007se" + + "rvice\030\001 \001(\tB)\342A\001\002\372A\"\n metastore.googleap" + + "is.com/Service\022\030\n\ntable_name\030\002 \001(\tB\004\342A\001\002" + + "\022\025\n\007db_name\030\003 \001(\tB\004\342A\001\002\022!\n\023destination_d" + + "b_name\030\004 \001(\tB\004\342A\001\002\"\035\n\033MoveTableToDatabas" + + "eResponse\"\233\001\n$AlterMetadataResourceLocat" + + "ionRequest\022:\n\007service\030\001 \001(\tB)\342A\001\002\372A\"\n me" + + "tastore.googleapis.com/Service\022\033\n\rresour" + + "ce_name\030\002 \001(\tB\004\342A\001\002\022\032\n\014location_uri\030\003 \001(" + + "\tB\004\342A\001\002\"\'\n%AlterMetadataResourceLocation" + + "Response2\217%\n\021DataprocMetastore\022\272\001\n\014ListS" + + "ervices\0222.google.cloud.metastore.v1beta." + + "ListServicesRequest\0323.google.cloud.metas" + + "tore.v1beta.ListServicesResponse\"A\332A\006par" + + "ent\202\323\344\223\0022\0220/v1beta/{parent=projects/*/lo" + + "cations/*}/services\022\247\001\n\nGetService\0220.goo" + + "gle.cloud.metastore.v1beta.GetServiceReq" + + "uest\032&.google.cloud.metastore.v1beta.Ser" + + "vice\"?\332A\004name\202\323\344\223\0022\0220/v1beta/{name=proje" + + "cts/*/locations/*/services/*}\022\200\002\n\rCreate" + + "Service\0223.google.cloud.metastore.v1beta." + + "CreateServiceRequest\032\035.google.longrunnin" + + "g.Operation\"\232\001\312A:\n\007Service\022/google.cloud" + + ".metastore.v1beta.OperationMetadata\332A\031pa" + + "rent,service,service_id\202\323\344\223\002;\"0/v1beta/{" + + "parent=projects/*/locations/*}/services:" + + "\007service\022\202\002\n\rUpdateService\0223.google.clou" + + "d.metastore.v1beta.UpdateServiceRequest\032" + + "\035.google.longrunning.Operation\"\234\001\312A:\n\007Se" + + "rvice\022/google.cloud.metastore.v1beta.Ope" + + "rationMetadata\332A\023service,update_mask\202\323\344\223" + + "\002C28/v1beta/{service.name=projects/*/loc" + + "ations/*/services/*}:\007service\022\360\001\n\rDelete" + + "Service\0223.google.cloud.metastore.v1beta." + + "DeleteServiceRequest\032\035.google.longrunnin" + + "g.Operation\"\212\001\312AH\n\025google.protobuf.Empty" + + "\022/google.cloud.metastore.v1beta.Operatio" + + "nMetadata\332A\004name\202\323\344\223\0022*0/v1beta/{name=pr" + + "ojects/*/locations/*/services/*}\022\341\001\n\023Lis" + + "tMetadataImports\0229.google.cloud.metastor" + + "e.v1beta.ListMetadataImportsRequest\032:.go" + + "ogle.cloud.metastore.v1beta.ListMetadata" + + "ImportsResponse\"S\332A\006parent\202\323\344\223\002D\022B/v1bet" + + "a/{parent=projects/*/locations/*/service" + + "s/*}/metadataImports\022\316\001\n\021GetMetadataImpo" + + "rt\0227.google.cloud.metastore.v1beta.GetMe" + + "tadataImportRequest\032-.google.cloud.metas" + + "tore.v1beta.MetadataImport\"Q\332A\004name\202\323\344\223\002" + + "D\022B/v1beta/{name=projects/*/locations/*/" + + "services/*/metadataImports/*}\022\277\002\n\024Create" + + "MetadataImport\022:.google.cloud.metastore." + + "v1beta.CreateMetadataImportRequest\032\035.goo" + + "gle.longrunning.Operation\"\313\001\312AA\n\016Metadat" + + "aImport\022/google.cloud.metastore.v1beta.O" + + "perationMetadata\332A)parent,metadata_impor" + + "t,metadata_import_id\202\323\344\223\002U\"B/v1beta/{par" + + "ent=projects/*/locations/*/services/*}/m" + + "etadataImports:\017metadata_import\022\301\002\n\024Upda" + + "teMetadataImport\022:.google.cloud.metastor" + + "e.v1beta.UpdateMetadataImportRequest\032\035.g" + + "oogle.longrunning.Operation\"\315\001\312AA\n\016Metad" + + "ataImport\022/google.cloud.metastore.v1beta" + + ".OperationMetadata\332A\033metadata_import,upd" + + "ate_mask\202\323\344\223\002e2R/v1beta/{metadata_import" + + ".name=projects/*/locations/*/services/*/" + + "metadataImports/*}:\017metadata_import\022\371\001\n\016" + + "ExportMetadata\0224.google.cloud.metastore." + + "v1beta.ExportMetadataRequest\032\035.google.lo" + + "ngrunning.Operation\"\221\001\312AA\n\016MetadataExpor" + + "t\022/google.cloud.metastore.v1beta.Operati" + + "onMetadata\202\323\344\223\002G\"B/v1beta/{service=proje" + + "cts/*/locations/*/services/*}:exportMeta" + + "data:\001*\022\374\001\n\016RestoreService\0224.google.clou" + + "d.metastore.v1beta.RestoreServiceRequest" + + "\032\035.google.longrunning.Operation\"\224\001\312A:\n\007R" + + "estore\022/google.cloud.metastore.v1beta.Op" + + "erationMetadata\332A\016service,backup\202\323\344\223\002@\";" + + "/v1beta/{service=projects/*/locations/*/" + + "services/*}:restore:\001*\022\301\001\n\013ListBackups\0221" + + ".google.cloud.metastore.v1beta.ListBacku" + + "psRequest\0322.google.cloud.metastore.v1bet" + + "a.ListBackupsResponse\"K\332A\006parent\202\323\344\223\002<\022:" + + "/v1beta/{parent=projects/*/locations/*/s" + + "ervices/*}/backups\022\256\001\n\tGetBackup\022/.googl" + + "e.cloud.metastore.v1beta.GetBackupReques" + + "t\032%.google.cloud.metastore.v1beta.Backup" + + "\"I\332A\004name\202\323\344\223\002<\022:/v1beta/{name=projects/" + + "*/locations/*/services/*/backups/*}\022\204\002\n\014" + + "CreateBackup\0222.google.cloud.metastore.v1" + + "beta.CreateBackupRequest\032\035.google.longru" + + "nning.Operation\"\240\001\312A9\n\006Backup\022/google.cl" + "oud.metastore.v1beta.OperationMetadata\332A" - + "\033metadata_import,update_mask\202\323\344\223\002e2R/v1b" - + "eta/{metadata_import.name=projects/*/loc" - + "ations/*/services/*/metadataImports/*}:\017" - + "metadata_import\022\371\001\n\016ExportMetadata\0224.goo" - + "gle.cloud.metastore.v1beta.ExportMetadat" - + "aRequest\032\035.google.longrunning.Operation\"" - + "\221\001\312AA\n\016MetadataExport\022/google.cloud.meta" - + "store.v1beta.OperationMetadata\202\323\344\223\002G\"B/v" - + "1beta/{service=projects/*/locations/*/se" - + "rvices/*}:exportMetadata:\001*\022\374\001\n\016RestoreS" - + "ervice\0224.google.cloud.metastore.v1beta.R" - + "estoreServiceRequest\032\035.google.longrunnin" - + "g.Operation\"\224\001\312A:\n\007Restore\022/google.cloud" - + ".metastore.v1beta.OperationMetadata\332A\016se" - + "rvice,backup\202\323\344\223\002@\";/v1beta/{service=pro" - + "jects/*/locations/*/services/*}:restore:" - + "\001*\022\301\001\n\013ListBackups\0221.google.cloud.metast" - + "ore.v1beta.ListBackupsRequest\0322.google.c" - + "loud.metastore.v1beta.ListBackupsRespons" - + "e\"K\332A\006parent\202\323\344\223\002<\022:/v1beta/{parent=proj" - + "ects/*/locations/*/services/*}/backups\022\256" - + "\001\n\tGetBackup\022/.google.cloud.metastore.v1" - + "beta.GetBackupRequest\032%.google.cloud.met" - + "astore.v1beta.Backup\"I\332A\004name\202\323\344\223\002<\022:/v1" - + "beta/{name=projects/*/locations/*/servic" - + "es/*/backups/*}\022\204\002\n\014CreateBackup\0222.googl" - + "e.cloud.metastore.v1beta.CreateBackupReq" - + "uest\032\035.google.longrunning.Operation\"\240\001\312A" - + "9\n\006Backup\022/google.cloud.metastore.v1beta" - + ".OperationMetadata\332A\027parent,backup,backu" - + "p_id\202\323\344\223\002D\":/v1beta/{parent=projects/*/l" - + "ocations/*/services/*}/backups:\006backup\022\370" - + "\001\n\014DeleteBackup\0222.google.cloud.metastore" - + ".v1beta.DeleteBackupRequest\032\035.google.lon" - + "grunning.Operation\"\224\001\312AH\n\025google.protobu" - + "f.Empty\022/google.cloud.metastore.v1beta.O" - + "perationMetadata\332A\004name\202\323\344\223\002<*:/v1beta/{" - + "name=projects/*/locations/*/services/*/b" - + "ackups/*}\022\324\001\n\017RemoveIamPolicy\0225.google.c" - + "loud.metastore.v1beta.RemoveIamPolicyReq" - + "uest\0326.google.cloud.metastore.v1beta.Rem" - + "oveIamPolicyResponse\"R\202\323\344\223\002L\"G/v1beta/{r" - + "esource=projects/*/locations/*/services/" - + "*/**}:removeIamPolicy:\001*\022\375\001\n\rQueryMetada" - + "ta\0223.google.cloud.metastore.v1beta.Query" - + "MetadataRequest\032\035.google.longrunning.Ope" - + "ration\"\227\001\312AH\n\025QueryMetadataResponse\022/goo" - + "gle.cloud.metastore.v1beta.OperationMeta" - + "data\202\323\344\223\002F\"A/v1beta/{service=projects/*/" - + "locations/*/services/*}:queryMetadata:\001*" - + "\022\225\002\n\023MoveTableToDatabase\0229.google.cloud." - + "metastore.v1beta.MoveTableToDatabaseRequ" - + "est\032\035.google.longrunning.Operation\"\243\001\312AN" - + "\n\033MoveTableToDatabaseResponse\022/google.cl" - + "oud.metastore.v1beta.OperationMetadata\202\323" - + "\344\223\002L\"G/v1beta/{service=projects/*/locati" - + "ons/*/services/*}:moveTableToDatabase:\001*" - + "\022\255\002\n\035AlterMetadataResourceLocation\022C.goo" - + "gle.cloud.metastore.v1beta.AlterMetadata" - + "ResourceLocationRequest\032\035.google.longrun" - + "ning.Operation\"\247\001\312AX\n%AlterMetadataResou" - + "rceLocationResponse\022/google.cloud.metast" - + "ore.v1beta.OperationMetadata\202\323\344\223\002F\"A/v1b" - + "eta/{service=projects/*/locations/*/serv" - + "ices/*}:alterLocation:\001*\032L\312A\030metastore.g", - "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\242\003\n!com.google.cl" - + "oud.metastore.v1betaB\016MetastoreProtoP\001Z?" - + "cloud.google.com/go/metastore/apiv1beta/" - + "metastorepb;metastorepb\312\002\035Google\\Cloud\\M" - + "etastore\\V1beta\352AN\n\036compute.googleapis.c" - + "om/Network\022,projects/{project}/global/ne" - + "tworks/{network}\352Aa\n!compute.googleapis." - + "com/Subnetwork\022 details = 1; +} + // Request message for // [DataprocMetastore.MoveTableToDatabase][google.cloud.metastore.v1beta.DataprocMetastore.MoveTableToDatabase]. message MoveTableToDatabaseRequest { diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java new file mode 100644 index 000000000000..bfa2248461ae --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocation.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_AlterMetadataResourceLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.ServiceName; +import com.google.longrunning.Operation; + +public class AsyncAlterMetadataResourceLocation { + + public static void main(String[] args) throws Exception { + asyncAlterMetadataResourceLocation(); + } + + public static void asyncAlterMetadataResourceLocation() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_AlterMetadataResourceLocation_async] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java new file mode 100644 index 000000000000..33009edcc228 --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/AsyncAlterMetadataResourceLocationLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_AlterMetadataResourceLocation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.ServiceName; + +public class AsyncAlterMetadataResourceLocationLRO { + + public static void main(String[] args) throws Exception { + asyncAlterMetadataResourceLocationLRO(); + } + + public static void asyncAlterMetadataResourceLocationLRO() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_AlterMetadataResourceLocation_LRO_async] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java new file mode 100644 index 000000000000..b80ba580448d --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/altermetadataresourcelocation/SyncAlterMetadataResourceLocation.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_AlterMetadataResourceLocation_sync] +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationRequest; +import com.google.cloud.metastore.v1.AlterMetadataResourceLocationResponse; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.ServiceName; + +public class SyncAlterMetadataResourceLocation { + + public static void main(String[] args) throws Exception { + syncAlterMetadataResourceLocation(); + } + + public static void syncAlterMetadataResourceLocation() 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()) { + AlterMetadataResourceLocationRequest request = + AlterMetadataResourceLocationRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setResourceName("resourceName-384566343") + .setLocationUri("locationUri552310135") + .build(); + AlterMetadataResourceLocationResponse response = + dataprocMetastoreClient.alterMetadataResourceLocationAsync(request).get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_AlterMetadataResourceLocation_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java new file mode 100644 index 000000000000..aa94091c453e --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabase.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_MoveTableToDatabase_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.ServiceName; +import com.google.longrunning.Operation; + +public class AsyncMoveTableToDatabase { + + public static void main(String[] args) throws Exception { + asyncMoveTableToDatabase(); + } + + public static void asyncMoveTableToDatabase() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_MoveTableToDatabase_async] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java new file mode 100644 index 000000000000..3ce2ff3d9996 --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/AsyncMoveTableToDatabaseLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_MoveTableToDatabase_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.ServiceName; + +public class AsyncMoveTableToDatabaseLRO { + + public static void main(String[] args) throws Exception { + asyncMoveTableToDatabaseLRO(); + } + + public static void asyncMoveTableToDatabaseLRO() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_MoveTableToDatabase_LRO_async] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java new file mode 100644 index 000000000000..bf3072d2dea5 --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/movetabletodatabase/SyncMoveTableToDatabase.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_MoveTableToDatabase_sync] +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.MoveTableToDatabaseRequest; +import com.google.cloud.metastore.v1.MoveTableToDatabaseResponse; +import com.google.cloud.metastore.v1.ServiceName; + +public class SyncMoveTableToDatabase { + + public static void main(String[] args) throws Exception { + syncMoveTableToDatabase(); + } + + public static void syncMoveTableToDatabase() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_MoveTableToDatabase_sync] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/AsyncQueryMetadata.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/AsyncQueryMetadata.java new file mode 100644 index 000000000000..15e33462c98f --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/AsyncQueryMetadata.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_QueryMetadata_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.ServiceName; +import com.google.longrunning.Operation; + +public class AsyncQueryMetadata { + + public static void main(String[] args) throws Exception { + asyncQueryMetadata(); + } + + public static void asyncQueryMetadata() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_QueryMetadata_async] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java new file mode 100644 index 000000000000..894d8656d652 --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/AsyncQueryMetadataLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_QueryMetadata_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.OperationMetadata; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.QueryMetadataResponse; +import com.google.cloud.metastore.v1.ServiceName; + +public class AsyncQueryMetadataLRO { + + public static void main(String[] args) throws Exception { + asyncQueryMetadataLRO(); + } + + public static void asyncQueryMetadataLRO() 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()) { + 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(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_QueryMetadata_LRO_async] diff --git a/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/SyncQueryMetadata.java b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/SyncQueryMetadata.java new file mode 100644 index 000000000000..a6a13f6e4aed --- /dev/null +++ b/java-dataproc-metastore/samples/snippets/generated/com/google/cloud/metastore/v1/dataprocmetastore/querymetadata/SyncQueryMetadata.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.metastore.v1.samples; + +// [START metastore_v1_generated_DataprocMetastore_QueryMetadata_sync] +import com.google.cloud.metastore.v1.DataprocMetastoreClient; +import com.google.cloud.metastore.v1.QueryMetadataRequest; +import com.google.cloud.metastore.v1.QueryMetadataResponse; +import com.google.cloud.metastore.v1.ServiceName; + +public class SyncQueryMetadata { + + public static void main(String[] args) throws Exception { + syncQueryMetadata(); + } + + public static void syncQueryMetadata() 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()) { + QueryMetadataRequest request = + QueryMetadataRequest.newBuilder() + .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) + .setQuery("query107944136") + .build(); + QueryMetadataResponse response = dataprocMetastoreClient.queryMetadataAsync(request).get(); + } + } +} +// [END metastore_v1_generated_DataprocMetastore_QueryMetadata_sync]