Skip to content

Commit

Permalink
chore: Integrate new gapic-generator-java and rules_gapic (#223)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 454027580

Source-Link: googleapis/googleapis@1b22277

Source-Link: googleapis/googleapis-gen@e04cea2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9
  • Loading branch information
gcf-owl-bot[bot] committed Jun 13, 2022
1 parent 8a3c7ea commit be3132c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque
* while (true) {
* ListAttestorsResponse response =
* binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request);
* for (Attestor element : response.getResponsesList()) {
* for (Attestor element : response.getAttestorsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
* }
* }</pre>
Expand Down Expand Up @@ -155,7 +155,7 @@ public SystemPolicyV1Beta1Stub getStub() {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
* }
* }</pre>
Expand Down Expand Up @@ -206,7 +206,7 @@ public final Policy getSystemPolicy(String name) {
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
* GetSystemPolicyRequest request =
* GetSystemPolicyRequest.newBuilder()
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
* .build();
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(request);
* }
Expand All @@ -231,7 +231,7 @@ public final Policy getSystemPolicy(GetSystemPolicyRequest request) {
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
* GetSystemPolicyRequest request =
* GetSystemPolicyRequest.newBuilder()
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
* .build();
* ApiFuture<Policy> future =
* systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
* Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
* }
* }</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
* while (true) {
* Service.ListAttestorsResponse response =
* binauthzManagementServiceV1Client.listAttestorsCallable().call(request);
* for (Resources.Attestor element : response.getResponsesList()) {
* for (Resources.Attestor element : response.getAttestorsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
* }
* }</pre>
Expand Down Expand Up @@ -150,7 +150,7 @@ public SystemPolicyV1Stub getStub() {
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
* }
* }</pre>
Expand Down Expand Up @@ -204,7 +204,7 @@ public final Resources.Policy getSystemPolicy(String name) {
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
* Service.GetSystemPolicyRequest request =
* Service.GetSystemPolicyRequest.newBuilder()
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
* .build();
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(request);
* }
Expand All @@ -229,7 +229,7 @@ public final Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest req
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
* Service.GetSystemPolicyRequest request =
* Service.GetSystemPolicyRequest.newBuilder()
* .setName(PolicyName.ofProjectName("[PROJECT]").toString())
* .setName(PolicyName.ofLocationName("[LOCATION]").toString())
* .build();
* ApiFuture<Resources.Policy> future =
* systemPolicyV1Client.getSystemPolicyCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
* PolicyName name = PolicyName.ofProjectName("[PROJECT]");
* PolicyName name = PolicyName.ofLocationName("[LOCATION]");
* Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
* }
* }</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void tearDown() throws Exception {
public void getSystemPolicyTest() throws Exception {
Policy expectedResponse =
Policy.newBuilder()
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
.setDescription("description-1724546052")
.addAllAdmissionWhitelistPatterns(new ArrayList<AdmissionWhitelistPattern>())
.putAllClusterAdmissionRules(new HashMap<String, AdmissionRule>())
Expand All @@ -94,7 +94,7 @@ public void getSystemPolicyTest() throws Exception {
.build();
mockSystemPolicyV1Beta1.addResponse(expectedResponse);

PolicyName name = PolicyName.ofProjectName("[PROJECT]");
PolicyName name = PolicyName.ofLocationName("[LOCATION]");

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

try {
PolicyName name = PolicyName.ofProjectName("[PROJECT]");
PolicyName name = PolicyName.ofLocationName("[LOCATION]");
client.getSystemPolicy(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
Expand All @@ -128,7 +128,7 @@ public void getSystemPolicyExceptionTest() throws Exception {
public void getSystemPolicyTest2() throws Exception {
Policy expectedResponse =
Policy.newBuilder()
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
.setDescription("description-1724546052")
.addAllAdmissionWhitelistPatterns(new ArrayList<AdmissionWhitelistPattern>())
.putAllClusterAdmissionRules(new HashMap<String, AdmissionRule>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void tearDown() throws Exception {
public void getSystemPolicyTest() throws Exception {
Resources.Policy expectedResponse =
Resources.Policy.newBuilder()
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
.setDescription("description-1724546052")
.addAllAdmissionWhitelistPatterns(new ArrayList<Resources.AdmissionWhitelistPattern>())
.putAllClusterAdmissionRules(new HashMap<String, Resources.AdmissionRule>())
Expand All @@ -96,7 +96,7 @@ public void getSystemPolicyTest() throws Exception {
.build();
mockSystemPolicyV1.addResponse(expectedResponse);

PolicyName name = PolicyName.ofProjectName("[PROJECT]");
PolicyName name = PolicyName.ofLocationName("[LOCATION]");

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

try {
PolicyName name = PolicyName.ofProjectName("[PROJECT]");
PolicyName name = PolicyName.ofLocationName("[LOCATION]");
client.getSystemPolicy(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
Expand All @@ -131,7 +131,7 @@ public void getSystemPolicyExceptionTest() throws Exception {
public void getSystemPolicyTest2() throws Exception {
Resources.Policy expectedResponse =
Resources.Policy.newBuilder()
.setName(PolicyName.ofProjectName("[PROJECT]").toString())
.setName(PolicyName.ofLocationName("[LOCATION]").toString())
.setDescription("description-1724546052")
.addAllAdmissionWhitelistPatterns(new ArrayList<Resources.AdmissionWhitelistPattern>())
.putAllClusterAdmissionRules(new HashMap<String, Resources.AdmissionRule>())
Expand Down

0 comments on commit be3132c

Please sign in to comment.