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

Commit

Permalink
chore(bazel): update version of Protobuf to v3.20.1 (#655)
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

chore: remove unused imports
PiperOrigin-RevId: 440391736

Source-Link: googleapis/googleapis@5d84222

Source-Link: googleapis/googleapis-gen@b474be5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjQ3NGJlNTQ0ZDYzMDRjYjIwYmM1ZjViMzhlZjZiYzg3MjQzYmM2NiJ9

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 b2dbb40 commit 13fe87b
Show file tree
Hide file tree
Showing 62 changed files with 256 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
* SetIamPolicyRequest.newBuilder()
* .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* Policy response = registrationServiceClient.setIamPolicy(request);
* }
Expand All @@ -1838,6 +1839,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* SetIamPolicyRequest.newBuilder()
* .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<Policy> future =
* registrationServiceClient.setIamPolicyCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
* SetIamPolicyRequest.newBuilder()
* .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* Policy response = registrationServiceClient.setIamPolicy(request);
* }
Expand All @@ -1839,6 +1840,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* SetIamPolicyRequest.newBuilder()
* .setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<Policy> future =
* registrationServiceClient.setIamPolicyCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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 @@ -1230,6 +1231,7 @@ public void getIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockRegistrationService.addResponse(expectedResponse);
Expand Down Expand Up @@ -1279,6 +1281,7 @@ public void setIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockRegistrationService.addResponse(expectedResponse);
Expand All @@ -1287,6 +1290,7 @@ public void setIamPolicyTest() throws Exception {
SetIamPolicyRequest.newBuilder()
.setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();

Policy actualResponse = client.setIamPolicy(request);
Expand All @@ -1298,6 +1302,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 @@ -1314,6 +1319,7 @@ public void setIamPolicyExceptionTest() throws Exception {
SetIamPolicyRequest.newBuilder()
.setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
client.setIamPolicy(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,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 @@ -1266,6 +1267,7 @@ public void getIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockRegistrationService.addResponse(expectedResponse);
Expand Down Expand Up @@ -1315,6 +1317,7 @@ public void setIamPolicyTest() throws Exception {
Policy.newBuilder()
.setVersion(351608024)
.addAllBindings(new ArrayList<Binding>())
.addAllAuditConfigs(new ArrayList<AuditConfig>())
.setEtag(ByteString.EMPTY)
.build();
mockRegistrationService.addResponse(expectedResponse);
Expand All @@ -1323,6 +1326,7 @@ public void setIamPolicyTest() throws Exception {
SetIamPolicyRequest.newBuilder()
.setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();

Policy actualResponse = client.setIamPolicy(request);
Expand All @@ -1334,6 +1338,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 @@ -1350,6 +1355,7 @@ public void setIamPolicyExceptionTest() throws Exception {
SetIamPolicyRequest.newBuilder()
.setResource(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
client.setIamPolicy(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ private CreateEndpointRequest(
}
} 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 @@ -113,6 +113,8 @@ private CreateNamespaceRequest(
}
} 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 @@ -113,6 +113,8 @@ private CreateServiceRequest(
}
} 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 @@ -89,6 +89,8 @@ private DeleteEndpointRequest(
}
} 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 @@ -89,6 +89,8 @@ private DeleteNamespaceRequest(
}
} 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 @@ -89,6 +89,8 @@ private DeleteServiceRequest(
}
} 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 @@ -119,6 +119,8 @@ private Endpoint(
}
} 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 @@ -343,7 +345,7 @@ public int getAnnotationsCount() {
@java.lang.Override
public boolean containsAnnotations(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetAnnotations().getMap().containsKey(key);
}
Expand Down Expand Up @@ -419,7 +421,7 @@ public java.util.Map<java.lang.String, java.lang.String> getAnnotationsMap() {
public java.lang.String getAnnotationsOrDefault(
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 = internalGetAnnotations().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand Down Expand Up @@ -456,7 +458,7 @@ public java.lang.String getAnnotationsOrDefault(
@java.lang.Override
public java.lang.String getAnnotationsOrThrow(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 = internalGetAnnotations().getMap();
if (!map.containsKey(key)) {
Expand Down Expand Up @@ -1222,7 +1224,7 @@ public int getAnnotationsCount() {
@java.lang.Override
public boolean containsAnnotations(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetAnnotations().getMap().containsKey(key);
}
Expand Down Expand Up @@ -1298,7 +1300,7 @@ public java.util.Map<java.lang.String, java.lang.String> getAnnotationsMap() {
public java.lang.String getAnnotationsOrDefault(
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 = internalGetAnnotations().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand Down Expand Up @@ -1335,7 +1337,7 @@ public java.lang.String getAnnotationsOrDefault(
@java.lang.Override
public java.lang.String getAnnotationsOrThrow(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 = internalGetAnnotations().getMap();
if (!map.containsKey(key)) {
Expand Down Expand Up @@ -1379,7 +1381,7 @@ public Builder clearAnnotations() {
*/
public Builder removeAnnotations(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableAnnotations().getMutableMap().remove(key);
return this;
Expand Down Expand Up @@ -1420,11 +1422,12 @@ public java.util.Map<java.lang.String, java.lang.String> getMutableAnnotations()
*/
public Builder putAnnotations(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");
}

internalGetMutableAnnotations().getMutableMap().put(key, value);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ public interface EndpointOrBuilder
* <code>map&lt;string, string&gt; annotations = 5 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*/
java.lang.String getAnnotationsOrDefault(java.lang.String key, java.lang.String defaultValue);

/* nullable */
java.lang.String getAnnotationsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
*
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
java.lang.String[] descriptorData = {
"\n/google/cloud/servicedirectory/v1/endpo"
+ "int.proto\022 google.cloud.servicedirectory"
+ ".v1\032\034google/api/annotations.proto\032\037googl"
+ "e/api/field_behavior.proto\032\031google/api/r"
+ "esource.proto\"\352\002\n\010Endpoint\022\021\n\004name\030\001 \001(\t"
+ "B\003\340A\005\022\024\n\007address\030\002 \001(\tB\003\340A\001\022\021\n\004port\030\003 \001("
+ "\005B\003\340A\001\022U\n\013annotations\030\005 \003(\0132;.google.clo"
+ "ud.servicedirectory.v1.Endpoint.Annotati"
+ "onsEntryB\003\340A\001\0322\n\020AnnotationsEntry\022\013\n\003key"
+ "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\226\001\352A\222\001\n(servic"
+ "edirectory.googleapis.com/Endpoint\022fproj"
+ "ects/{project}/locations/{location}/name"
+ "spaces/{namespace}/services/{service}/en"
+ "dpoints/{endpoint}B\370\001\n$com.google.cloud."
+ "servicedirectory.v1B\rEndpointProtoP\001ZPgo"
+ "ogle.golang.org/genproto/googleapis/clou"
+ "d/servicedirectory/v1;servicedirectory\370\001"
+ "\001\252\002 Google.Cloud.ServiceDirectory.V1\312\002 G"
+ "oogle\\Cloud\\ServiceDirectory\\V1\352\002#Google"
+ "::Cloud::ServiceDirectory::V1b\006proto3"
+ ".v1\032\037google/api/field_behavior.proto\032\031go"
+ "ogle/api/resource.proto\"\352\002\n\010Endpoint\022\021\n\004"
+ "name\030\001 \001(\tB\003\340A\005\022\024\n\007address\030\002 \001(\tB\003\340A\001\022\021\n"
+ "\004port\030\003 \001(\005B\003\340A\001\022U\n\013annotations\030\005 \003(\0132;."
+ "google.cloud.servicedirectory.v1.Endpoin"
+ "t.AnnotationsEntryB\003\340A\001\0322\n\020AnnotationsEn"
+ "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\226\001\352A"
+ "\222\001\n(servicedirectory.googleapis.com/Endp"
+ "oint\022fprojects/{project}/locations/{loca"
+ "tion}/namespaces/{namespace}/services/{s"
+ "ervice}/endpoints/{endpoint}B\370\001\n$com.goo"
+ "gle.cloud.servicedirectory.v1B\rEndpointP"
+ "rotoP\001ZPgoogle.golang.org/genproto/googl"
+ "eapis/cloud/servicedirectory/v1;serviced"
+ "irectory\370\001\001\252\002 Google.Cloud.ServiceDirect"
+ "ory.V1\312\002 Google\\Cloud\\ServiceDirectory\\V"
+ "1\352\002#Google::Cloud::ServiceDirectory::V1b"
+ "\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.api.ResourceProto.getDescriptor(),
});
Expand Down Expand Up @@ -97,7 +96,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
registry.add(com.google.api.ResourceProto.resource);
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
descriptor, registry);
com.google.api.AnnotationsProto.getDescriptor();
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ private GetEndpointRequest(
}
} 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 @@ -89,6 +89,8 @@ private GetNamespaceRequest(
}
} 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 @@ -91,6 +91,8 @@ private GetServiceRequest(
}
} 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 @@ -118,6 +118,8 @@ private ListEndpointsRequest(
}
} 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 @@ -103,6 +103,8 @@ private ListEndpointsResponse(
}
} 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 @@ -118,6 +118,8 @@ private ListNamespacesRequest(
}
} 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 13fe87b

Please sign in to comment.