Skip to content

Commit

Permalink
chore(bigtable): fix service name in resource annotation Type URIs (#…
Browse files Browse the repository at this point in the history
…1055)

* chore(bigtable): fix service name in resource annotation Type URIs

PiperOrigin-RevId: 406846449

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Nov 1 09:36:19 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: f2afd8f4e897bcf8b6235ff3d5bd1860323877fb
Source-Link: googleapis/googleapis@f2afd8f

* chore: update Java and Python dependencies

PiperOrigin-RevId: 408420890

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Nov 8 13:03:45 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 2921f9fb3bfbd16f6b2da0104373e2b47a80a65e
Source-Link: googleapis/googleapis@2921f9f
  • Loading branch information
yoshi-automation committed Nov 12, 2021
1 parent 57c4a42 commit 734b4e6
Show file tree
Hide file tree
Showing 16 changed files with 670 additions and 661 deletions.
Expand Up @@ -52,7 +52,6 @@
import com.google.bigtable.admin.v2.PartialUpdateInstanceRequest;
import com.google.bigtable.admin.v2.ProjectName;
import com.google.bigtable.admin.v2.StorageType;
import com.google.bigtable.admin.v2.TableName;
import com.google.bigtable.admin.v2.UpdateAppProfileRequest;
import com.google.common.collect.Lists;
import com.google.iam.v1.Binding;
Expand Down Expand Up @@ -1385,7 +1384,7 @@ public void getIamPolicyTest() throws Exception {
.build();
mockBigtableInstanceAdmin.addResponse(expectedResponse);

ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");

Policy actualResponse = client.getIamPolicy(resource);
Assert.assertEquals(expectedResponse, actualResponse);
Expand All @@ -1407,7 +1406,7 @@ public void getIamPolicyExceptionTest() throws Exception {
mockBigtableInstanceAdmin.addException(exception);

try {
ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
client.getIamPolicy(resource);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
Expand Down Expand Up @@ -1465,7 +1464,7 @@ public void setIamPolicyTest() throws Exception {
.build();
mockBigtableInstanceAdmin.addResponse(expectedResponse);

ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
Policy policy = Policy.newBuilder().build();

Policy actualResponse = client.setIamPolicy(resource, policy);
Expand All @@ -1489,7 +1488,7 @@ public void setIamPolicyExceptionTest() throws Exception {
mockBigtableInstanceAdmin.addException(exception);

try {
ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
Policy policy = Policy.newBuilder().build();
client.setIamPolicy(resource, policy);
Assert.fail("No exception raised");
Expand Down Expand Up @@ -1547,7 +1546,7 @@ public void testIamPermissionsTest() throws Exception {
TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList<String>()).build();
mockBigtableInstanceAdmin.addResponse(expectedResponse);

ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
List<String> permissions = new ArrayList<>();

TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
Expand All @@ -1571,7 +1570,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
mockBigtableInstanceAdmin.addException(exception);

try {
ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
List<String> permissions = new ArrayList<>();
client.testIamPermissions(resource, permissions);
Assert.fail("No exception raised");
Expand Down
Expand Up @@ -29,6 +29,7 @@
import com.google.api.gax.rpc.InvalidArgumentException;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.resourcenames.ResourceName;
import com.google.bigtable.admin.v2.AppProfileName;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.BackupName;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
Expand Down Expand Up @@ -1953,7 +1954,7 @@ public void getIamPolicyTest() throws Exception {
.build();
mockBigtableTableAdmin.addResponse(expectedResponse);

ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");

Policy actualResponse = client.getIamPolicy(resource);
Assert.assertEquals(expectedResponse, actualResponse);
Expand All @@ -1975,7 +1976,7 @@ public void getIamPolicyExceptionTest() throws Exception {
mockBigtableTableAdmin.addException(exception);

try {
ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
client.getIamPolicy(resource);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
Expand Down Expand Up @@ -2033,7 +2034,7 @@ public void setIamPolicyTest() throws Exception {
.build();
mockBigtableTableAdmin.addResponse(expectedResponse);

ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
Policy policy = Policy.newBuilder().build();

Policy actualResponse = client.setIamPolicy(resource, policy);
Expand All @@ -2057,7 +2058,7 @@ public void setIamPolicyExceptionTest() throws Exception {
mockBigtableTableAdmin.addException(exception);

try {
ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
Policy policy = Policy.newBuilder().build();
client.setIamPolicy(resource, policy);
Assert.fail("No exception raised");
Expand Down Expand Up @@ -2115,7 +2116,7 @@ public void testIamPermissionsTest() throws Exception {
TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList<String>()).build();
mockBigtableTableAdmin.addResponse(expectedResponse);

ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
List<String> permissions = new ArrayList<>();

TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
Expand All @@ -2139,7 +2140,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
mockBigtableTableAdmin.addException(exception);

try {
ResourceName resource = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ResourceName resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
List<String> permissions = new ArrayList<>();
client.testIamPermissions(resource, permissions);
Assert.fail("No exception raised");
Expand Down
Expand Up @@ -29,6 +29,7 @@
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/bigtable/admin/v2/bigtable_instance_admin.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BigtableInstanceAdminGrpc {

private BigtableInstanceAdminGrpc() {}
Expand Down
Expand Up @@ -29,6 +29,7 @@
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/bigtable/admin/v2/bigtable_table_admin.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BigtableTableAdminGrpc {

private BigtableTableAdminGrpc() {}
Expand Down
Expand Up @@ -27,6 +27,7 @@
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/bigtable/v2/bigtable.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BigtableGrpc {

private BigtableGrpc() {}
Expand Down

0 comments on commit 734b4e6

Please sign in to comment.