1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.google.devtools.cloudtrace.v1; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * This file describes an API for collecting and viewing traces and spans 25 * within a trace. A Trace is a collection of spans corresponding to a single 26 * operation or set of operations for an application. A span is an individual 27 * timed event which forms a node of the trace tree. Spans for a single trace 28 * may span multiple services. 29 * </pre> 30 */ 31 @javax.annotation.Generated( 32 value = "by gRPC proto compiler", 33 comments = "Source: google/devtools/cloudtrace/v1/trace.proto") 34 @io.grpc.stub.annotations.GrpcGenerated 35 public final class TraceServiceGrpc { 36 TraceServiceGrpc()37 private TraceServiceGrpc() {} 38 39 public static final String SERVICE_NAME = "google.devtools.cloudtrace.v1.TraceService"; 40 41 // Static method descriptors that strictly reflect the proto. 42 private static volatile io.grpc.MethodDescriptor< 43 com.google.devtools.cloudtrace.v1.ListTracesRequest, 44 com.google.devtools.cloudtrace.v1.ListTracesResponse> 45 getListTracesMethod; 46 47 @io.grpc.stub.annotations.RpcMethod( 48 fullMethodName = SERVICE_NAME + '/' + "ListTraces", 49 requestType = com.google.devtools.cloudtrace.v1.ListTracesRequest.class, 50 responseType = com.google.devtools.cloudtrace.v1.ListTracesResponse.class, 51 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 52 public static io.grpc.MethodDescriptor< 53 com.google.devtools.cloudtrace.v1.ListTracesRequest, 54 com.google.devtools.cloudtrace.v1.ListTracesResponse> getListTracesMethod()55 getListTracesMethod() { 56 io.grpc.MethodDescriptor< 57 com.google.devtools.cloudtrace.v1.ListTracesRequest, 58 com.google.devtools.cloudtrace.v1.ListTracesResponse> 59 getListTracesMethod; 60 if ((getListTracesMethod = TraceServiceGrpc.getListTracesMethod) == null) { 61 synchronized (TraceServiceGrpc.class) { 62 if ((getListTracesMethod = TraceServiceGrpc.getListTracesMethod) == null) { 63 TraceServiceGrpc.getListTracesMethod = 64 getListTracesMethod = 65 io.grpc.MethodDescriptor 66 .<com.google.devtools.cloudtrace.v1.ListTracesRequest, 67 com.google.devtools.cloudtrace.v1.ListTracesResponse> 68 newBuilder() 69 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 70 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTraces")) 71 .setSampledToLocalTracing(true) 72 .setRequestMarshaller( 73 io.grpc.protobuf.ProtoUtils.marshaller( 74 com.google.devtools.cloudtrace.v1.ListTracesRequest 75 .getDefaultInstance())) 76 .setResponseMarshaller( 77 io.grpc.protobuf.ProtoUtils.marshaller( 78 com.google.devtools.cloudtrace.v1.ListTracesResponse 79 .getDefaultInstance())) 80 .setSchemaDescriptor(new TraceServiceMethodDescriptorSupplier("ListTraces")) 81 .build(); 82 } 83 } 84 } 85 return getListTracesMethod; 86 } 87 88 private static volatile io.grpc.MethodDescriptor< 89 com.google.devtools.cloudtrace.v1.GetTraceRequest, 90 com.google.devtools.cloudtrace.v1.Trace> 91 getGetTraceMethod; 92 93 @io.grpc.stub.annotations.RpcMethod( 94 fullMethodName = SERVICE_NAME + '/' + "GetTrace", 95 requestType = com.google.devtools.cloudtrace.v1.GetTraceRequest.class, 96 responseType = com.google.devtools.cloudtrace.v1.Trace.class, 97 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 98 public static io.grpc.MethodDescriptor< 99 com.google.devtools.cloudtrace.v1.GetTraceRequest, 100 com.google.devtools.cloudtrace.v1.Trace> getGetTraceMethod()101 getGetTraceMethod() { 102 io.grpc.MethodDescriptor< 103 com.google.devtools.cloudtrace.v1.GetTraceRequest, 104 com.google.devtools.cloudtrace.v1.Trace> 105 getGetTraceMethod; 106 if ((getGetTraceMethod = TraceServiceGrpc.getGetTraceMethod) == null) { 107 synchronized (TraceServiceGrpc.class) { 108 if ((getGetTraceMethod = TraceServiceGrpc.getGetTraceMethod) == null) { 109 TraceServiceGrpc.getGetTraceMethod = 110 getGetTraceMethod = 111 io.grpc.MethodDescriptor 112 .<com.google.devtools.cloudtrace.v1.GetTraceRequest, 113 com.google.devtools.cloudtrace.v1.Trace> 114 newBuilder() 115 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 116 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTrace")) 117 .setSampledToLocalTracing(true) 118 .setRequestMarshaller( 119 io.grpc.protobuf.ProtoUtils.marshaller( 120 com.google.devtools.cloudtrace.v1.GetTraceRequest 121 .getDefaultInstance())) 122 .setResponseMarshaller( 123 io.grpc.protobuf.ProtoUtils.marshaller( 124 com.google.devtools.cloudtrace.v1.Trace.getDefaultInstance())) 125 .setSchemaDescriptor(new TraceServiceMethodDescriptorSupplier("GetTrace")) 126 .build(); 127 } 128 } 129 } 130 return getGetTraceMethod; 131 } 132 133 private static volatile io.grpc.MethodDescriptor< 134 com.google.devtools.cloudtrace.v1.PatchTracesRequest, com.google.protobuf.Empty> 135 getPatchTracesMethod; 136 137 @io.grpc.stub.annotations.RpcMethod( 138 fullMethodName = SERVICE_NAME + '/' + "PatchTraces", 139 requestType = com.google.devtools.cloudtrace.v1.PatchTracesRequest.class, 140 responseType = com.google.protobuf.Empty.class, 141 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 142 public static io.grpc.MethodDescriptor< 143 com.google.devtools.cloudtrace.v1.PatchTracesRequest, com.google.protobuf.Empty> getPatchTracesMethod()144 getPatchTracesMethod() { 145 io.grpc.MethodDescriptor< 146 com.google.devtools.cloudtrace.v1.PatchTracesRequest, com.google.protobuf.Empty> 147 getPatchTracesMethod; 148 if ((getPatchTracesMethod = TraceServiceGrpc.getPatchTracesMethod) == null) { 149 synchronized (TraceServiceGrpc.class) { 150 if ((getPatchTracesMethod = TraceServiceGrpc.getPatchTracesMethod) == null) { 151 TraceServiceGrpc.getPatchTracesMethod = 152 getPatchTracesMethod = 153 io.grpc.MethodDescriptor 154 .<com.google.devtools.cloudtrace.v1.PatchTracesRequest, 155 com.google.protobuf.Empty> 156 newBuilder() 157 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 158 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PatchTraces")) 159 .setSampledToLocalTracing(true) 160 .setRequestMarshaller( 161 io.grpc.protobuf.ProtoUtils.marshaller( 162 com.google.devtools.cloudtrace.v1.PatchTracesRequest 163 .getDefaultInstance())) 164 .setResponseMarshaller( 165 io.grpc.protobuf.ProtoUtils.marshaller( 166 com.google.protobuf.Empty.getDefaultInstance())) 167 .setSchemaDescriptor(new TraceServiceMethodDescriptorSupplier("PatchTraces")) 168 .build(); 169 } 170 } 171 } 172 return getPatchTracesMethod; 173 } 174 175 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)176 public static TraceServiceStub newStub(io.grpc.Channel channel) { 177 io.grpc.stub.AbstractStub.StubFactory<TraceServiceStub> factory = 178 new io.grpc.stub.AbstractStub.StubFactory<TraceServiceStub>() { 179 @java.lang.Override 180 public TraceServiceStub newStub( 181 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 182 return new TraceServiceStub(channel, callOptions); 183 } 184 }; 185 return TraceServiceStub.newStub(factory, channel); 186 } 187 188 /** 189 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 190 */ newBlockingStub(io.grpc.Channel channel)191 public static TraceServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { 192 io.grpc.stub.AbstractStub.StubFactory<TraceServiceBlockingStub> factory = 193 new io.grpc.stub.AbstractStub.StubFactory<TraceServiceBlockingStub>() { 194 @java.lang.Override 195 public TraceServiceBlockingStub newStub( 196 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 197 return new TraceServiceBlockingStub(channel, callOptions); 198 } 199 }; 200 return TraceServiceBlockingStub.newStub(factory, channel); 201 } 202 203 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)204 public static TraceServiceFutureStub newFutureStub(io.grpc.Channel channel) { 205 io.grpc.stub.AbstractStub.StubFactory<TraceServiceFutureStub> factory = 206 new io.grpc.stub.AbstractStub.StubFactory<TraceServiceFutureStub>() { 207 @java.lang.Override 208 public TraceServiceFutureStub newStub( 209 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 210 return new TraceServiceFutureStub(channel, callOptions); 211 } 212 }; 213 return TraceServiceFutureStub.newStub(factory, channel); 214 } 215 216 /** 217 * 218 * 219 * <pre> 220 * This file describes an API for collecting and viewing traces and spans 221 * within a trace. A Trace is a collection of spans corresponding to a single 222 * operation or set of operations for an application. A span is an individual 223 * timed event which forms a node of the trace tree. Spans for a single trace 224 * may span multiple services. 225 * </pre> 226 */ 227 public interface AsyncService { 228 229 /** 230 * 231 * 232 * <pre> 233 * Returns of a list of traces that match the specified filter conditions. 234 * </pre> 235 */ listTraces( com.google.devtools.cloudtrace.v1.ListTracesRequest request, io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.ListTracesResponse> responseObserver)236 default void listTraces( 237 com.google.devtools.cloudtrace.v1.ListTracesRequest request, 238 io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.ListTracesResponse> 239 responseObserver) { 240 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTracesMethod(), responseObserver); 241 } 242 243 /** 244 * 245 * 246 * <pre> 247 * Gets a single trace by its ID. 248 * </pre> 249 */ getTrace( com.google.devtools.cloudtrace.v1.GetTraceRequest request, io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.Trace> responseObserver)250 default void getTrace( 251 com.google.devtools.cloudtrace.v1.GetTraceRequest request, 252 io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.Trace> responseObserver) { 253 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTraceMethod(), responseObserver); 254 } 255 256 /** 257 * 258 * 259 * <pre> 260 * Sends new traces to Stackdriver Trace or updates existing traces. If the ID 261 * of a trace that you send matches that of an existing trace, any fields 262 * in the existing trace and its spans are overwritten by the provided values, 263 * and any new fields provided are merged with the existing trace data. If the 264 * ID does not match, a new trace is created. 265 * </pre> 266 */ patchTraces( com.google.devtools.cloudtrace.v1.PatchTracesRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)267 default void patchTraces( 268 com.google.devtools.cloudtrace.v1.PatchTracesRequest request, 269 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 270 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 271 getPatchTracesMethod(), responseObserver); 272 } 273 } 274 275 /** 276 * Base class for the server implementation of the service TraceService. 277 * 278 * <pre> 279 * This file describes an API for collecting and viewing traces and spans 280 * within a trace. A Trace is a collection of spans corresponding to a single 281 * operation or set of operations for an application. A span is an individual 282 * timed event which forms a node of the trace tree. Spans for a single trace 283 * may span multiple services. 284 * </pre> 285 */ 286 public abstract static class TraceServiceImplBase 287 implements io.grpc.BindableService, AsyncService { 288 289 @java.lang.Override bindService()290 public final io.grpc.ServerServiceDefinition bindService() { 291 return TraceServiceGrpc.bindService(this); 292 } 293 } 294 295 /** 296 * A stub to allow clients to do asynchronous rpc calls to service TraceService. 297 * 298 * <pre> 299 * This file describes an API for collecting and viewing traces and spans 300 * within a trace. A Trace is a collection of spans corresponding to a single 301 * operation or set of operations for an application. A span is an individual 302 * timed event which forms a node of the trace tree. Spans for a single trace 303 * may span multiple services. 304 * </pre> 305 */ 306 public static final class TraceServiceStub 307 extends io.grpc.stub.AbstractAsyncStub<TraceServiceStub> { TraceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)308 private TraceServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 309 super(channel, callOptions); 310 } 311 312 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)313 protected TraceServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 314 return new TraceServiceStub(channel, callOptions); 315 } 316 317 /** 318 * 319 * 320 * <pre> 321 * Returns of a list of traces that match the specified filter conditions. 322 * </pre> 323 */ listTraces( com.google.devtools.cloudtrace.v1.ListTracesRequest request, io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.ListTracesResponse> responseObserver)324 public void listTraces( 325 com.google.devtools.cloudtrace.v1.ListTracesRequest request, 326 io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.ListTracesResponse> 327 responseObserver) { 328 io.grpc.stub.ClientCalls.asyncUnaryCall( 329 getChannel().newCall(getListTracesMethod(), getCallOptions()), request, responseObserver); 330 } 331 332 /** 333 * 334 * 335 * <pre> 336 * Gets a single trace by its ID. 337 * </pre> 338 */ getTrace( com.google.devtools.cloudtrace.v1.GetTraceRequest request, io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.Trace> responseObserver)339 public void getTrace( 340 com.google.devtools.cloudtrace.v1.GetTraceRequest request, 341 io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.Trace> responseObserver) { 342 io.grpc.stub.ClientCalls.asyncUnaryCall( 343 getChannel().newCall(getGetTraceMethod(), getCallOptions()), request, responseObserver); 344 } 345 346 /** 347 * 348 * 349 * <pre> 350 * Sends new traces to Stackdriver Trace or updates existing traces. If the ID 351 * of a trace that you send matches that of an existing trace, any fields 352 * in the existing trace and its spans are overwritten by the provided values, 353 * and any new fields provided are merged with the existing trace data. If the 354 * ID does not match, a new trace is created. 355 * </pre> 356 */ patchTraces( com.google.devtools.cloudtrace.v1.PatchTracesRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)357 public void patchTraces( 358 com.google.devtools.cloudtrace.v1.PatchTracesRequest request, 359 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 360 io.grpc.stub.ClientCalls.asyncUnaryCall( 361 getChannel().newCall(getPatchTracesMethod(), getCallOptions()), 362 request, 363 responseObserver); 364 } 365 } 366 367 /** 368 * A stub to allow clients to do synchronous rpc calls to service TraceService. 369 * 370 * <pre> 371 * This file describes an API for collecting and viewing traces and spans 372 * within a trace. A Trace is a collection of spans corresponding to a single 373 * operation or set of operations for an application. A span is an individual 374 * timed event which forms a node of the trace tree. Spans for a single trace 375 * may span multiple services. 376 * </pre> 377 */ 378 public static final class TraceServiceBlockingStub 379 extends io.grpc.stub.AbstractBlockingStub<TraceServiceBlockingStub> { TraceServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)380 private TraceServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 381 super(channel, callOptions); 382 } 383 384 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)385 protected TraceServiceBlockingStub build( 386 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 387 return new TraceServiceBlockingStub(channel, callOptions); 388 } 389 390 /** 391 * 392 * 393 * <pre> 394 * Returns of a list of traces that match the specified filter conditions. 395 * </pre> 396 */ listTraces( com.google.devtools.cloudtrace.v1.ListTracesRequest request)397 public com.google.devtools.cloudtrace.v1.ListTracesResponse listTraces( 398 com.google.devtools.cloudtrace.v1.ListTracesRequest request) { 399 return io.grpc.stub.ClientCalls.blockingUnaryCall( 400 getChannel(), getListTracesMethod(), getCallOptions(), request); 401 } 402 403 /** 404 * 405 * 406 * <pre> 407 * Gets a single trace by its ID. 408 * </pre> 409 */ getTrace( com.google.devtools.cloudtrace.v1.GetTraceRequest request)410 public com.google.devtools.cloudtrace.v1.Trace getTrace( 411 com.google.devtools.cloudtrace.v1.GetTraceRequest request) { 412 return io.grpc.stub.ClientCalls.blockingUnaryCall( 413 getChannel(), getGetTraceMethod(), getCallOptions(), request); 414 } 415 416 /** 417 * 418 * 419 * <pre> 420 * Sends new traces to Stackdriver Trace or updates existing traces. If the ID 421 * of a trace that you send matches that of an existing trace, any fields 422 * in the existing trace and its spans are overwritten by the provided values, 423 * and any new fields provided are merged with the existing trace data. If the 424 * ID does not match, a new trace is created. 425 * </pre> 426 */ patchTraces( com.google.devtools.cloudtrace.v1.PatchTracesRequest request)427 public com.google.protobuf.Empty patchTraces( 428 com.google.devtools.cloudtrace.v1.PatchTracesRequest request) { 429 return io.grpc.stub.ClientCalls.blockingUnaryCall( 430 getChannel(), getPatchTracesMethod(), getCallOptions(), request); 431 } 432 } 433 434 /** 435 * A stub to allow clients to do ListenableFuture-style rpc calls to service TraceService. 436 * 437 * <pre> 438 * This file describes an API for collecting and viewing traces and spans 439 * within a trace. A Trace is a collection of spans corresponding to a single 440 * operation or set of operations for an application. A span is an individual 441 * timed event which forms a node of the trace tree. Spans for a single trace 442 * may span multiple services. 443 * </pre> 444 */ 445 public static final class TraceServiceFutureStub 446 extends io.grpc.stub.AbstractFutureStub<TraceServiceFutureStub> { TraceServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)447 private TraceServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 448 super(channel, callOptions); 449 } 450 451 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)452 protected TraceServiceFutureStub build( 453 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 454 return new TraceServiceFutureStub(channel, callOptions); 455 } 456 457 /** 458 * 459 * 460 * <pre> 461 * Returns of a list of traces that match the specified filter conditions. 462 * </pre> 463 */ 464 public com.google.common.util.concurrent.ListenableFuture< 465 com.google.devtools.cloudtrace.v1.ListTracesResponse> listTraces(com.google.devtools.cloudtrace.v1.ListTracesRequest request)466 listTraces(com.google.devtools.cloudtrace.v1.ListTracesRequest request) { 467 return io.grpc.stub.ClientCalls.futureUnaryCall( 468 getChannel().newCall(getListTracesMethod(), getCallOptions()), request); 469 } 470 471 /** 472 * 473 * 474 * <pre> 475 * Gets a single trace by its ID. 476 * </pre> 477 */ 478 public com.google.common.util.concurrent.ListenableFuture< 479 com.google.devtools.cloudtrace.v1.Trace> getTrace(com.google.devtools.cloudtrace.v1.GetTraceRequest request)480 getTrace(com.google.devtools.cloudtrace.v1.GetTraceRequest request) { 481 return io.grpc.stub.ClientCalls.futureUnaryCall( 482 getChannel().newCall(getGetTraceMethod(), getCallOptions()), request); 483 } 484 485 /** 486 * 487 * 488 * <pre> 489 * Sends new traces to Stackdriver Trace or updates existing traces. If the ID 490 * of a trace that you send matches that of an existing trace, any fields 491 * in the existing trace and its spans are overwritten by the provided values, 492 * and any new fields provided are merged with the existing trace data. If the 493 * ID does not match, a new trace is created. 494 * </pre> 495 */ 496 public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> patchTraces(com.google.devtools.cloudtrace.v1.PatchTracesRequest request)497 patchTraces(com.google.devtools.cloudtrace.v1.PatchTracesRequest request) { 498 return io.grpc.stub.ClientCalls.futureUnaryCall( 499 getChannel().newCall(getPatchTracesMethod(), getCallOptions()), request); 500 } 501 } 502 503 private static final int METHODID_LIST_TRACES = 0; 504 private static final int METHODID_GET_TRACE = 1; 505 private static final int METHODID_PATCH_TRACES = 2; 506 507 private static final class MethodHandlers<Req, Resp> 508 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 509 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 510 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 511 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 512 private final AsyncService serviceImpl; 513 private final int methodId; 514 MethodHandlers(AsyncService serviceImpl, int methodId)515 MethodHandlers(AsyncService serviceImpl, int methodId) { 516 this.serviceImpl = serviceImpl; 517 this.methodId = methodId; 518 } 519 520 @java.lang.Override 521 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)522 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 523 switch (methodId) { 524 case METHODID_LIST_TRACES: 525 serviceImpl.listTraces( 526 (com.google.devtools.cloudtrace.v1.ListTracesRequest) request, 527 (io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.ListTracesResponse>) 528 responseObserver); 529 break; 530 case METHODID_GET_TRACE: 531 serviceImpl.getTrace( 532 (com.google.devtools.cloudtrace.v1.GetTraceRequest) request, 533 (io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v1.Trace>) 534 responseObserver); 535 break; 536 case METHODID_PATCH_TRACES: 537 serviceImpl.patchTraces( 538 (com.google.devtools.cloudtrace.v1.PatchTracesRequest) request, 539 (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver); 540 break; 541 default: 542 throw new AssertionError(); 543 } 544 } 545 546 @java.lang.Override 547 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)548 public io.grpc.stub.StreamObserver<Req> invoke( 549 io.grpc.stub.StreamObserver<Resp> responseObserver) { 550 switch (methodId) { 551 default: 552 throw new AssertionError(); 553 } 554 } 555 } 556 bindService(AsyncService service)557 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 558 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 559 .addMethod( 560 getListTracesMethod(), 561 io.grpc.stub.ServerCalls.asyncUnaryCall( 562 new MethodHandlers< 563 com.google.devtools.cloudtrace.v1.ListTracesRequest, 564 com.google.devtools.cloudtrace.v1.ListTracesResponse>( 565 service, METHODID_LIST_TRACES))) 566 .addMethod( 567 getGetTraceMethod(), 568 io.grpc.stub.ServerCalls.asyncUnaryCall( 569 new MethodHandlers< 570 com.google.devtools.cloudtrace.v1.GetTraceRequest, 571 com.google.devtools.cloudtrace.v1.Trace>(service, METHODID_GET_TRACE))) 572 .addMethod( 573 getPatchTracesMethod(), 574 io.grpc.stub.ServerCalls.asyncUnaryCall( 575 new MethodHandlers< 576 com.google.devtools.cloudtrace.v1.PatchTracesRequest, 577 com.google.protobuf.Empty>(service, METHODID_PATCH_TRACES))) 578 .build(); 579 } 580 581 private abstract static class TraceServiceBaseDescriptorSupplier 582 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 583 io.grpc.protobuf.ProtoServiceDescriptorSupplier { TraceServiceBaseDescriptorSupplier()584 TraceServiceBaseDescriptorSupplier() {} 585 586 @java.lang.Override getFileDescriptor()587 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 588 return com.google.devtools.cloudtrace.v1.TraceProto.getDescriptor(); 589 } 590 591 @java.lang.Override getServiceDescriptor()592 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 593 return getFileDescriptor().findServiceByName("TraceService"); 594 } 595 } 596 597 private static final class TraceServiceFileDescriptorSupplier 598 extends TraceServiceBaseDescriptorSupplier { TraceServiceFileDescriptorSupplier()599 TraceServiceFileDescriptorSupplier() {} 600 } 601 602 private static final class TraceServiceMethodDescriptorSupplier 603 extends TraceServiceBaseDescriptorSupplier 604 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 605 private final String methodName; 606 TraceServiceMethodDescriptorSupplier(String methodName)607 TraceServiceMethodDescriptorSupplier(String methodName) { 608 this.methodName = methodName; 609 } 610 611 @java.lang.Override getMethodDescriptor()612 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 613 return getServiceDescriptor().findMethodByName(methodName); 614 } 615 } 616 617 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 618 getServiceDescriptor()619 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 620 io.grpc.ServiceDescriptor result = serviceDescriptor; 621 if (result == null) { 622 synchronized (TraceServiceGrpc.class) { 623 result = serviceDescriptor; 624 if (result == null) { 625 serviceDescriptor = 626 result = 627 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 628 .setSchemaDescriptor(new TraceServiceFileDescriptorSupplier()) 629 .addMethod(getListTracesMethod()) 630 .addMethod(getGetTraceMethod()) 631 .addMethod(getPatchTracesMethod()) 632 .build(); 633 } 634 } 635 } 636 return result; 637 } 638 } 639