Skip to content

Commit

Permalink
Regenerate scheduler client (#4774)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and Praful Makani committed Mar 28, 2019
1 parent 18e1e98 commit 9b0156b
Show file tree
Hide file tree
Showing 3 changed files with 155 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -165,34 +168,106 @@ protected GrpcCloudSchedulerStub(
GrpcCallSettings<ListJobsRequest, ListJobsResponse> listJobsTransportSettings =
GrpcCallSettings.<ListJobsRequest, ListJobsResponse>newBuilder()
.setMethodDescriptor(listJobsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListJobsRequest>() {
@Override
public Map<String, String> extract(ListJobsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<GetJobRequest, Job> getJobTransportSettings =
GrpcCallSettings.<GetJobRequest, Job>newBuilder()
.setMethodDescriptor(getJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetJobRequest>() {
@Override
public Map<String, String> extract(GetJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<CreateJobRequest, Job> createJobTransportSettings =
GrpcCallSettings.<CreateJobRequest, Job>newBuilder()
.setMethodDescriptor(createJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateJobRequest>() {
@Override
public Map<String, String> extract(CreateJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateJobRequest, Job> updateJobTransportSettings =
GrpcCallSettings.<UpdateJobRequest, Job>newBuilder()
.setMethodDescriptor(updateJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateJobRequest>() {
@Override
public Map<String, String> extract(UpdateJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("job.name", String.valueOf(request.getJob().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<DeleteJobRequest, Empty> deleteJobTransportSettings =
GrpcCallSettings.<DeleteJobRequest, Empty>newBuilder()
.setMethodDescriptor(deleteJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteJobRequest>() {
@Override
public Map<String, String> extract(DeleteJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<PauseJobRequest, Job> pauseJobTransportSettings =
GrpcCallSettings.<PauseJobRequest, Job>newBuilder()
.setMethodDescriptor(pauseJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PauseJobRequest>() {
@Override
public Map<String, String> extract(PauseJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<ResumeJobRequest, Job> resumeJobTransportSettings =
GrpcCallSettings.<ResumeJobRequest, Job>newBuilder()
.setMethodDescriptor(resumeJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ResumeJobRequest>() {
@Override
public Map<String, String> extract(ResumeJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<RunJobRequest, Job> runJobTransportSettings =
GrpcCallSettings.<RunJobRequest, Job>newBuilder()
.setMethodDescriptor(runJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<RunJobRequest>() {
@Override
public Map<String, String> extract(RunJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();

this.listJobsCallable =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -165,34 +168,106 @@ protected GrpcCloudSchedulerStub(
GrpcCallSettings<ListJobsRequest, ListJobsResponse> listJobsTransportSettings =
GrpcCallSettings.<ListJobsRequest, ListJobsResponse>newBuilder()
.setMethodDescriptor(listJobsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListJobsRequest>() {
@Override
public Map<String, String> extract(ListJobsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<GetJobRequest, Job> getJobTransportSettings =
GrpcCallSettings.<GetJobRequest, Job>newBuilder()
.setMethodDescriptor(getJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetJobRequest>() {
@Override
public Map<String, String> extract(GetJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<CreateJobRequest, Job> createJobTransportSettings =
GrpcCallSettings.<CreateJobRequest, Job>newBuilder()
.setMethodDescriptor(createJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateJobRequest>() {
@Override
public Map<String, String> extract(CreateJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateJobRequest, Job> updateJobTransportSettings =
GrpcCallSettings.<UpdateJobRequest, Job>newBuilder()
.setMethodDescriptor(updateJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateJobRequest>() {
@Override
public Map<String, String> extract(UpdateJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("job.name", String.valueOf(request.getJob().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<DeleteJobRequest, Empty> deleteJobTransportSettings =
GrpcCallSettings.<DeleteJobRequest, Empty>newBuilder()
.setMethodDescriptor(deleteJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteJobRequest>() {
@Override
public Map<String, String> extract(DeleteJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<PauseJobRequest, Job> pauseJobTransportSettings =
GrpcCallSettings.<PauseJobRequest, Job>newBuilder()
.setMethodDescriptor(pauseJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PauseJobRequest>() {
@Override
public Map<String, String> extract(PauseJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<ResumeJobRequest, Job> resumeJobTransportSettings =
GrpcCallSettings.<ResumeJobRequest, Job>newBuilder()
.setMethodDescriptor(resumeJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ResumeJobRequest>() {
@Override
public Map<String, String> extract(ResumeJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<RunJobRequest, Job> runJobTransportSettings =
GrpcCallSettings.<RunJobRequest, Job>newBuilder()
.setMethodDescriptor(runJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<RunJobRequest>() {
@Override
public Map<String, String> extract(RunJobRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();

this.listJobsCallable =
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-clients/google-cloud-scheduler/synth.metadata
Original file line number Diff line number Diff line change
@@ -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"
}
}
],
Expand Down

0 comments on commit 9b0156b

Please sign in to comment.