Skip to content
Permalink
Browse files
feat(autogenerated): Update BigtableTableAdmin GetIamPolicy to includ…
…e the additional binding for Backup, Change DeleteAppProfileRequest.ignore_warnings to REQUIRED. (#530)

PiperOrigin-RevId: 339464550

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Oct 28 08:32:48 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: ccd6462d31e6422fd188b6590aa8d0ad03e7d9a3
Source-Link: googleapis/googleapis@ccd6462
  • Loading branch information
yoshi-automation committed Nov 12, 2020
1 parent 62039e7 commit 8c16fa4c5290f67c43392953095bd759c2505bdb
Showing with 1,112 additions and 1,098 deletions.
  1. +4 −0 ...ud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java
  2. +30 −15 ...cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
  3. +10 −2 ...d-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java
  4. +32 −32 ...le-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java
  5. +106 −106 ...loud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminProto.java
  6. +307 −303 ...e-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java
  7. +14 −14 ...e-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java
  8. +4 −4 ...igtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequestOrBuilder.java
  9. +2 −4 ...oogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java
  10. +35 −35 ...-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java
  11. +10 −10 ...-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequestOrBuilder.java
  12. +14 −14 ...google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java
  13. +4 −4 ...oud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequestOrBuilder.java
  14. +8 −8 ...e-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java
  15. +2 −2 ...igtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequestOrBuilder.java
  16. +2 −4 ...oogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java
  17. +14 −14 ...bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java
  18. +4 −4 ...admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequestOrBuilder.java
  19. +2 −4 ...o-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java
  20. +51 −67 ...google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java
  21. +14 −18 ...oud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequestOrBuilder.java
  22. +16 −18 ...oogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java
  23. +4 −4 ...ud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponseOrBuilder.java
  24. +14 −14 ...ogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java
  25. +4 −4 ...d-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequestOrBuilder.java
  26. +14 −14 ...-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java
  27. +4 −4 ...loud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequestOrBuilder.java
  28. +92 −92 ...oud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java
  29. +20 −20 ...ble-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequestOrBuilder.java
  30. +12 −24 ...ogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java
  31. +3 −6 ...d-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadataOrBuilder.java
  32. +42 −28 ...oogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java
  33. +12 −8 ...ud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequestOrBuilder.java
  34. +21 −21 ...ogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java
  35. +6 −6 ...d-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequestOrBuilder.java
  36. +2 −4 ...oogle-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java
  37. +6 −5 ...gle-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_instance_admin.proto
  38. +168 −159 ...google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto
  39. +3 −3 synth.metadata
@@ -1725,8 +1725,10 @@ public final void deleteAppProfile(String name) {
* <pre><code>
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
* AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
* boolean ignoreWarnings = false;
* DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
* .setName(name.toString())
* .setIgnoreWarnings(ignoreWarnings)
* .build();
* baseBigtableInstanceAdminClient.deleteAppProfile(request);
* }
@@ -1748,8 +1750,10 @@ public final void deleteAppProfile(DeleteAppProfileRequest request) {
* <pre><code>
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
* AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
* boolean ignoreWarnings = false;
* DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
* .setName(name.toString())
* .setIgnoreWarnings(ignoreWarnings)
* .build();
* ApiFuture&lt;Void&gt; future = baseBigtableInstanceAdminClient.deleteAppProfileCallable().futureCall(request);
* // Do something
@@ -1157,8 +1157,8 @@ public final CheckConsistencyResponse checkConsistency(CheckConsistencyRequest r

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* but does not have a policy set.
* Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
* resource exists but does not have a policy set.
*
* <p>Sample code:
*
@@ -1183,8 +1183,8 @@ public final Policy getIamPolicy(ResourceName resource) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* but does not have a policy set.
* Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
* resource exists but does not have a policy set.
*
* <p>Sample code:
*
@@ -1206,8 +1206,8 @@ public final Policy getIamPolicy(String resource) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* but does not have a policy set.
* Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
* resource exists but does not have a policy set.
*
* <p>Sample code:
*
@@ -1230,8 +1230,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the access control policy for a resource. Returns an empty policy if the resource exists
* but does not have a policy set.
* Gets the access control policy for a Table or Backup resource. Returns an empty policy if the
* resource exists but does not have a policy set.
*
* <p>Sample code:
*
@@ -1359,7 +1359,7 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
*
* <p>Sample code:
*
@@ -1390,7 +1390,7 @@ public final TestIamPermissionsResponse testIamPermissions(

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
*
* <p>Sample code:
*
@@ -1421,7 +1421,7 @@ public final TestIamPermissionsResponse testIamPermissions(

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
*
* <p>Sample code:
*
@@ -1446,7 +1446,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
*
* <p>Sample code:
*
@@ -2646,7 +2646,12 @@ public final UnaryCallable<DeleteBackupRequest, Empty> deleteBackupCallable() {
*
* <pre><code>
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
* RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
* String tableId = "";
* RestoreTableRequest request = RestoreTableRequest.newBuilder()
* .setParent(parent.toString())
* .setTableId(tableId)
* .build();
* Table response = baseBigtableTableAdminClient.restoreTableAsync(request).get();
* }
* </code></pre>
@@ -2675,7 +2680,12 @@ public final OperationFuture<Table, RestoreTableMetadata> restoreTableAsync(
*
* <pre><code>
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
* RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
* String tableId = "";
* RestoreTableRequest request = RestoreTableRequest.newBuilder()
* .setParent(parent.toString())
* .setTableId(tableId)
* .build();
* OperationFuture&lt;Table, RestoreTableMetadata&gt; future = baseBigtableTableAdminClient.restoreTableOperationCallable().futureCall(request);
* // Do something
* Table response = future.get();
@@ -2702,7 +2712,12 @@ public final OperationFuture<Table, RestoreTableMetadata> restoreTableAsync(
*
* <pre><code>
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
* RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
* String tableId = "";
* RestoreTableRequest request = RestoreTableRequest.newBuilder()
* .setParent(parent.toString())
* .setTableId(tableId)
* .build();
* ApiFuture&lt;Operation&gt; future = baseBigtableTableAdminClient.restoreTableCallable().futureCall(request);
* // Do something
* Operation response = future.get();
@@ -1094,7 +1094,10 @@ public void restoreTableTest() throws Exception {
.build();
mockBigtableTableAdmin.addResponse(resultOperation);

RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String tableId = "tableId-895419604";
RestoreTableRequest request =
RestoreTableRequest.newBuilder().setParent(parent.toString()).setTableId(tableId).build();

Table actualResponse = client.restoreTableAsync(request).get();
Assert.assertEquals(expectedResponse, actualResponse);
@@ -1103,6 +1106,8 @@ public void restoreTableTest() throws Exception {
Assert.assertEquals(1, actualRequests.size());
RestoreTableRequest actualRequest = (RestoreTableRequest) actualRequests.get(0);

Assert.assertEquals(parent, InstanceName.parse(actualRequest.getParent()));
Assert.assertEquals(tableId, actualRequest.getTableId());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -1116,7 +1121,10 @@ public void restoreTableExceptionTest() throws Exception {
mockBigtableTableAdmin.addException(exception);

try {
RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String tableId = "tableId-895419604";
RestoreTableRequest request =
RestoreTableRequest.newBuilder().setParent(parent.toString()).setTableId(tableId).build();

client.restoreTableAsync(request).get();
Assert.fail("No exception raised");
@@ -1278,14 +1278,14 @@ public void deleteSnapshot(
*
*
* <pre>
* Starts creating a new Cloud Bigtable Backup. The returned backup
* Starts creating a new Cloud Bigtable Backup. The returned backup
* [long-running operation][google.longrunning.Operation] can be used to
* track creation of the backup. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
* [response][google.longrunning.Operation.response] field type is
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
* returned operation will stop the creation and delete the backup.
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
* creation and delete the backup.
* </pre>
*/
public void createBackup(
@@ -1353,11 +1353,11 @@ public void listBackups(
*
* <pre>
* Create a new table by restoring from a completed backup. The new table
* must be in the same instance as the instance containing the backup. The
* must be in the same instance as the instance containing the backup. The
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
@@ -1372,7 +1372,7 @@ public void restoreTable(
*
*
* <pre>
* Gets the access control policy for a resource.
* Gets the access control policy for a Table or Backup resource.
* Returns an empty policy if the resource exists but does not have a policy
* set.
* </pre>
@@ -1401,7 +1401,7 @@ public void setIamPolicy(
*
*
* <pre>
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
* </pre>
*/
public void testIamPermissions(
@@ -1827,14 +1827,14 @@ public void deleteSnapshot(
*
*
* <pre>
* Starts creating a new Cloud Bigtable Backup. The returned backup
* Starts creating a new Cloud Bigtable Backup. The returned backup
* [long-running operation][google.longrunning.Operation] can be used to
* track creation of the backup. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
* [response][google.longrunning.Operation.response] field type is
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
* returned operation will stop the creation and delete the backup.
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
* creation and delete the backup.
* </pre>
*/
public void createBackup(
@@ -1915,11 +1915,11 @@ public void listBackups(
*
* <pre>
* Create a new table by restoring from a completed backup. The new table
* must be in the same instance as the instance containing the backup. The
* must be in the same instance as the instance containing the backup. The
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
@@ -1937,7 +1937,7 @@ public void restoreTable(
*
*
* <pre>
* Gets the access control policy for a resource.
* Gets the access control policy for a Table or Backup resource.
* Returns an empty policy if the resource exists but does not have a policy
* set.
* </pre>
@@ -1972,7 +1972,7 @@ public void setIamPolicy(
*
*
* <pre>
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
* </pre>
*/
public void testIamPermissions(
@@ -2211,14 +2211,14 @@ public com.google.protobuf.Empty deleteSnapshot(
*
*
* <pre>
* Starts creating a new Cloud Bigtable Backup. The returned backup
* Starts creating a new Cloud Bigtable Backup. The returned backup
* [long-running operation][google.longrunning.Operation] can be used to
* track creation of the backup. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
* [response][google.longrunning.Operation.response] field type is
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
* returned operation will stop the creation and delete the backup.
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
* creation and delete the backup.
* </pre>
*/
public com.google.longrunning.Operation createBackup(
@@ -2280,11 +2280,11 @@ public com.google.bigtable.admin.v2.ListBackupsResponse listBackups(
*
* <pre>
* Create a new table by restoring from a completed backup. The new table
* must be in the same instance as the instance containing the backup. The
* must be in the same instance as the instance containing the backup. The
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
@@ -2298,7 +2298,7 @@ public com.google.longrunning.Operation restoreTable(
*
*
* <pre>
* Gets the access control policy for a resource.
* Gets the access control policy for a Table or Backup resource.
* Returns an empty policy if the resource exists but does not have a policy
* set.
* </pre>
@@ -2323,7 +2323,7 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque
*
*
* <pre>
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
* </pre>
*/
public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(
@@ -2571,14 +2571,14 @@ protected BigtableTableAdminFutureStub build(
*
*
* <pre>
* Starts creating a new Cloud Bigtable Backup. The returned backup
* Starts creating a new Cloud Bigtable Backup. The returned backup
* [long-running operation][google.longrunning.Operation] can be used to
* track creation of the backup. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
* [response][google.longrunning.Operation.response] field type is
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
* returned operation will stop the creation and delete the backup.
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
* creation and delete the backup.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
@@ -2645,11 +2645,11 @@ protected BigtableTableAdminFutureStub build(
*
* <pre>
* Create a new table by restoring from a completed backup. The new table
* must be in the same instance as the instance containing the backup. The
* must be in the same instance as the instance containing the backup. The
* returned table [long-running operation][google.longrunning.Operation] can
* be used to track the progress of the operation, and to cancel it. The
* be used to track the progress of the operation, and to cancel it. The
* [metadata][google.longrunning.Operation.metadata] field type is
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
* [response][google.longrunning.Operation.response] type is
* [Table][google.bigtable.admin.v2.Table], if successful.
* </pre>
@@ -2664,7 +2664,7 @@ protected BigtableTableAdminFutureStub build(
*
*
* <pre>
* Gets the access control policy for a resource.
* Gets the access control policy for a Table or Backup resource.
* Returns an empty policy if the resource exists but does not have a policy
* set.
* </pre>
@@ -2693,7 +2693,7 @@ protected BigtableTableAdminFutureStub build(
*
*
* <pre>
* Returns permissions that the caller has on the specified table resource.
* Returns permissions that the caller has on the specified Table or Backup resource.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<

0 comments on commit 8c16fa4

Please sign in to comment.