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

Commit

Permalink
chore(bazel): update version of Protobuf to v3.20.1 (#753)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 444328399

Source-Link: googleapis/googleapis@c7ca416

Source-Link: googleapis/googleapis-gen@d617054
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYxNzA1NDUzYTYyYjNlY2RhNzhhYTMwYzE5Mjg0MGViYzVhOGE5MCJ9

feat: AuditConfig for IAM v1
PiperOrigin-RevId: 439356405

Source-Link: googleapis/googleapis@afa2ba1

Source-Link: googleapis/googleapis-gen@3e40c17
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2U0MGMxN2UxNTEwYzk1ZmFiNThmYzIxNDNjY2I2MWNjZWNhNTk4OSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Apr 28, 2022
1 parent 2239667 commit d0b5443
Show file tree
Hide file tree
Showing 59 changed files with 152 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ public final EkmConnection updateEkmConnection(UpdateEkmConnectionRequest reques
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* Policy response = ekmServiceClient.setIamPolicy(request);
* }
Expand Down Expand Up @@ -650,6 +651,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<Policy> future = ekmServiceClient.setIamPolicyCallable().futureCall(request);
* // Do something.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3605,6 +3605,7 @@ public final GenerateRandomBytesResponse generateRandomBytes(GenerateRandomBytes
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* Policy response = keyManagementServiceClient.setIamPolicy(request);
* }
Expand Down Expand Up @@ -3695,6 +3696,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<Policy> future =
* keyManagementServiceClient.setIamPolicyCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.InvalidArgumentException;
import com.google.common.collect.Lists;
import com.google.iam.v1.AuditConfig;
import com.google.iam.v1.Binding;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.GetPolicyOptions;
Expand Down Expand Up @@ -409,6 +410,7 @@ public void setIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockIAMPolicy.addResponse(expectedResponse);
Expand All @@ -419,6 +421,7 @@ public void setIamPolicyTest() throws Exception {
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();

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

Assert.assertEquals(request.getResource(), actualRequest.getResource());
Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy());
Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -448,6 +452,7 @@ public void setIamPolicyExceptionTest() throws Exception {
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
client.setIamPolicy(request);
Assert.fail("No exception raised");
Expand All @@ -462,6 +467,7 @@ public void getIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockIAMPolicy.addResponse(expectedResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.google.api.gax.rpc.InvalidArgumentException;
import com.google.api.resourcenames.ResourceName;
import com.google.common.collect.Lists;
import com.google.iam.v1.AuditConfig;
import com.google.iam.v1.Binding;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.GetPolicyOptions;
Expand Down Expand Up @@ -2526,6 +2527,7 @@ public void setIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockIAMPolicy.addResponse(expectedResponse);
Expand All @@ -2536,6 +2538,7 @@ public void setIamPolicyTest() throws Exception {
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();

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

Assert.assertEquals(request.getResource(), actualRequest.getResource());
Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy());
Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -2565,6 +2569,7 @@ public void setIamPolicyExceptionTest() throws Exception {
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
client.setIamPolicy(request);
Assert.fail("No exception raised");
Expand All @@ -2579,6 +2584,7 @@ public void getIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockIAMPolicy.addResponse(expectedResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ private AsymmetricDecryptRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ private AsymmetricDecryptResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ private AsymmetricSignRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ private AsymmetricSignResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ private Certificate(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ private CreateCryptoKeyRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ private CreateCryptoKeyVersionRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ private CreateEkmConnectionRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ private CreateImportJobRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ private CreateKeyRingRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ private CryptoKey(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -1022,7 +1024,7 @@ public int getLabelsCount() {
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
Expand Down Expand Up @@ -1059,7 +1061,7 @@ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
@java.lang.Override
public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -1077,7 +1079,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
if (!map.containsKey(key)) {
Expand Down Expand Up @@ -3029,8 +3031,9 @@ public Builder mergeRotationPeriod(com.google.protobuf.Duration value) {
} else {
if (rotationScheduleCase_ == 8) {
rotationPeriodBuilder_.mergeFrom(value);
} else {
rotationPeriodBuilder_.setMessage(value);
}
rotationPeriodBuilder_.setMessage(value);
}
rotationScheduleCase_ = 8;
return this;
Expand Down Expand Up @@ -3431,7 +3434,7 @@ public int getLabelsCount() {
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
Expand Down Expand Up @@ -3469,7 +3472,7 @@ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
public java.lang.String getLabelsOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -3487,7 +3490,7 @@ public java.lang.String getLabelsOrDefault(
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
if (!map.containsKey(key)) {
Expand All @@ -3512,7 +3515,7 @@ public Builder clearLabels() {
*/
public Builder removeLabels(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableLabels().getMutableMap().remove(key);
return this;
Expand All @@ -3534,11 +3537,12 @@ public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
*/
public Builder putLabels(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
if (value == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map value");
}

internalGetMutableLabels().getMutableMap().put(key, value);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,12 @@ public interface CryptoKeyOrBuilder
*
* <code>map&lt;string, string&gt; labels = 10;</code>
*/
java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue);

/* nullable */
java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ private CryptoKeyVersion(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ private CryptoKeyVersionTemplate(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ private DecryptRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ private DecryptResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ private DestroyCryptoKeyVersionRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Loading

0 comments on commit d0b5443

Please sign in to comment.