diff --git a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/GrpcCloudSchedulerStub.java b/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/GrpcCloudSchedulerStub.java index 208c5341113e..33437671b97b 100644 --- a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/GrpcCloudSchedulerStub.java +++ b/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1/stub/GrpcCloudSchedulerStub.java @@ -23,6 +23,7 @@ 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.cloud.scheduler.v1.CreateJobRequest; import com.google.cloud.scheduler.v1.DeleteJobRequest; @@ -34,10 +35,12 @@ import com.google.cloud.scheduler.v1.ResumeJobRequest; import com.google.cloud.scheduler.v1.RunJobRequest; import com.google.cloud.scheduler.v1.UpdateJobRequest; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -165,34 +168,106 @@ protected GrpcCloudSchedulerStub( GrpcCallSettings listJobsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("job.name", String.valueOf(request.getJob().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings pauseJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(pauseJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PauseJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings resumeJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(resumeJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ResumeJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings runJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listJobsCallable = diff --git a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java b/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java index a80233d442fb..f7f8a68fa732 100644 --- a/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java +++ b/google-cloud-clients/google-cloud-scheduler/src/main/java/com/google/cloud/scheduler/v1beta1/stub/GrpcCloudSchedulerStub.java @@ -23,6 +23,7 @@ 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.cloud.scheduler.v1beta1.CreateJobRequest; import com.google.cloud.scheduler.v1beta1.DeleteJobRequest; @@ -34,10 +35,12 @@ import com.google.cloud.scheduler.v1beta1.ResumeJobRequest; import com.google.cloud.scheduler.v1beta1.RunJobRequest; import com.google.cloud.scheduler.v1beta1.UpdateJobRequest; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -165,34 +168,106 @@ protected GrpcCloudSchedulerStub( GrpcCallSettings listJobsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listJobsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("job.name", String.valueOf(request.getJob().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings pauseJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(pauseJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PauseJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings resumeJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(resumeJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ResumeJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings runJobTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunJobRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listJobsCallable = diff --git a/google-cloud-clients/google-cloud-scheduler/synth.metadata b/google-cloud-clients/google-cloud-scheduler/synth.metadata index b2a7cd9879ba..009b9edf254f 100644 --- a/google-cloud-clients/google-cloud-scheduler/synth.metadata +++ b/google-cloud-clients/google-cloud-scheduler/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-07T20:00:25.557469Z", + "updateTime": "2019-03-28T07:52:57.219526Z", "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": "6df9a80f147c4349949f6573b5275deebddd3ba8", - "internalRef": "237262681" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } } ],