Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit d0b5443

Browse files
chore(bazel): update version of Protobuf to v3.20.1 (#753)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 444328399 Source-Link: googleapis/googleapis@c7ca416 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d61705453a62b3ecda78aa30c192840ebc5a8a90 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYxNzA1NDUzYTYyYjNlY2RhNzhhYTMwYzE5Mjg0MGViYzVhOGE5MCJ9 feat: AuditConfig for IAM v1 PiperOrigin-RevId: 439356405 Source-Link: googleapis/googleapis@afa2ba1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3e40c17e1510c95fab58fc2143ccb61cceca5989 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2U0MGMxN2UxNTEwYzk1ZmFiNThmYzIxNDNjY2I2MWNjZWNhNTk4OSJ9
1 parent 2239667 commit d0b5443

File tree

59 files changed

+152
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+152
-15
lines changed

google-cloud-kms/src/main/java/com/google/cloud/kms/v1/EkmServiceClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ public final EkmConnection updateEkmConnection(UpdateEkmConnectionRequest reques
622622
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
623623
* .toString())
624624
* .setPolicy(Policy.newBuilder().build())
625+
* .setUpdateMask(FieldMask.newBuilder().build())
625626
* .build();
626627
* Policy response = ekmServiceClient.setIamPolicy(request);
627628
* }
@@ -650,6 +651,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
650651
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
651652
* .toString())
652653
* .setPolicy(Policy.newBuilder().build())
654+
* .setUpdateMask(FieldMask.newBuilder().build())
653655
* .build();
654656
* ApiFuture<Policy> future = ekmServiceClient.setIamPolicyCallable().futureCall(request);
655657
* // Do something.

google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3605,6 +3605,7 @@ public final GenerateRandomBytesResponse generateRandomBytes(GenerateRandomBytes
36053605
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
36063606
* .toString())
36073607
* .setPolicy(Policy.newBuilder().build())
3608+
* .setUpdateMask(FieldMask.newBuilder().build())
36083609
* .build();
36093610
* Policy response = keyManagementServiceClient.setIamPolicy(request);
36103611
* }
@@ -3695,6 +3696,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
36953696
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
36963697
* .toString())
36973698
* .setPolicy(Policy.newBuilder().build())
3699+
* .setUpdateMask(FieldMask.newBuilder().build())
36983700
* .build();
36993701
* ApiFuture<Policy> future =
37003702
* keyManagementServiceClient.setIamPolicyCallable().futureCall(request);

google-cloud-kms/src/test/java/com/google/cloud/kms/v1/EkmServiceClientTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.google.api.gax.rpc.ApiClientHeaderProvider;
2727
import com.google.api.gax.rpc.InvalidArgumentException;
2828
import com.google.common.collect.Lists;
29+
import com.google.iam.v1.AuditConfig;
2930
import com.google.iam.v1.Binding;
3031
import com.google.iam.v1.GetIamPolicyRequest;
3132
import com.google.iam.v1.GetPolicyOptions;
@@ -409,6 +410,7 @@ public void setIamPolicyTest() throws Exception {
409410
Policy.newBuilder()
410411
.setVersion(351608024)
411412
.addAllBindings(new ArrayList<Binding>())
413+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
412414
.setEtag(ByteString.EMPTY)
413415
.build();
414416
mockIAMPolicy.addResponse(expectedResponse);
@@ -419,6 +421,7 @@ public void setIamPolicyTest() throws Exception {
419421
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
420422
.toString())
421423
.setPolicy(Policy.newBuilder().build())
424+
.setUpdateMask(FieldMask.newBuilder().build())
422425
.build();
423426

424427
Policy actualResponse = client.setIamPolicy(request);
@@ -430,6 +433,7 @@ public void setIamPolicyTest() throws Exception {
430433

431434
Assert.assertEquals(request.getResource(), actualRequest.getResource());
432435
Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy());
436+
Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask());
433437
Assert.assertTrue(
434438
channelProvider.isHeaderSent(
435439
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -448,6 +452,7 @@ public void setIamPolicyExceptionTest() throws Exception {
448452
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
449453
.toString())
450454
.setPolicy(Policy.newBuilder().build())
455+
.setUpdateMask(FieldMask.newBuilder().build())
451456
.build();
452457
client.setIamPolicy(request);
453458
Assert.fail("No exception raised");
@@ -462,6 +467,7 @@ public void getIamPolicyTest() throws Exception {
462467
Policy.newBuilder()
463468
.setVersion(351608024)
464469
.addAllBindings(new ArrayList<Binding>())
470+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
465471
.setEtag(ByteString.EMPTY)
466472
.build();
467473
mockIAMPolicy.addResponse(expectedResponse);

google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.google.api.gax.rpc.InvalidArgumentException;
3131
import com.google.api.resourcenames.ResourceName;
3232
import com.google.common.collect.Lists;
33+
import com.google.iam.v1.AuditConfig;
3334
import com.google.iam.v1.Binding;
3435
import com.google.iam.v1.GetIamPolicyRequest;
3536
import com.google.iam.v1.GetPolicyOptions;
@@ -2526,6 +2527,7 @@ public void setIamPolicyTest() throws Exception {
25262527
Policy.newBuilder()
25272528
.setVersion(351608024)
25282529
.addAllBindings(new ArrayList<Binding>())
2530+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
25292531
.setEtag(ByteString.EMPTY)
25302532
.build();
25312533
mockIAMPolicy.addResponse(expectedResponse);
@@ -2536,6 +2538,7 @@ public void setIamPolicyTest() throws Exception {
25362538
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
25372539
.toString())
25382540
.setPolicy(Policy.newBuilder().build())
2541+
.setUpdateMask(FieldMask.newBuilder().build())
25392542
.build();
25402543

25412544
Policy actualResponse = client.setIamPolicy(request);
@@ -2547,6 +2550,7 @@ public void setIamPolicyTest() throws Exception {
25472550

25482551
Assert.assertEquals(request.getResource(), actualRequest.getResource());
25492552
Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy());
2553+
Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask());
25502554
Assert.assertTrue(
25512555
channelProvider.isHeaderSent(
25522556
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -2565,6 +2569,7 @@ public void setIamPolicyExceptionTest() throws Exception {
25652569
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
25662570
.toString())
25672571
.setPolicy(Policy.newBuilder().build())
2572+
.setUpdateMask(FieldMask.newBuilder().build())
25682573
.build();
25692574
client.setIamPolicy(request);
25702575
Assert.fail("No exception raised");
@@ -2579,6 +2584,7 @@ public void getIamPolicyTest() throws Exception {
25792584
Policy.newBuilder()
25802585
.setVersion(351608024)
25812586
.addAllBindings(new ArrayList<Binding>())
2587+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
25822588
.setEtag(ByteString.EMPTY)
25832589
.build();
25842590
mockIAMPolicy.addResponse(expectedResponse);

proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ private AsymmetricDecryptRequest(
110110
}
111111
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
112112
throw e.setUnfinishedMessage(this);
113+
} catch (com.google.protobuf.UninitializedMessageException e) {
114+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
113115
} catch (java.io.IOException e) {
114116
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
115117
} finally {

proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ private AsymmetricDecryptResponse(
115115
}
116116
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
117117
throw e.setUnfinishedMessage(this);
118+
} catch (com.google.protobuf.UninitializedMessageException e) {
119+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
118120
} catch (java.io.IOException e) {
119121
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
120122
} finally {

proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ private AsymmetricSignRequest(
140140
}
141141
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
142142
throw e.setUnfinishedMessage(this);
143+
} catch (com.google.protobuf.UninitializedMessageException e) {
144+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
143145
} catch (java.io.IOException e) {
144146
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
145147
} finally {

proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ private AsymmetricSignResponse(
128128
}
129129
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
130130
throw e.setUnfinishedMessage(this);
131+
} catch (com.google.protobuf.UninitializedMessageException e) {
132+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
131133
} catch (java.io.IOException e) {
132134
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
133135
} finally {

proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/Certificate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ private Certificate(
166166
}
167167
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
168168
throw e.setUnfinishedMessage(this);
169+
} catch (com.google.protobuf.UninitializedMessageException e) {
170+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
169171
} catch (java.io.IOException e) {
170172
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
171173
} finally {

proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CreateCryptoKeyRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ private CreateCryptoKeyRequest(
117117
}
118118
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
119119
throw e.setUnfinishedMessage(this);
120+
} catch (com.google.protobuf.UninitializedMessageException e) {
121+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
120122
} catch (java.io.IOException e) {
121123
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
122124
} finally {

0 commit comments

Comments
 (0)