Skip to content

Commit be3132c

Browse files
chore: Integrate new gapic-generator-java and rules_gapic (#223)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 454027580 Source-Link: googleapis/googleapis@1b22277 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9
1 parent 8a3c7ea commit be3132c

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque
870870
* while (true) {
871871
* ListAttestorsResponse response =
872872
* binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request);
873-
* for (Attestor element : response.getResponsesList()) {
873+
* for (Attestor element : response.getAttestorsList()) {
874874
* // doThingsWith(element);
875875
* }
876876
* String nextPageToken = response.getNextPageToken();

java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* // This snippet has been automatically generated for illustrative purposes only.
3737
* // It may require modifications to work in your environment.
3838
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
39-
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
39+
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
4040
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
4141
* }
4242
* }</pre>
@@ -155,7 +155,7 @@ public SystemPolicyV1Beta1Stub getStub() {
155155
* // This snippet has been automatically generated for illustrative purposes only.
156156
* // It may require modifications to work in your environment.
157157
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
158-
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
158+
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
159159
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
160160
* }
161161
* }</pre>
@@ -206,7 +206,7 @@ public final Policy getSystemPolicy(String name) {
206206
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
207207
* GetSystemPolicyRequest request =
208208
* GetSystemPolicyRequest.newBuilder()
209-
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
209+
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
210210
* .build();
211211
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(request);
212212
* }
@@ -231,7 +231,7 @@ public final Policy getSystemPolicy(GetSystemPolicyRequest request) {
231231
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
232232
* GetSystemPolicyRequest request =
233233
* GetSystemPolicyRequest.newBuilder()
234-
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
234+
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
235235
* .build();
236236
* ApiFuture<Policy> future =
237237
* systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request);

java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* // This snippet has been automatically generated for illustrative purposes only.
5252
* // It may require modifications to work in your environment.
5353
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
54-
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
54+
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
5555
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
5656
* }
5757
* }</pre>

java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
875875
* while (true) {
876876
* Service.ListAttestorsResponse response =
877877
* binauthzManagementServiceV1Client.listAttestorsCallable().call(request);
878-
* for (Resources.Attestor element : response.getResponsesList()) {
878+
* for (Resources.Attestor element : response.getAttestorsList()) {
879879
* // doThingsWith(element);
880880
* }
881881
* String nextPageToken = response.getNextPageToken();

java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* // This snippet has been automatically generated for illustrative purposes only.
3636
* // It may require modifications to work in your environment.
3737
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
38-
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
38+
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
3939
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
4040
* }
4141
* }</pre>
@@ -150,7 +150,7 @@ public SystemPolicyV1Stub getStub() {
150150
* // This snippet has been automatically generated for illustrative purposes only.
151151
* // It may require modifications to work in your environment.
152152
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
153-
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
153+
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
154154
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
155155
* }
156156
* }</pre>
@@ -204,7 +204,7 @@ public final Resources.Policy getSystemPolicy(String name) {
204204
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
205205
* Service.GetSystemPolicyRequest request =
206206
* Service.GetSystemPolicyRequest.newBuilder()
207-
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
207+
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
208208
* .build();
209209
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(request);
210210
* }
@@ -229,7 +229,7 @@ public final Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest req
229229
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
230230
* Service.GetSystemPolicyRequest request =
231231
* Service.GetSystemPolicyRequest.newBuilder()
232-
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
232+
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
233233
* .build();
234234
* ApiFuture<Resources.Policy> future =
235235
* systemPolicyV1Client.getSystemPolicyCallable().futureCall(request);

java-binary-authorization/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
* // This snippet has been automatically generated for illustrative purposes only.
5454
* // It may require modifications to work in your environment.
5555
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
56-
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
56+
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
5757
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
5858
* }
5959
* }</pre>

java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void tearDown() throws Exception {
8282
public void getSystemPolicyTest() throws Exception {
8383
Policy expectedResponse =
8484
Policy.newBuilder()
85-
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
85+
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
8686
.setDescription("description-1724546052")
8787
.addAllAdmissionWhitelistPatterns(new ArrayList<AdmissionWhitelistPattern>())
8888
.putAllClusterAdmissionRules(new HashMap<String, AdmissionRule>())
@@ -94,7 +94,7 @@ public void getSystemPolicyTest() throws Exception {
9494
.build();
9595
mockSystemPolicyV1Beta1.addResponse(expectedResponse);
9696

97-
PolicyName name = PolicyName.ofProjectName("[PROJECT]");
97+
PolicyName name = PolicyName.ofLocationName("[LOCATION]");
9898

9999
Policy actualResponse = client.getSystemPolicy(name);
100100
Assert.assertEquals(expectedResponse, actualResponse);
@@ -116,7 +116,7 @@ public void getSystemPolicyExceptionTest() throws Exception {
116116
mockSystemPolicyV1Beta1.addException(exception);
117117

118118
try {
119-
PolicyName name = PolicyName.ofProjectName("[PROJECT]");
119+
PolicyName name = PolicyName.ofLocationName("[LOCATION]");
120120
client.getSystemPolicy(name);
121121
Assert.fail("No exception raised");
122122
} catch (InvalidArgumentException e) {
@@ -128,7 +128,7 @@ public void getSystemPolicyExceptionTest() throws Exception {
128128
public void getSystemPolicyTest2() throws Exception {
129129
Policy expectedResponse =
130130
Policy.newBuilder()
131-
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
131+
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
132132
.setDescription("description-1724546052")
133133
.addAllAdmissionWhitelistPatterns(new ArrayList<AdmissionWhitelistPattern>())
134134
.putAllClusterAdmissionRules(new HashMap<String, AdmissionRule>())

java-binary-authorization/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void tearDown() throws Exception {
8282
public void getSystemPolicyTest() throws Exception {
8383
Resources.Policy expectedResponse =
8484
Resources.Policy.newBuilder()
85-
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
85+
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
8686
.setDescription("description-1724546052")
8787
.addAllAdmissionWhitelistPatterns(new ArrayList<Resources.AdmissionWhitelistPattern>())
8888
.putAllClusterAdmissionRules(new HashMap<String, Resources.AdmissionRule>())
@@ -96,7 +96,7 @@ public void getSystemPolicyTest() throws Exception {
9696
.build();
9797
mockSystemPolicyV1.addResponse(expectedResponse);
9898

99-
PolicyName name = PolicyName.ofProjectName("[PROJECT]");
99+
PolicyName name = PolicyName.ofLocationName("[LOCATION]");
100100

101101
Resources.Policy actualResponse = client.getSystemPolicy(name);
102102
Assert.assertEquals(expectedResponse, actualResponse);
@@ -119,7 +119,7 @@ public void getSystemPolicyExceptionTest() throws Exception {
119119
mockSystemPolicyV1.addException(exception);
120120

121121
try {
122-
PolicyName name = PolicyName.ofProjectName("[PROJECT]");
122+
PolicyName name = PolicyName.ofLocationName("[LOCATION]");
123123
client.getSystemPolicy(name);
124124
Assert.fail("No exception raised");
125125
} catch (InvalidArgumentException e) {
@@ -131,7 +131,7 @@ public void getSystemPolicyExceptionTest() throws Exception {
131131
public void getSystemPolicyTest2() throws Exception {
132132
Resources.Policy expectedResponse =
133133
Resources.Policy.newBuilder()
134-
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
134+
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
135135
.setDescription("description-1724546052")
136136
.addAllAdmissionWhitelistPatterns(new ArrayList<Resources.AdmissionWhitelistPattern>())
137137
.putAllClusterAdmissionRules(new HashMap<String, Resources.AdmissionRule>())

0 commit comments

Comments
 (0)