Skip to content

Commit 8c16fa4

Browse files
feat(autogenerated): Update BigtableTableAdmin GetIamPolicy to include 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
1 parent 62039e7 commit 8c16fa4

File tree

39 files changed

+1112
-1098
lines changed

39 files changed

+1112
-1098
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java

+4
Original file line numberDiff line numberDiff line change
@@ -1725,8 +1725,10 @@ public final void deleteAppProfile(String name) {
17251725
* <pre><code>
17261726
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
17271727
* AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
1728+
* boolean ignoreWarnings = false;
17281729
* DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
17291730
* .setName(name.toString())
1731+
* .setIgnoreWarnings(ignoreWarnings)
17301732
* .build();
17311733
* baseBigtableInstanceAdminClient.deleteAppProfile(request);
17321734
* }
@@ -1748,8 +1750,10 @@ public final void deleteAppProfile(DeleteAppProfileRequest request) {
17481750
* <pre><code>
17491751
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
17501752
* AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
1753+
* boolean ignoreWarnings = false;
17511754
* DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
17521755
* .setName(name.toString())
1756+
* .setIgnoreWarnings(ignoreWarnings)
17531757
* .build();
17541758
* ApiFuture&lt;Void&gt; future = baseBigtableInstanceAdminClient.deleteAppProfileCallable().futureCall(request);
17551759
* // Do something

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java

+30-15
Original file line numberDiff line numberDiff line change
@@ -1157,8 +1157,8 @@ public final CheckConsistencyResponse checkConsistency(CheckConsistencyRequest r
11571157

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

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

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

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

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

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

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

14471447
// AUTO-GENERATED DOCUMENTATION AND METHOD
14481448
/**
1449-
* Returns permissions that the caller has on the specified table resource.
1449+
* Returns permissions that the caller has on the specified Table or Backup resource.
14501450
*
14511451
* <p>Sample code:
14521452
*
@@ -2646,7 +2646,12 @@ public final UnaryCallable<DeleteBackupRequest, Empty> deleteBackupCallable() {
26462646
*
26472647
* <pre><code>
26482648
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
2649-
* RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
2649+
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
2650+
* String tableId = "";
2651+
* RestoreTableRequest request = RestoreTableRequest.newBuilder()
2652+
* .setParent(parent.toString())
2653+
* .setTableId(tableId)
2654+
* .build();
26502655
* Table response = baseBigtableTableAdminClient.restoreTableAsync(request).get();
26512656
* }
26522657
* </code></pre>
@@ -2675,7 +2680,12 @@ public final OperationFuture<Table, RestoreTableMetadata> restoreTableAsync(
26752680
*
26762681
* <pre><code>
26772682
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
2678-
* RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
2683+
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
2684+
* String tableId = "";
2685+
* RestoreTableRequest request = RestoreTableRequest.newBuilder()
2686+
* .setParent(parent.toString())
2687+
* .setTableId(tableId)
2688+
* .build();
26792689
* OperationFuture&lt;Table, RestoreTableMetadata&gt; future = baseBigtableTableAdminClient.restoreTableOperationCallable().futureCall(request);
26802690
* // Do something
26812691
* Table response = future.get();
@@ -2702,7 +2712,12 @@ public final OperationFuture<Table, RestoreTableMetadata> restoreTableAsync(
27022712
*
27032713
* <pre><code>
27042714
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
2705-
* RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
2715+
* InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
2716+
* String tableId = "";
2717+
* RestoreTableRequest request = RestoreTableRequest.newBuilder()
2718+
* .setParent(parent.toString())
2719+
* .setTableId(tableId)
2720+
* .build();
27062721
* ApiFuture&lt;Operation&gt; future = baseBigtableTableAdminClient.restoreTableCallable().futureCall(request);
27072722
* // Do something
27082723
* Operation response = future.get();

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,10 @@ public void restoreTableTest() throws Exception {
10941094
.build();
10951095
mockBigtableTableAdmin.addResponse(resultOperation);
10961096

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

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

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

11181123
try {
1119-
RestoreTableRequest request = RestoreTableRequest.newBuilder().build();
1124+
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
1125+
String tableId = "tableId-895419604";
1126+
RestoreTableRequest request =
1127+
RestoreTableRequest.newBuilder().setParent(parent.toString()).setTableId(tableId).build();
11201128

11211129
client.restoreTableAsync(request).get();
11221130
Assert.fail("No exception raised");

grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java

+32-32
Original file line numberDiff line numberDiff line change
@@ -1278,14 +1278,14 @@ public void deleteSnapshot(
12781278
*
12791279
*
12801280
* <pre>
1281-
* Starts creating a new Cloud Bigtable Backup. The returned backup
1281+
* Starts creating a new Cloud Bigtable Backup. The returned backup
12821282
* [long-running operation][google.longrunning.Operation] can be used to
12831283
* track creation of the backup. The
12841284
* [metadata][google.longrunning.Operation.metadata] field type is
12851285
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
12861286
* [response][google.longrunning.Operation.response] field type is
1287-
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
1288-
* returned operation will stop the creation and delete the backup.
1287+
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
1288+
* creation and delete the backup.
12891289
* </pre>
12901290
*/
12911291
public void createBackup(
@@ -1353,11 +1353,11 @@ public void listBackups(
13531353
*
13541354
* <pre>
13551355
* Create a new table by restoring from a completed backup. The new table
1356-
* must be in the same instance as the instance containing the backup. The
1356+
* must be in the same instance as the instance containing the backup. The
13571357
* returned table [long-running operation][google.longrunning.Operation] can
1358-
* be used to track the progress of the operation, and to cancel it. The
1358+
* be used to track the progress of the operation, and to cancel it. The
13591359
* [metadata][google.longrunning.Operation.metadata] field type is
1360-
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
1360+
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
13611361
* [response][google.longrunning.Operation.response] type is
13621362
* [Table][google.bigtable.admin.v2.Table], if successful.
13631363
* </pre>
@@ -1372,7 +1372,7 @@ public void restoreTable(
13721372
*
13731373
*
13741374
* <pre>
1375-
* Gets the access control policy for a resource.
1375+
* Gets the access control policy for a Table or Backup resource.
13761376
* Returns an empty policy if the resource exists but does not have a policy
13771377
* set.
13781378
* </pre>
@@ -1401,7 +1401,7 @@ public void setIamPolicy(
14011401
*
14021402
*
14031403
* <pre>
1404-
* Returns permissions that the caller has on the specified table resource.
1404+
* Returns permissions that the caller has on the specified Table or Backup resource.
14051405
* </pre>
14061406
*/
14071407
public void testIamPermissions(
@@ -1827,14 +1827,14 @@ public void deleteSnapshot(
18271827
*
18281828
*
18291829
* <pre>
1830-
* Starts creating a new Cloud Bigtable Backup. The returned backup
1830+
* Starts creating a new Cloud Bigtable Backup. The returned backup
18311831
* [long-running operation][google.longrunning.Operation] can be used to
18321832
* track creation of the backup. The
18331833
* [metadata][google.longrunning.Operation.metadata] field type is
18341834
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
18351835
* [response][google.longrunning.Operation.response] field type is
1836-
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
1837-
* returned operation will stop the creation and delete the backup.
1836+
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
1837+
* creation and delete the backup.
18381838
* </pre>
18391839
*/
18401840
public void createBackup(
@@ -1915,11 +1915,11 @@ public void listBackups(
19151915
*
19161916
* <pre>
19171917
* Create a new table by restoring from a completed backup. The new table
1918-
* must be in the same instance as the instance containing the backup. The
1918+
* must be in the same instance as the instance containing the backup. The
19191919
* returned table [long-running operation][google.longrunning.Operation] can
1920-
* be used to track the progress of the operation, and to cancel it. The
1920+
* be used to track the progress of the operation, and to cancel it. The
19211921
* [metadata][google.longrunning.Operation.metadata] field type is
1922-
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
1922+
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
19231923
* [response][google.longrunning.Operation.response] type is
19241924
* [Table][google.bigtable.admin.v2.Table], if successful.
19251925
* </pre>
@@ -1937,7 +1937,7 @@ public void restoreTable(
19371937
*
19381938
*
19391939
* <pre>
1940-
* Gets the access control policy for a resource.
1940+
* Gets the access control policy for a Table or Backup resource.
19411941
* Returns an empty policy if the resource exists but does not have a policy
19421942
* set.
19431943
* </pre>
@@ -1972,7 +1972,7 @@ public void setIamPolicy(
19721972
*
19731973
*
19741974
* <pre>
1975-
* Returns permissions that the caller has on the specified table resource.
1975+
* Returns permissions that the caller has on the specified Table or Backup resource.
19761976
* </pre>
19771977
*/
19781978
public void testIamPermissions(
@@ -2211,14 +2211,14 @@ public com.google.protobuf.Empty deleteSnapshot(
22112211
*
22122212
*
22132213
* <pre>
2214-
* Starts creating a new Cloud Bigtable Backup. The returned backup
2214+
* Starts creating a new Cloud Bigtable Backup. The returned backup
22152215
* [long-running operation][google.longrunning.Operation] can be used to
22162216
* track creation of the backup. The
22172217
* [metadata][google.longrunning.Operation.metadata] field type is
22182218
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
22192219
* [response][google.longrunning.Operation.response] field type is
2220-
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
2221-
* returned operation will stop the creation and delete the backup.
2220+
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
2221+
* creation and delete the backup.
22222222
* </pre>
22232223
*/
22242224
public com.google.longrunning.Operation createBackup(
@@ -2280,11 +2280,11 @@ public com.google.bigtable.admin.v2.ListBackupsResponse listBackups(
22802280
*
22812281
* <pre>
22822282
* Create a new table by restoring from a completed backup. The new table
2283-
* must be in the same instance as the instance containing the backup. The
2283+
* must be in the same instance as the instance containing the backup. The
22842284
* returned table [long-running operation][google.longrunning.Operation] can
2285-
* be used to track the progress of the operation, and to cancel it. The
2285+
* be used to track the progress of the operation, and to cancel it. The
22862286
* [metadata][google.longrunning.Operation.metadata] field type is
2287-
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
2287+
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
22882288
* [response][google.longrunning.Operation.response] type is
22892289
* [Table][google.bigtable.admin.v2.Table], if successful.
22902290
* </pre>
@@ -2298,7 +2298,7 @@ public com.google.longrunning.Operation restoreTable(
22982298
*
22992299
*
23002300
* <pre>
2301-
* Gets the access control policy for a resource.
2301+
* Gets the access control policy for a Table or Backup resource.
23022302
* Returns an empty policy if the resource exists but does not have a policy
23032303
* set.
23042304
* </pre>
@@ -2323,7 +2323,7 @@ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyReque
23232323
*
23242324
*
23252325
* <pre>
2326-
* Returns permissions that the caller has on the specified table resource.
2326+
* Returns permissions that the caller has on the specified Table or Backup resource.
23272327
* </pre>
23282328
*/
23292329
public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(
@@ -2571,14 +2571,14 @@ protected BigtableTableAdminFutureStub build(
25712571
*
25722572
*
25732573
* <pre>
2574-
* Starts creating a new Cloud Bigtable Backup. The returned backup
2574+
* Starts creating a new Cloud Bigtable Backup. The returned backup
25752575
* [long-running operation][google.longrunning.Operation] can be used to
25762576
* track creation of the backup. The
25772577
* [metadata][google.longrunning.Operation.metadata] field type is
25782578
* [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
25792579
* [response][google.longrunning.Operation.response] field type is
2580-
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
2581-
* returned operation will stop the creation and delete the backup.
2580+
* [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the returned operation will stop the
2581+
* creation and delete the backup.
25822582
* </pre>
25832583
*/
25842584
public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
@@ -2645,11 +2645,11 @@ protected BigtableTableAdminFutureStub build(
26452645
*
26462646
* <pre>
26472647
* Create a new table by restoring from a completed backup. The new table
2648-
* must be in the same instance as the instance containing the backup. The
2648+
* must be in the same instance as the instance containing the backup. The
26492649
* returned table [long-running operation][google.longrunning.Operation] can
2650-
* be used to track the progress of the operation, and to cancel it. The
2650+
* be used to track the progress of the operation, and to cancel it. The
26512651
* [metadata][google.longrunning.Operation.metadata] field type is
2652-
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
2652+
* [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
26532653
* [response][google.longrunning.Operation.response] type is
26542654
* [Table][google.bigtable.admin.v2.Table], if successful.
26552655
* </pre>
@@ -2664,7 +2664,7 @@ protected BigtableTableAdminFutureStub build(
26642664
*
26652665
*
26662666
* <pre>
2667-
* Gets the access control policy for a resource.
2667+
* Gets the access control policy for a Table or Backup resource.
26682668
* Returns an empty policy if the resource exists but does not have a policy
26692669
* set.
26702670
* </pre>
@@ -2693,7 +2693,7 @@ protected BigtableTableAdminFutureStub build(
26932693
*
26942694
*
26952695
* <pre>
2696-
* Returns permissions that the caller has on the specified table resource.
2696+
* Returns permissions that the caller has on the specified Table or Backup resource.
26972697
* </pre>
26982698
*/
26992699
public com.google.common.util.concurrent.ListenableFuture<

0 commit comments

Comments
 (0)