Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate pubsub client #4772

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
Expand All @@ -44,6 +46,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;

Expand Down Expand Up @@ -196,45 +199,135 @@ protected GrpcPublisherStub(
GrpcCallSettings<Topic, Topic> createTopicTransportSettings =
GrpcCallSettings.<Topic, Topic>newBuilder()
.setMethodDescriptor(createTopicMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Topic>() {
@Override
public Map<String, String> extract(Topic request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<UpdateTopicRequest, Topic> updateTopicTransportSettings =
GrpcCallSettings.<UpdateTopicRequest, Topic>newBuilder()
.setMethodDescriptor(updateTopicMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateTopicRequest>() {
@Override
public Map<String, String> extract(UpdateTopicRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("topic.name", String.valueOf(request.getTopic().getName()));
return params.build();
}
})
.build();
GrpcCallSettings<PublishRequest, PublishResponse> publishTransportSettings =
GrpcCallSettings.<PublishRequest, PublishResponse>newBuilder()
.setMethodDescriptor(publishMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PublishRequest>() {
@Override
public Map<String, String> extract(PublishRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("topic", String.valueOf(request.getTopic()));
return params.build();
}
})
.build();
GrpcCallSettings<GetTopicRequest, Topic> getTopicTransportSettings =
GrpcCallSettings.<GetTopicRequest, Topic>newBuilder()
.setMethodDescriptor(getTopicMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetTopicRequest>() {
@Override
public Map<String, String> extract(GetTopicRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("topic", String.valueOf(request.getTopic()));
return params.build();
}
})
.build();
GrpcCallSettings<ListTopicsRequest, ListTopicsResponse> listTopicsTransportSettings =
GrpcCallSettings.<ListTopicsRequest, ListTopicsResponse>newBuilder()
.setMethodDescriptor(listTopicsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListTopicsRequest>() {
@Override
public Map<String, String> extract(ListTopicsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("project", String.valueOf(request.getProject()));
return params.build();
}
})
.build();
GrpcCallSettings<ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse>
listTopicSubscriptionsTransportSettings =
GrpcCallSettings
.<ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse>newBuilder()
.setMethodDescriptor(listTopicSubscriptionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListTopicSubscriptionsRequest>() {
@Override
public Map<String, String> extract(ListTopicSubscriptionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("topic", String.valueOf(request.getTopic()));
return params.build();
}
})
.build();
GrpcCallSettings<DeleteTopicRequest, Empty> deleteTopicTransportSettings =
GrpcCallSettings.<DeleteTopicRequest, Empty>newBuilder()
.setMethodDescriptor(deleteTopicMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteTopicRequest>() {
@Override
public Map<String, String> extract(DeleteTopicRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("topic", String.valueOf(request.getTopic()));
return params.build();
}
})
.build();
GrpcCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =
GrpcCallSettings.<SetIamPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(setIamPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SetIamPolicyRequest>() {
@Override
public Map<String, String> extract(SetIamPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
})
.build();
GrpcCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =
GrpcCallSettings.<GetIamPolicyRequest, Policy>newBuilder()
.setMethodDescriptor(getIamPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetIamPolicyRequest>() {
@Override
public Map<String, String> extract(GetIamPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
})
.build();
GrpcCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsTransportSettings =
GrpcCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()
.setMethodDescriptor(testIamPermissionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<TestIamPermissionsRequest>() {
@Override
public Map<String, String> extract(TestIamPermissionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
})
.build();

this.createTopicCallable =
Expand Down
Loading