Skip to content

Commit 29d1eb1

Browse files
feat: [run] Adds support for custom audiences (#9618)
* feat: Adds support for custom audiences Custom Audiences * The new field is found in https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services. * For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences. PiperOrigin-RevId: 546032394 Source-Link: googleapis/googleapis@96f0194 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f95d5cafc5730dd1c6e30aa2395e1b37c4122ad8 Copy-Tag: eyJwIjoiamF2YS1ydW4vLk93bEJvdC55YW1sIiwiaCI6ImY5NWQ1Y2FmYzU3MzBkZDFjNmUzMGFhMjM5NWUxYjM3YzQxMjJhZDgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6cebb8d commit 29d1eb1

File tree

7 files changed

+490
-69
lines changed

7 files changed

+490
-69
lines changed

java-run/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2323
<dependency>
2424
<groupId>com.google.cloud</groupId>
2525
<artifactId>libraries-bom</artifactId>
26-
<version>26.16.0</version>
26+
<version>26.18.0</version>
2727
<type>pom</type>
2828
<scope>import</scope>
2929
</dependency>
@@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
201201
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
202202
[stability-image]: https://img.shields.io/badge/stability-preview-yellow
203203
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-run.svg
204-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.19.0
204+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-run/0.20.0
205205
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
206206
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
207207
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ServicesClientHttpJsonTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public void createServiceTest() throws Exception {
123123
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
124124
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
125125
.setUri("uri116076")
126+
.addAllCustomAudiences(new ArrayList<String>())
126127
.setSatisfiesPzs(true)
127128
.setReconciling(true)
128129
.setEtag("etag3123477")
@@ -206,6 +207,7 @@ public void createServiceTest2() throws Exception {
206207
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
207208
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
208209
.setUri("uri116076")
210+
.addAllCustomAudiences(new ArrayList<String>())
209211
.setSatisfiesPzs(true)
210212
.setReconciling(true)
211213
.setEtag("etag3123477")
@@ -289,6 +291,7 @@ public void getServiceTest() throws Exception {
289291
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
290292
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
291293
.setUri("uri116076")
294+
.addAllCustomAudiences(new ArrayList<String>())
292295
.setSatisfiesPzs(true)
293296
.setReconciling(true)
294297
.setEtag("etag3123477")
@@ -363,6 +366,7 @@ public void getServiceTest2() throws Exception {
363366
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
364367
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
365368
.setUri("uri116076")
369+
.addAllCustomAudiences(new ArrayList<String>())
366370
.setSatisfiesPzs(true)
367371
.setReconciling(true)
368372
.setEtag("etag3123477")
@@ -537,6 +541,7 @@ public void updateServiceTest() throws Exception {
537541
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
538542
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
539543
.setUri("uri116076")
544+
.addAllCustomAudiences(new ArrayList<String>())
540545
.setSatisfiesPzs(true)
541546
.setReconciling(true)
542547
.setEtag("etag3123477")
@@ -579,6 +584,7 @@ public void updateServiceTest() throws Exception {
579584
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
580585
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
581586
.setUri("uri116076")
587+
.addAllCustomAudiences(new ArrayList<String>())
582588
.setSatisfiesPzs(true)
583589
.setReconciling(true)
584590
.setEtag("etag3123477")
@@ -640,6 +646,7 @@ public void updateServiceExceptionTest() throws Exception {
640646
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
641647
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
642648
.setUri("uri116076")
649+
.addAllCustomAudiences(new ArrayList<String>())
643650
.setSatisfiesPzs(true)
644651
.setReconciling(true)
645652
.setEtag("etag3123477")
@@ -682,6 +689,7 @@ public void deleteServiceTest() throws Exception {
682689
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
683690
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
684691
.setUri("uri116076")
692+
.addAllCustomAudiences(new ArrayList<String>())
685693
.setSatisfiesPzs(true)
686694
.setReconciling(true)
687695
.setEtag("etag3123477")
@@ -761,6 +769,7 @@ public void deleteServiceTest2() throws Exception {
761769
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
762770
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
763771
.setUri("uri116076")
772+
.addAllCustomAudiences(new ArrayList<String>())
764773
.setSatisfiesPzs(true)
765774
.setReconciling(true)
766775
.setEtag("etag3123477")

java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/ServicesClientTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public void createServiceTest() throws Exception {
131131
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
132132
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
133133
.setUri("uri116076")
134+
.addAllCustomAudiences(new ArrayList<String>())
134135
.setSatisfiesPzs(true)
135136
.setReconciling(true)
136137
.setEtag("etag3123477")
@@ -213,6 +214,7 @@ public void createServiceTest2() throws Exception {
213214
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
214215
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
215216
.setUri("uri116076")
217+
.addAllCustomAudiences(new ArrayList<String>())
216218
.setSatisfiesPzs(true)
217219
.setReconciling(true)
218220
.setEtag("etag3123477")
@@ -295,6 +297,7 @@ public void getServiceTest() throws Exception {
295297
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
296298
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
297299
.setUri("uri116076")
300+
.addAllCustomAudiences(new ArrayList<String>())
298301
.setSatisfiesPzs(true)
299302
.setReconciling(true)
300303
.setEtag("etag3123477")
@@ -363,6 +366,7 @@ public void getServiceTest2() throws Exception {
363366
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
364367
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
365368
.setUri("uri116076")
369+
.addAllCustomAudiences(new ArrayList<String>())
366370
.setSatisfiesPzs(true)
367371
.setReconciling(true)
368372
.setEtag("etag3123477")
@@ -519,6 +523,7 @@ public void updateServiceTest() throws Exception {
519523
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
520524
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
521525
.setUri("uri116076")
526+
.addAllCustomAudiences(new ArrayList<String>())
522527
.setSatisfiesPzs(true)
523528
.setReconciling(true)
524529
.setEtag("etag3123477")
@@ -595,6 +600,7 @@ public void deleteServiceTest() throws Exception {
595600
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
596601
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
597602
.setUri("uri116076")
603+
.addAllCustomAudiences(new ArrayList<String>())
598604
.setSatisfiesPzs(true)
599605
.setReconciling(true)
600606
.setEtag("etag3123477")
@@ -671,6 +677,7 @@ public void deleteServiceTest2() throws Exception {
671677
RevisionName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[REVISION]").toString())
672678
.addAllTrafficStatuses(new ArrayList<TrafficTargetStatus>())
673679
.setUri("uri116076")
680+
.addAllCustomAudiences(new ArrayList<String>())
674681
.setSatisfiesPzs(true)
675682
.setReconciling(true)
676683
.setEtag("etag3123477")

0 commit comments

Comments
 (0)