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

Commit ed54ce1

Browse files
chore(bazel): update version of Protobuf to v3.20.1 (#709)
- [ ] 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 d5335fd commit ed54ce1

Some content is hidden

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

41 files changed

+103
-12
lines changed

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
15891589
* .setResource(
15901590
* DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]").toString())
15911591
* .setPolicy(Policy.newBuilder().build())
1592+
* .setUpdateMask(FieldMask.newBuilder().build())
15921593
* .build();
15931594
* Policy response = deviceManagerClient.setIamPolicy(request);
15941595
* }
@@ -1614,6 +1615,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
16141615
* .setResource(
16151616
* DeviceName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]", "[DEVICE]").toString())
16161617
* .setPolicy(Policy.newBuilder().build())
1618+
* .setUpdateMask(FieldMask.newBuilder().build())
16171619
* .build();
16181620
* ApiFuture<Policy> future = deviceManagerClient.setIamPolicyCallable().futureCall(request);
16191621
* // Do something.

google-cloud-iot/src/test/java/com/google/cloud/iot/v1/DeviceManagerClientTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.google.api.gax.rpc.InvalidArgumentException;
2929
import com.google.api.resourcenames.ResourceName;
3030
import com.google.common.collect.Lists;
31+
import com.google.iam.v1.AuditConfig;
3132
import com.google.iam.v1.Binding;
3233
import com.google.iam.v1.GetIamPolicyRequest;
3334
import com.google.iam.v1.Policy;
@@ -1175,6 +1176,7 @@ public void setIamPolicyTest() throws Exception {
11751176
Policy.newBuilder()
11761177
.setVersion(351608024)
11771178
.addAllBindings(new ArrayList<Binding>())
1179+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
11781180
.setEtag(ByteString.EMPTY)
11791181
.build();
11801182
mockDeviceManager.addResponse(expectedResponse);
@@ -1218,6 +1220,7 @@ public void setIamPolicyTest2() throws Exception {
12181220
Policy.newBuilder()
12191221
.setVersion(351608024)
12201222
.addAllBindings(new ArrayList<Binding>())
1223+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
12211224
.setEtag(ByteString.EMPTY)
12221225
.build();
12231226
mockDeviceManager.addResponse(expectedResponse);
@@ -1261,6 +1264,7 @@ public void getIamPolicyTest() throws Exception {
12611264
Policy.newBuilder()
12621265
.setVersion(351608024)
12631266
.addAllBindings(new ArrayList<Binding>())
1267+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
12641268
.setEtag(ByteString.EMPTY)
12651269
.build();
12661270
mockDeviceManager.addResponse(expectedResponse);
@@ -1301,6 +1305,7 @@ public void getIamPolicyTest2() throws Exception {
13011305
Policy.newBuilder()
13021306
.setVersion(351608024)
13031307
.addAllBindings(new ArrayList<Binding>())
1308+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
13041309
.setEtag(ByteString.EMPTY)
13051310
.build();
13061311
mockDeviceManager.addResponse(expectedResponse);

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/BindDeviceToGatewayRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ private BindDeviceToGatewayRequest(
104104
}
105105
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
106106
throw e.setUnfinishedMessage(this);
107+
} catch (com.google.protobuf.UninitializedMessageException e) {
108+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
107109
} catch (java.io.IOException e) {
108110
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
109111
} finally {

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/BindDeviceToGatewayResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ private BindDeviceToGatewayResponse(
7979
}
8080
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
8181
throw e.setUnfinishedMessage(this);
82+
} catch (com.google.protobuf.UninitializedMessageException e) {
83+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
8284
} catch (java.io.IOException e) {
8385
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
8486
} finally {

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/CreateDeviceRegistryRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ private CreateDeviceRegistryRequest(
104104
}
105105
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
106106
throw e.setUnfinishedMessage(this);
107+
} catch (com.google.protobuf.UninitializedMessageException e) {
108+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
107109
} catch (java.io.IOException e) {
108110
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
109111
} finally {

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/CreateDeviceRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ private CreateDeviceRequest(
103103
}
104104
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
105105
throw e.setUnfinishedMessage(this);
106+
} catch (com.google.protobuf.UninitializedMessageException e) {
107+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
106108
} catch (java.io.IOException e) {
107109
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
108110
} finally {

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeleteDeviceRegistryRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ private DeleteDeviceRegistryRequest(
8888
}
8989
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
9090
throw e.setUnfinishedMessage(this);
91+
} catch (com.google.protobuf.UninitializedMessageException e) {
92+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
9193
} catch (java.io.IOException e) {
9294
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
9395
} finally {

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeleteDeviceRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ private DeleteDeviceRequest(
8888
}
8989
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
9090
throw e.setUnfinishedMessage(this);
91+
} catch (com.google.protobuf.UninitializedMessageException e) {
92+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
9193
} catch (java.io.IOException e) {
9294
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
9395
} finally {

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/Device.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ private Device(
295295
}
296296
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
297297
throw e.setUnfinishedMessage(this);
298+
} catch (com.google.protobuf.UninitializedMessageException e) {
299+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
298300
} catch (java.io.IOException e) {
299301
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
300302
} finally {
@@ -1148,7 +1150,7 @@ public int getMetadataCount() {
11481150
@java.lang.Override
11491151
public boolean containsMetadata(java.lang.String key) {
11501152
if (key == null) {
1151-
throw new java.lang.NullPointerException();
1153+
throw new NullPointerException("map key");
11521154
}
11531155
return internalGetMetadata().getMap().containsKey(key);
11541156
}
@@ -1200,7 +1202,7 @@ public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {
12001202
public java.lang.String getMetadataOrDefault(
12011203
java.lang.String key, java.lang.String defaultValue) {
12021204
if (key == null) {
1203-
throw new java.lang.NullPointerException();
1205+
throw new NullPointerException("map key");
12041206
}
12051207
java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
12061208
return map.containsKey(key) ? map.get(key) : defaultValue;
@@ -1225,7 +1227,7 @@ public java.lang.String getMetadataOrDefault(
12251227
@java.lang.Override
12261228
public java.lang.String getMetadataOrThrow(java.lang.String key) {
12271229
if (key == null) {
1228-
throw new java.lang.NullPointerException();
1230+
throw new NullPointerException("map key");
12291231
}
12301232
java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
12311233
if (!map.containsKey(key)) {
@@ -4824,7 +4826,7 @@ public int getMetadataCount() {
48244826
@java.lang.Override
48254827
public boolean containsMetadata(java.lang.String key) {
48264828
if (key == null) {
4827-
throw new java.lang.NullPointerException();
4829+
throw new NullPointerException("map key");
48284830
}
48294831
return internalGetMetadata().getMap().containsKey(key);
48304832
}
@@ -4876,7 +4878,7 @@ public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {
48764878
public java.lang.String getMetadataOrDefault(
48774879
java.lang.String key, java.lang.String defaultValue) {
48784880
if (key == null) {
4879-
throw new java.lang.NullPointerException();
4881+
throw new NullPointerException("map key");
48804882
}
48814883
java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
48824884
return map.containsKey(key) ? map.get(key) : defaultValue;
@@ -4901,7 +4903,7 @@ public java.lang.String getMetadataOrDefault(
49014903
@java.lang.Override
49024904
public java.lang.String getMetadataOrThrow(java.lang.String key) {
49034905
if (key == null) {
4904-
throw new java.lang.NullPointerException();
4906+
throw new NullPointerException("map key");
49054907
}
49064908
java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
49074909
if (!map.containsKey(key)) {
@@ -4933,7 +4935,7 @@ public Builder clearMetadata() {
49334935
*/
49344936
public Builder removeMetadata(java.lang.String key) {
49354937
if (key == null) {
4936-
throw new java.lang.NullPointerException();
4938+
throw new NullPointerException("map key");
49374939
}
49384940
internalGetMutableMetadata().getMutableMap().remove(key);
49394941
return this;
@@ -4962,11 +4964,12 @@ public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() {
49624964
*/
49634965
public Builder putMetadata(java.lang.String key, java.lang.String value) {
49644966
if (key == null) {
4965-
throw new java.lang.NullPointerException();
4967+
throw new NullPointerException("map key");
49664968
}
49674969
if (value == null) {
4968-
throw new java.lang.NullPointerException();
4970+
throw new NullPointerException("map value");
49694971
}
4972+
49704973
internalGetMutableMetadata().getMutableMap().put(key, value);
49714974
return this;
49724975
}

proto-google-cloud-iot-v1/src/main/java/com/google/cloud/iot/v1/DeviceConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ private DeviceConfig(
121121
}
122122
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
123123
throw e.setUnfinishedMessage(this);
124+
} catch (com.google.protobuf.UninitializedMessageException e) {
125+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
124126
} catch (java.io.IOException e) {
125127
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
126128
} finally {

0 commit comments

Comments
 (0)