Skip to content

Commit

Permalink
Regenerate trace client (#4778)
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 02d1441 commit e265600
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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.devtools.cloudtrace.v1.GetTraceRequest;
import com.google.devtools.cloudtrace.v1.ListTracesRequest;
import com.google.devtools.cloudtrace.v1.ListTracesResponse;
Expand All @@ -33,6 +35,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 @@ -118,6 +121,15 @@ protected GrpcTraceServiceStub(
GrpcCallSettings<PatchTracesRequest, Empty> patchTracesTransportSettings =
GrpcCallSettings.<PatchTracesRequest, Empty>newBuilder()
.setMethodDescriptor(patchTracesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchTracesRequest>() {
@Override
public Map<String, String> extract(PatchTracesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("project_id", String.valueOf(request.getProjectId()));
return params.build();
}
})
.build();
GrpcCallSettings<GetTraceRequest, Trace> getTraceTransportSettings =
GrpcCallSettings.<GetTraceRequest, Trace>newBuilder()
Expand All @@ -126,6 +138,15 @@ protected GrpcTraceServiceStub(
GrpcCallSettings<ListTracesRequest, ListTracesResponse> listTracesTransportSettings =
GrpcCallSettings.<ListTracesRequest, ListTracesResponse>newBuilder()
.setMethodDescriptor(listTracesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListTracesRequest>() {
@Override
public Map<String, String> extract(ListTracesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("project_id", String.valueOf(request.getProjectId()));
return params.build();
}
})
.build();

this.patchTracesCallable =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@
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.devtools.cloudtrace.v2.BatchWriteSpansRequest;
import com.google.devtools.cloudtrace.v2.Span;
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 @@ -105,10 +108,28 @@ protected GrpcTraceServiceStub(
GrpcCallSettings<BatchWriteSpansRequest, Empty> batchWriteSpansTransportSettings =
GrpcCallSettings.<BatchWriteSpansRequest, Empty>newBuilder()
.setMethodDescriptor(batchWriteSpansMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchWriteSpansRequest>() {
@Override
public Map<String, String> extract(BatchWriteSpansRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();
GrpcCallSettings<Span, Span> createSpanTransportSettings =
GrpcCallSettings.<Span, Span>newBuilder()
.setMethodDescriptor(createSpanMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<Span>() {
@Override
public Map<String, String> extract(Span request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
})
.build();

this.batchWriteSpansCallable =
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-clients/google-cloud-trace/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-03-06T08:55:06.586413Z",
"updateTime": "2019-03-28T07:59:19.919927Z",
"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"
}
}
],
Expand Down

0 comments on commit e265600

Please sign in to comment.