From 8bd4f2c04bf64b4ac09c11dc7103d9c53b58c038 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 28 Mar 2019 01:06:38 -0700 Subject: [PATCH] Regenerate dlp client (#4765) --- .../cloud/dlp/v2/stub/GrpcDlpServiceStub.java | 264 ++++++++++++++++++ .../google-cloud-dlp/synth.metadata | 10 +- 2 files changed, 269 insertions(+), 5 deletions(-) diff --git a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java index de97f9911272..4b6e1f90054a 100644 --- a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java +++ b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java @@ -27,7 +27,9 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.privacy.dlp.v2.CancelDlpJobRequest; import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; import com.google.privacy.dlp.v2.CreateDlpJobRequest; @@ -77,6 +79,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -464,20 +467,56 @@ protected GrpcDlpServiceStub( inspectContentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(inspectContentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(InspectContentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings redactImageTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(redactImageMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RedactImageRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings deidentifyContentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deidentifyContentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeidentifyContentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings reidentifyContentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(reidentifyContentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ReidentifyContentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listInfoTypesTransportSettings = GrpcCallSettings.newBuilder() @@ -487,115 +526,340 @@ protected GrpcDlpServiceStub( createInspectTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createInspectTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateInspectTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateInspectTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateInspectTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateInspectTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getInspectTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getInspectTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetInspectTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listInspectTemplatesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listInspectTemplatesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListInspectTemplatesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteInspectTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteInspectTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteInspectTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createDeidentifyTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDeidentifyTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateDeidentifyTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateDeidentifyTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getDeidentifyTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDeidentifyTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listDeidentifyTemplatesTransportSettings = GrpcCallSettings .newBuilder() .setMethodDescriptor(listDeidentifyTemplatesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDeidentifyTemplatesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteDeidentifyTemplateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDeidentifyTemplateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createDlpJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createDlpJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDlpJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listDlpJobsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listDlpJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDlpJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getDlpJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getDlpJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDlpJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteDlpJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteDlpJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDlpJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings cancelDlpJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(cancelDlpJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelDlpJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listJobTriggersTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listJobTriggersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListJobTriggersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getJobTriggerTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getJobTriggerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetJobTriggerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteJobTriggerTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteJobTriggerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteJobTriggerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateJobTriggerTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateJobTriggerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateJobTriggerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createJobTriggerTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createJobTriggerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateJobTriggerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings createStoredInfoTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateStoredInfoTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateStoredInfoTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateStoredInfoTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getStoredInfoTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetStoredInfoTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listStoredInfoTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listStoredInfoTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListStoredInfoTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteStoredInfoTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteStoredInfoTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.inspectContentCallable = diff --git a/google-cloud-clients/google-cloud-dlp/synth.metadata b/google-cloud-clients/google-cloud-dlp/synth.metadata index a0cba20d7c2a..5f0f1665ec0a 100644 --- a/google-cloud-clients/google-cloud-dlp/synth.metadata +++ b/google-cloud-clients/google-cloud-dlp/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-06T08:42:16.001412Z", + "updateTime": "2019-03-28T07:43:32.034830Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.15", - "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "856117505ff9075b3e9c0b5674113667b6cf9e00", - "internalRef": "236931378" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } } ],