Skip to content

Commit

Permalink
chore: Integrate new gapic-generator-java and rules_gapic (#895)
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 e575d1c commit 207b68a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ public final ListInspectTemplatesPagedResponse listInspectTemplates(
* while (true) {
* ListInspectTemplatesResponse response =
* dlpServiceClient.listInspectTemplatesCallable().call(request);
* for (InspectTemplate element : response.getResponsesList()) {
* for (InspectTemplate element : response.getInspectTemplatesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -2442,7 +2442,7 @@ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
* while (true) {
* ListDeidentifyTemplatesResponse response =
* dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
* for (DeidentifyTemplate element : response.getResponsesList()) {
* for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -2891,7 +2891,9 @@ public final UnaryCallable<UpdateJobTriggerRequest, JobTrigger> updateJobTrigger
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
* JobTriggerName name =
* JobTriggerName.ofProjectLocationJobTriggerName(
* "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");
* HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
* }
* }</pre>
Expand Down Expand Up @@ -2948,7 +2950,9 @@ public final HybridInspectResponse hybridInspectJobTrigger(String name) {
* HybridInspectJobTriggerRequest request =
* HybridInspectJobTriggerRequest.newBuilder()
* .setName(
* JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
* JobTriggerName.ofProjectLocationJobTriggerName(
* "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
* .toString())
* .setHybridItem(HybridContentItem.newBuilder().build())
* .build();
* HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
Expand Down Expand Up @@ -2977,7 +2981,9 @@ public final HybridInspectResponse hybridInspectJobTrigger(
* HybridInspectJobTriggerRequest request =
* HybridInspectJobTriggerRequest.newBuilder()
* .setName(
* JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
* JobTriggerName.ofProjectLocationJobTriggerName(
* "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
* .toString())
* .setHybridItem(HybridContentItem.newBuilder().build())
* .build();
* ApiFuture<HybridInspectResponse> future =
Expand Down Expand Up @@ -3289,7 +3295,7 @@ public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest
* .build();
* while (true) {
* ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
* for (JobTrigger element : response.getResponsesList()) {
* for (JobTrigger element : response.getJobTriggersList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -3998,7 +4004,7 @@ public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) {
* .build();
* while (true) {
* ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
* for (DlpJob element : response.getResponsesList()) {
* for (DlpJob element : response.getJobsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -5128,7 +5134,7 @@ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(
* while (true) {
* ListStoredInfoTypesResponse response =
* dlpServiceClient.listStoredInfoTypesCallable().call(request);
* for (StoredInfoType element : response.getResponsesList()) {
* for (StoredInfoType element : response.getStoredInfoTypesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -5275,7 +5281,8 @@ public final UnaryCallable<DeleteStoredInfoTypeRequest, Empty> deleteStoredInfoT
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
* DlpJobName name =
* DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");
* HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
* }
* }</pre>
Expand Down Expand Up @@ -5331,7 +5338,9 @@ public final HybridInspectResponse hybridInspectDlpJob(String name) {
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* HybridInspectDlpJobRequest request =
* HybridInspectDlpJobRequest.newBuilder()
* .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
* .setName(
* DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
* .toString())
* .setHybridItem(HybridContentItem.newBuilder().build())
* .build();
* HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
Expand All @@ -5358,7 +5367,9 @@ public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobReques
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* HybridInspectDlpJobRequest request =
* HybridInspectDlpJobRequest.newBuilder()
* .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
* .setName(
* DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
* .toString())
* .setHybridItem(HybridContentItem.newBuilder().build())
* .build();
* ApiFuture<HybridInspectResponse> future =
Expand Down Expand Up @@ -5386,7 +5397,9 @@ public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobReques
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* FinishDlpJobRequest request =
* FinishDlpJobRequest.newBuilder()
* .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
* .setName(
* DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
* .toString())
* .build();
* dlpServiceClient.finishDlpJob(request);
* }
Expand All @@ -5412,7 +5425,9 @@ public final void finishDlpJob(FinishDlpJobRequest request) {
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* FinishDlpJobRequest request =
* FinishDlpJobRequest.newBuilder()
* .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
* .setName(
* DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
* .toString())
* .build();
* ApiFuture<Empty> future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
* // Do something.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2213,7 +2213,8 @@ public void hybridInspectJobTriggerTest() throws Exception {
HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build();
mockDlpService.addResponse(expectedResponse);

JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
JobTriggerName name =
JobTriggerName.ofProjectLocationJobTriggerName("[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");

HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name);
Assert.assertEquals(expectedResponse, actualResponse);
Expand All @@ -2236,7 +2237,9 @@ public void hybridInspectJobTriggerExceptionTest() throws Exception {
mockDlpService.addException(exception);

try {
JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
JobTriggerName name =
JobTriggerName.ofProjectLocationJobTriggerName(
"[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");
client.hybridInspectJobTrigger(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
Expand Down Expand Up @@ -3959,7 +3962,8 @@ public void hybridInspectDlpJobTest() throws Exception {
HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build();
mockDlpService.addResponse(expectedResponse);

DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
DlpJobName name =
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");

HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name);
Assert.assertEquals(expectedResponse, actualResponse);
Expand All @@ -3981,7 +3985,8 @@ public void hybridInspectDlpJobExceptionTest() throws Exception {
mockDlpService.addException(exception);

try {
DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
DlpJobName name =
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");
client.hybridInspectDlpJob(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
Expand Down Expand Up @@ -4031,7 +4036,9 @@ public void finishDlpJobTest() throws Exception {

FinishDlpJobRequest request =
FinishDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.setName(
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
.toString())
.build();

client.finishDlpJob(request);
Expand All @@ -4055,7 +4062,9 @@ public void finishDlpJobExceptionTest() throws Exception {
try {
FinishDlpJobRequest request =
FinishDlpJobRequest.newBuilder()
.setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
.setName(
DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
.toString())
.build();
client.finishDlpJob(request);
Assert.fail("No exception raised");
Expand Down

0 comments on commit 207b68a

Please sign in to comment.