Skip to content

Commit

Permalink
feat(autogenerated): Update BigtableTableAdmin GetIamPolicy to includ…
Browse files Browse the repository at this point in the history
…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 8c16fa4
Show file tree
Hide file tree
Showing 39 changed files with 1,112 additions and 1,098 deletions.
Expand Up @@ -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);
* }
Expand All @@ -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
Expand Down
Expand Up @@ -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:
*
Expand All @@ -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:
*
Expand All @@ -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:
*
Expand All @@ -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:
*
Expand Down Expand Up @@ -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:
*
Expand Down Expand Up @@ -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:
*
Expand Down Expand Up @@ -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:
*
Expand All @@ -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:
*
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Expand Up @@ -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);
Expand All @@ -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(),
Expand All @@ -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");
Expand Down
Expand Up @@ -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(
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand All @@ -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(
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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<
Expand Down

0 comments on commit 8c16fa4

Please sign in to comment.