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

Commit 12e67e3

Browse files
feat: AuditConfig for IAM v1 (#667)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 439356405 Source-Link: googleapis/googleapis@afa2ba1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3e40c17e1510c95fab58fc2143ccb61cceca5989 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2U0MGMxN2UxNTEwYzk1ZmFiNThmYzIxNDNjY2I2MWNjZWNhNTk4OSJ9
1 parent 9ed0574 commit 12e67e3

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,6 @@ public final void deleteConnection(ConnectionProto.DeleteConnectionRequest reque
799799
* @param resource REQUIRED: The resource for which the policy is being requested. See the
800800
* operation documentation for the appropriate value for this field.
801801
* @param options OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
802-
* This field is only used by Cloud IAM.
803802
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
804803
*/
805804
public final Policy getIamPolicy(ResourceName resource, GetPolicyOptions options) {
@@ -829,7 +828,6 @@ public final Policy getIamPolicy(ResourceName resource, GetPolicyOptions options
829828
* @param resource REQUIRED: The resource for which the policy is being requested. See the
830829
* operation documentation for the appropriate value for this field.
831830
* @param options OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
832-
* This field is only used by Cloud IAM.
833831
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
834832
*/
835833
public final Policy getIamPolicy(String resource, GetPolicyOptions options) {
@@ -962,6 +960,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
962960
* SetIamPolicyRequest.newBuilder()
963961
* .setResource(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
964962
* .setPolicy(Policy.newBuilder().build())
963+
* .setUpdateMask(FieldMask.newBuilder().build())
965964
* .build();
966965
* Policy response = connectionServiceClient.setIamPolicy(request);
967966
* }
@@ -988,6 +987,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
988987
* SetIamPolicyRequest.newBuilder()
989988
* .setResource(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
990989
* .setPolicy(Policy.newBuilder().build())
990+
* .setUpdateMask(FieldMask.newBuilder().build())
991991
* .build();
992992
* ApiFuture<Policy> future = connectionServiceClient.setIamPolicyCallable().futureCall(request);
993993
* // Do something.

google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigqueryconnection/v1/ConnectionServiceClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,6 @@ public final UnaryCallable<DeleteConnectionRequest, Empty> deleteConnectionCalla
745745
* @param resource REQUIRED: The resource for which the policy is being requested. See the
746746
* operation documentation for the appropriate value for this field.
747747
* @param options OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
748-
* This field is only used by Cloud IAM.
749748
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
750749
*/
751750
public final Policy getIamPolicy(ResourceName resource, GetPolicyOptions options) {
@@ -775,7 +774,6 @@ public final Policy getIamPolicy(ResourceName resource, GetPolicyOptions options
775774
* @param resource REQUIRED: The resource for which the policy is being requested. See the
776775
* operation documentation for the appropriate value for this field.
777776
* @param options OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
778-
* This field is only used by Cloud IAM.
779777
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
780778
*/
781779
public final Policy getIamPolicy(String resource, GetPolicyOptions options) {
@@ -908,6 +906,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
908906
* SetIamPolicyRequest.newBuilder()
909907
* .setResource(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
910908
* .setPolicy(Policy.newBuilder().build())
909+
* .setUpdateMask(FieldMask.newBuilder().build())
911910
* .build();
912911
* Policy response = connectionServiceClient.setIamPolicy(request);
913912
* }
@@ -934,6 +933,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
934933
* SetIamPolicyRequest.newBuilder()
935934
* .setResource(ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]").toString())
936935
* .setPolicy(Policy.newBuilder().build())
936+
* .setUpdateMask(FieldMask.newBuilder().build())
937937
* .build();
938938
* ApiFuture<Policy> future = connectionServiceClient.setIamPolicyCallable().futureCall(request);
939939
* // Do something.

google-cloud-bigqueryconnection/src/test/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClientTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.google.api.gax.rpc.ApiClientHeaderProvider;
2525
import com.google.api.gax.rpc.InvalidArgumentException;
2626
import com.google.api.resourcenames.ResourceName;
27+
import com.google.iam.v1.AuditConfig;
2728
import com.google.iam.v1.Binding;
2829
import com.google.iam.v1.GetIamPolicyRequest;
2930
import com.google.iam.v1.GetPolicyOptions;
@@ -584,6 +585,7 @@ public void getIamPolicyTest() throws Exception {
584585
Policy.newBuilder()
585586
.setVersion(351608024)
586587
.addAllBindings(new ArrayList<Binding>())
588+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
587589
.setEtag(ByteString.EMPTY)
588590
.build();
589591
mockConnectionService.addResponse(expectedResponse);
@@ -627,6 +629,7 @@ public void getIamPolicyTest2() throws Exception {
627629
Policy.newBuilder()
628630
.setVersion(351608024)
629631
.addAllBindings(new ArrayList<Binding>())
632+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
630633
.setEtag(ByteString.EMPTY)
631634
.build();
632635
mockConnectionService.addResponse(expectedResponse);
@@ -670,6 +673,7 @@ public void setIamPolicyTest() throws Exception {
670673
Policy.newBuilder()
671674
.setVersion(351608024)
672675
.addAllBindings(new ArrayList<Binding>())
676+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
673677
.setEtag(ByteString.EMPTY)
674678
.build();
675679
mockConnectionService.addResponse(expectedResponse);
@@ -713,6 +717,7 @@ public void setIamPolicyTest2() throws Exception {
713717
Policy.newBuilder()
714718
.setVersion(351608024)
715719
.addAllBindings(new ArrayList<Binding>())
720+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
716721
.setEtag(ByteString.EMPTY)
717722
.build();
718723
mockConnectionService.addResponse(expectedResponse);

google-cloud-bigqueryconnection/src/test/java/com/google/cloud/bigqueryconnection/v1/ConnectionServiceClientTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import com.google.cloud.bigquery.connection.v1.LocationName;
3737
import com.google.cloud.bigquery.connection.v1.UpdateConnectionRequest;
3838
import com.google.common.collect.Lists;
39+
import com.google.iam.v1.AuditConfig;
3940
import com.google.iam.v1.Binding;
4041
import com.google.iam.v1.GetIamPolicyRequest;
4142
import com.google.iam.v1.GetPolicyOptions;
@@ -543,6 +544,7 @@ public void getIamPolicyTest() throws Exception {
543544
Policy.newBuilder()
544545
.setVersion(351608024)
545546
.addAllBindings(new ArrayList<Binding>())
547+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
546548
.setEtag(ByteString.EMPTY)
547549
.build();
548550
mockConnectionService.addResponse(expectedResponse);
@@ -586,6 +588,7 @@ public void getIamPolicyTest2() throws Exception {
586588
Policy.newBuilder()
587589
.setVersion(351608024)
588590
.addAllBindings(new ArrayList<Binding>())
591+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
589592
.setEtag(ByteString.EMPTY)
590593
.build();
591594
mockConnectionService.addResponse(expectedResponse);
@@ -629,6 +632,7 @@ public void setIamPolicyTest() throws Exception {
629632
Policy.newBuilder()
630633
.setVersion(351608024)
631634
.addAllBindings(new ArrayList<Binding>())
635+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
632636
.setEtag(ByteString.EMPTY)
633637
.build();
634638
mockConnectionService.addResponse(expectedResponse);
@@ -672,6 +676,7 @@ public void setIamPolicyTest2() throws Exception {
672676
Policy.newBuilder()
673677
.setVersion(351608024)
674678
.addAllBindings(new ArrayList<Binding>())
679+
.addAllAuditConfigs(new ArrayList<AuditConfig>())
675680
.setEtag(ByteString.EMPTY)
676681
.build();
677682
mockConnectionService.addResponse(expectedResponse);

0 commit comments

Comments
 (0)