xref: /aosp_15_r20/external/grpc-grpc-java/compiler/src/testLite/golden/TestService.java.txt (revision e07d83d3ffcef9ecfc9f7f475418ec639ff0e5fe)
1*e07d83d3SAndroid Build Coastguard Workerpackage io.grpc.testing.compiler;
2*e07d83d3SAndroid Build Coastguard Worker
3*e07d83d3SAndroid Build Coastguard Workerimport static io.grpc.MethodDescriptor.generateFullMethodName;
4*e07d83d3SAndroid Build Coastguard Worker
5*e07d83d3SAndroid Build Coastguard Worker/**
6*e07d83d3SAndroid Build Coastguard Worker * <pre>
7*e07d83d3SAndroid Build Coastguard Worker * Test service that supports all call types.
8*e07d83d3SAndroid Build Coastguard Worker * </pre>
9*e07d83d3SAndroid Build Coastguard Worker */
10*e07d83d3SAndroid Build Coastguard Worker@javax.annotation.Generated(
11*e07d83d3SAndroid Build Coastguard Worker    value = "by gRPC proto compiler (version 1.56.1-SNAPSHOT)",
12*e07d83d3SAndroid Build Coastguard Worker    comments = "Source: grpc/testing/compiler/test.proto")
13*e07d83d3SAndroid Build Coastguard Worker@io.grpc.stub.annotations.GrpcGenerated
14*e07d83d3SAndroid Build Coastguard Workerpublic final class TestServiceGrpc {
15*e07d83d3SAndroid Build Coastguard Worker
16*e07d83d3SAndroid Build Coastguard Worker  private TestServiceGrpc() {}
17*e07d83d3SAndroid Build Coastguard Worker
18*e07d83d3SAndroid Build Coastguard Worker  public static final String SERVICE_NAME = "grpc.testing.compiler.TestService";
19*e07d83d3SAndroid Build Coastguard Worker
20*e07d83d3SAndroid Build Coastguard Worker  // Static method descriptors that strictly reflect the proto.
21*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest,
22*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.SimpleResponse> getUnaryCallMethod;
23*e07d83d3SAndroid Build Coastguard Worker
24*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
25*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "UnaryCall",
26*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.SimpleRequest.class,
27*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.SimpleResponse.class,
28*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
29*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest,
30*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.SimpleResponse> getUnaryCallMethod() {
31*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest, io.grpc.testing.compiler.Test.SimpleResponse> getUnaryCallMethod;
32*e07d83d3SAndroid Build Coastguard Worker    if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) {
33*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
34*e07d83d3SAndroid Build Coastguard Worker        if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) {
35*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getUnaryCallMethod = getUnaryCallMethod =
36*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.SimpleRequest, io.grpc.testing.compiler.Test.SimpleResponse>newBuilder()
37*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
38*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnaryCall"))
39*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
40*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
41*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.SimpleRequest.getDefaultInstance()))
42*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
43*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.SimpleResponse.getDefaultInstance()))
44*e07d83d3SAndroid Build Coastguard Worker              .build();
45*e07d83d3SAndroid Build Coastguard Worker        }
46*e07d83d3SAndroid Build Coastguard Worker      }
47*e07d83d3SAndroid Build Coastguard Worker    }
48*e07d83d3SAndroid Build Coastguard Worker    return getUnaryCallMethod;
49*e07d83d3SAndroid Build Coastguard Worker  }
50*e07d83d3SAndroid Build Coastguard Worker
51*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
52*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getStreamingOutputCallMethod;
53*e07d83d3SAndroid Build Coastguard Worker
54*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
55*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "StreamingOutputCall",
56*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
57*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
58*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
59*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
60*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getStreamingOutputCallMethod() {
61*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getStreamingOutputCallMethod;
62*e07d83d3SAndroid Build Coastguard Worker    if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) {
63*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
64*e07d83d3SAndroid Build Coastguard Worker        if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) {
65*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getStreamingOutputCallMethod = getStreamingOutputCallMethod =
66*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>newBuilder()
67*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
68*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamingOutputCall"))
69*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
70*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
71*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance()))
72*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
73*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance()))
74*e07d83d3SAndroid Build Coastguard Worker              .build();
75*e07d83d3SAndroid Build Coastguard Worker        }
76*e07d83d3SAndroid Build Coastguard Worker      }
77*e07d83d3SAndroid Build Coastguard Worker    }
78*e07d83d3SAndroid Build Coastguard Worker    return getStreamingOutputCallMethod;
79*e07d83d3SAndroid Build Coastguard Worker  }
80*e07d83d3SAndroid Build Coastguard Worker
81*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingInputCallRequest,
82*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingInputCallResponse> getStreamingInputCallMethod;
83*e07d83d3SAndroid Build Coastguard Worker
84*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
85*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "StreamingInputCall",
86*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.StreamingInputCallRequest.class,
87*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.StreamingInputCallResponse.class,
88*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
89*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingInputCallRequest,
90*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingInputCallResponse> getStreamingInputCallMethod() {
91*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse> getStreamingInputCallMethod;
92*e07d83d3SAndroid Build Coastguard Worker    if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) {
93*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
94*e07d83d3SAndroid Build Coastguard Worker        if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) {
95*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getStreamingInputCallMethod = getStreamingInputCallMethod =
96*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse>newBuilder()
97*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
98*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamingInputCall"))
99*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
100*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
101*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingInputCallRequest.getDefaultInstance()))
102*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
103*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingInputCallResponse.getDefaultInstance()))
104*e07d83d3SAndroid Build Coastguard Worker              .build();
105*e07d83d3SAndroid Build Coastguard Worker        }
106*e07d83d3SAndroid Build Coastguard Worker      }
107*e07d83d3SAndroid Build Coastguard Worker    }
108*e07d83d3SAndroid Build Coastguard Worker    return getStreamingInputCallMethod;
109*e07d83d3SAndroid Build Coastguard Worker  }
110*e07d83d3SAndroid Build Coastguard Worker
111*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
112*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getFullBidiCallMethod;
113*e07d83d3SAndroid Build Coastguard Worker
114*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
115*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "FullBidiCall",
116*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
117*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
118*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
119*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
120*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getFullBidiCallMethod() {
121*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getFullBidiCallMethod;
122*e07d83d3SAndroid Build Coastguard Worker    if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) {
123*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
124*e07d83d3SAndroid Build Coastguard Worker        if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) {
125*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getFullBidiCallMethod = getFullBidiCallMethod =
126*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>newBuilder()
127*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
128*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FullBidiCall"))
129*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
130*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
131*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance()))
132*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
133*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance()))
134*e07d83d3SAndroid Build Coastguard Worker              .build();
135*e07d83d3SAndroid Build Coastguard Worker        }
136*e07d83d3SAndroid Build Coastguard Worker      }
137*e07d83d3SAndroid Build Coastguard Worker    }
138*e07d83d3SAndroid Build Coastguard Worker    return getFullBidiCallMethod;
139*e07d83d3SAndroid Build Coastguard Worker  }
140*e07d83d3SAndroid Build Coastguard Worker
141*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
142*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getHalfBidiCallMethod;
143*e07d83d3SAndroid Build Coastguard Worker
144*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
145*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "HalfBidiCall",
146*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
147*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
148*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
149*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
150*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getHalfBidiCallMethod() {
151*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getHalfBidiCallMethod;
152*e07d83d3SAndroid Build Coastguard Worker    if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) {
153*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
154*e07d83d3SAndroid Build Coastguard Worker        if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) {
155*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getHalfBidiCallMethod = getHalfBidiCallMethod =
156*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.StreamingOutputCallRequest, io.grpc.testing.compiler.Test.StreamingOutputCallResponse>newBuilder()
157*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
158*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HalfBidiCall"))
159*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
160*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
161*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance()))
162*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
163*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance()))
164*e07d83d3SAndroid Build Coastguard Worker              .build();
165*e07d83d3SAndroid Build Coastguard Worker        }
166*e07d83d3SAndroid Build Coastguard Worker      }
167*e07d83d3SAndroid Build Coastguard Worker    }
168*e07d83d3SAndroid Build Coastguard Worker    return getHalfBidiCallMethod;
169*e07d83d3SAndroid Build Coastguard Worker  }
170*e07d83d3SAndroid Build Coastguard Worker
171*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingInputCallRequest,
172*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingInputCallResponse> getImportMethod;
173*e07d83d3SAndroid Build Coastguard Worker
174*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
175*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "Import",
176*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.StreamingInputCallRequest.class,
177*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.StreamingInputCallResponse.class,
178*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
179*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingInputCallRequest,
180*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.StreamingInputCallResponse> getImportMethod() {
181*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse> getImportMethod;
182*e07d83d3SAndroid Build Coastguard Worker    if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) {
183*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
184*e07d83d3SAndroid Build Coastguard Worker        if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) {
185*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getImportMethod = getImportMethod =
186*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.StreamingInputCallRequest, io.grpc.testing.compiler.Test.StreamingInputCallResponse>newBuilder()
187*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
188*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Import"))
189*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
190*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
191*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingInputCallRequest.getDefaultInstance()))
192*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
193*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.StreamingInputCallResponse.getDefaultInstance()))
194*e07d83d3SAndroid Build Coastguard Worker              .build();
195*e07d83d3SAndroid Build Coastguard Worker        }
196*e07d83d3SAndroid Build Coastguard Worker      }
197*e07d83d3SAndroid Build Coastguard Worker    }
198*e07d83d3SAndroid Build Coastguard Worker    return getImportMethod;
199*e07d83d3SAndroid Build Coastguard Worker  }
200*e07d83d3SAndroid Build Coastguard Worker
201*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest,
202*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.SimpleResponse> getSafeCallMethod;
203*e07d83d3SAndroid Build Coastguard Worker
204*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
205*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "SafeCall",
206*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.SimpleRequest.class,
207*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.SimpleResponse.class,
208*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
209*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest,
210*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.SimpleResponse> getSafeCallMethod() {
211*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest, io.grpc.testing.compiler.Test.SimpleResponse> getSafeCallMethod;
212*e07d83d3SAndroid Build Coastguard Worker    if ((getSafeCallMethod = TestServiceGrpc.getSafeCallMethod) == null) {
213*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
214*e07d83d3SAndroid Build Coastguard Worker        if ((getSafeCallMethod = TestServiceGrpc.getSafeCallMethod) == null) {
215*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getSafeCallMethod = getSafeCallMethod =
216*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.SimpleRequest, io.grpc.testing.compiler.Test.SimpleResponse>newBuilder()
217*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
218*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SafeCall"))
219*e07d83d3SAndroid Build Coastguard Worker              .setSafe(true)
220*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
221*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
222*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.SimpleRequest.getDefaultInstance()))
223*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
224*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.SimpleResponse.getDefaultInstance()))
225*e07d83d3SAndroid Build Coastguard Worker              .build();
226*e07d83d3SAndroid Build Coastguard Worker        }
227*e07d83d3SAndroid Build Coastguard Worker      }
228*e07d83d3SAndroid Build Coastguard Worker    }
229*e07d83d3SAndroid Build Coastguard Worker    return getSafeCallMethod;
230*e07d83d3SAndroid Build Coastguard Worker  }
231*e07d83d3SAndroid Build Coastguard Worker
232*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest,
233*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.SimpleResponse> getIdempotentCallMethod;
234*e07d83d3SAndroid Build Coastguard Worker
235*e07d83d3SAndroid Build Coastguard Worker  @io.grpc.stub.annotations.RpcMethod(
236*e07d83d3SAndroid Build Coastguard Worker      fullMethodName = SERVICE_NAME + '/' + "IdempotentCall",
237*e07d83d3SAndroid Build Coastguard Worker      requestType = io.grpc.testing.compiler.Test.SimpleRequest.class,
238*e07d83d3SAndroid Build Coastguard Worker      responseType = io.grpc.testing.compiler.Test.SimpleResponse.class,
239*e07d83d3SAndroid Build Coastguard Worker      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
240*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest,
241*e07d83d3SAndroid Build Coastguard Worker      io.grpc.testing.compiler.Test.SimpleResponse> getIdempotentCallMethod() {
242*e07d83d3SAndroid Build Coastguard Worker    io.grpc.MethodDescriptor<io.grpc.testing.compiler.Test.SimpleRequest, io.grpc.testing.compiler.Test.SimpleResponse> getIdempotentCallMethod;
243*e07d83d3SAndroid Build Coastguard Worker    if ((getIdempotentCallMethod = TestServiceGrpc.getIdempotentCallMethod) == null) {
244*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
245*e07d83d3SAndroid Build Coastguard Worker        if ((getIdempotentCallMethod = TestServiceGrpc.getIdempotentCallMethod) == null) {
246*e07d83d3SAndroid Build Coastguard Worker          TestServiceGrpc.getIdempotentCallMethod = getIdempotentCallMethod =
247*e07d83d3SAndroid Build Coastguard Worker              io.grpc.MethodDescriptor.<io.grpc.testing.compiler.Test.SimpleRequest, io.grpc.testing.compiler.Test.SimpleResponse>newBuilder()
248*e07d83d3SAndroid Build Coastguard Worker              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
249*e07d83d3SAndroid Build Coastguard Worker              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IdempotentCall"))
250*e07d83d3SAndroid Build Coastguard Worker              .setIdempotent(true)
251*e07d83d3SAndroid Build Coastguard Worker              .setSampledToLocalTracing(true)
252*e07d83d3SAndroid Build Coastguard Worker              .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
253*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.SimpleRequest.getDefaultInstance()))
254*e07d83d3SAndroid Build Coastguard Worker              .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
255*e07d83d3SAndroid Build Coastguard Worker                  io.grpc.testing.compiler.Test.SimpleResponse.getDefaultInstance()))
256*e07d83d3SAndroid Build Coastguard Worker              .build();
257*e07d83d3SAndroid Build Coastguard Worker        }
258*e07d83d3SAndroid Build Coastguard Worker      }
259*e07d83d3SAndroid Build Coastguard Worker    }
260*e07d83d3SAndroid Build Coastguard Worker    return getIdempotentCallMethod;
261*e07d83d3SAndroid Build Coastguard Worker  }
262*e07d83d3SAndroid Build Coastguard Worker
263*e07d83d3SAndroid Build Coastguard Worker  /**
264*e07d83d3SAndroid Build Coastguard Worker   * Creates a new async stub that supports all call types for the service
265*e07d83d3SAndroid Build Coastguard Worker   */
266*e07d83d3SAndroid Build Coastguard Worker  public static TestServiceStub newStub(io.grpc.Channel channel) {
267*e07d83d3SAndroid Build Coastguard Worker    io.grpc.stub.AbstractStub.StubFactory<TestServiceStub> factory =
268*e07d83d3SAndroid Build Coastguard Worker      new io.grpc.stub.AbstractStub.StubFactory<TestServiceStub>() {
269*e07d83d3SAndroid Build Coastguard Worker        @java.lang.Override
270*e07d83d3SAndroid Build Coastguard Worker        public TestServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
271*e07d83d3SAndroid Build Coastguard Worker          return new TestServiceStub(channel, callOptions);
272*e07d83d3SAndroid Build Coastguard Worker        }
273*e07d83d3SAndroid Build Coastguard Worker      };
274*e07d83d3SAndroid Build Coastguard Worker    return TestServiceStub.newStub(factory, channel);
275*e07d83d3SAndroid Build Coastguard Worker  }
276*e07d83d3SAndroid Build Coastguard Worker
277*e07d83d3SAndroid Build Coastguard Worker  /**
278*e07d83d3SAndroid Build Coastguard Worker   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
279*e07d83d3SAndroid Build Coastguard Worker   */
280*e07d83d3SAndroid Build Coastguard Worker  public static TestServiceBlockingStub newBlockingStub(
281*e07d83d3SAndroid Build Coastguard Worker      io.grpc.Channel channel) {
282*e07d83d3SAndroid Build Coastguard Worker    io.grpc.stub.AbstractStub.StubFactory<TestServiceBlockingStub> factory =
283*e07d83d3SAndroid Build Coastguard Worker      new io.grpc.stub.AbstractStub.StubFactory<TestServiceBlockingStub>() {
284*e07d83d3SAndroid Build Coastguard Worker        @java.lang.Override
285*e07d83d3SAndroid Build Coastguard Worker        public TestServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
286*e07d83d3SAndroid Build Coastguard Worker          return new TestServiceBlockingStub(channel, callOptions);
287*e07d83d3SAndroid Build Coastguard Worker        }
288*e07d83d3SAndroid Build Coastguard Worker      };
289*e07d83d3SAndroid Build Coastguard Worker    return TestServiceBlockingStub.newStub(factory, channel);
290*e07d83d3SAndroid Build Coastguard Worker  }
291*e07d83d3SAndroid Build Coastguard Worker
292*e07d83d3SAndroid Build Coastguard Worker  /**
293*e07d83d3SAndroid Build Coastguard Worker   * Creates a new ListenableFuture-style stub that supports unary calls on the service
294*e07d83d3SAndroid Build Coastguard Worker   */
295*e07d83d3SAndroid Build Coastguard Worker  public static TestServiceFutureStub newFutureStub(
296*e07d83d3SAndroid Build Coastguard Worker      io.grpc.Channel channel) {
297*e07d83d3SAndroid Build Coastguard Worker    io.grpc.stub.AbstractStub.StubFactory<TestServiceFutureStub> factory =
298*e07d83d3SAndroid Build Coastguard Worker      new io.grpc.stub.AbstractStub.StubFactory<TestServiceFutureStub>() {
299*e07d83d3SAndroid Build Coastguard Worker        @java.lang.Override
300*e07d83d3SAndroid Build Coastguard Worker        public TestServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
301*e07d83d3SAndroid Build Coastguard Worker          return new TestServiceFutureStub(channel, callOptions);
302*e07d83d3SAndroid Build Coastguard Worker        }
303*e07d83d3SAndroid Build Coastguard Worker      };
304*e07d83d3SAndroid Build Coastguard Worker    return TestServiceFutureStub.newStub(factory, channel);
305*e07d83d3SAndroid Build Coastguard Worker  }
306*e07d83d3SAndroid Build Coastguard Worker
307*e07d83d3SAndroid Build Coastguard Worker  /**
308*e07d83d3SAndroid Build Coastguard Worker   * <pre>
309*e07d83d3SAndroid Build Coastguard Worker   * Test service that supports all call types.
310*e07d83d3SAndroid Build Coastguard Worker   * </pre>
311*e07d83d3SAndroid Build Coastguard Worker   */
312*e07d83d3SAndroid Build Coastguard Worker  public interface AsyncService {
313*e07d83d3SAndroid Build Coastguard Worker
314*e07d83d3SAndroid Build Coastguard Worker    /**
315*e07d83d3SAndroid Build Coastguard Worker     * <pre>
316*e07d83d3SAndroid Build Coastguard Worker     * One request followed by one response.
317*e07d83d3SAndroid Build Coastguard Worker     * The server returns the client payload as-is.
318*e07d83d3SAndroid Build Coastguard Worker     * </pre>
319*e07d83d3SAndroid Build Coastguard Worker     */
320*e07d83d3SAndroid Build Coastguard Worker    default void unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request,
321*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse> responseObserver) {
322*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver);
323*e07d83d3SAndroid Build Coastguard Worker    }
324*e07d83d3SAndroid Build Coastguard Worker
325*e07d83d3SAndroid Build Coastguard Worker    /**
326*e07d83d3SAndroid Build Coastguard Worker     * <pre>
327*e07d83d3SAndroid Build Coastguard Worker     * One request followed by a sequence of responses (streamed download).
328*e07d83d3SAndroid Build Coastguard Worker     * The server returns the payload with client desired type and sizes.
329*e07d83d3SAndroid Build Coastguard Worker     * </pre>
330*e07d83d3SAndroid Build Coastguard Worker     */
331*e07d83d3SAndroid Build Coastguard Worker    default void streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request,
332*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> responseObserver) {
333*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver);
334*e07d83d3SAndroid Build Coastguard Worker    }
335*e07d83d3SAndroid Build Coastguard Worker
336*e07d83d3SAndroid Build Coastguard Worker    /**
337*e07d83d3SAndroid Build Coastguard Worker     * <pre>
338*e07d83d3SAndroid Build Coastguard Worker     * A sequence of requests followed by one response (streamed upload).
339*e07d83d3SAndroid Build Coastguard Worker     * The server returns the aggregated size of client payload as the result.
340*e07d83d3SAndroid Build Coastguard Worker     * </pre>
341*e07d83d3SAndroid Build Coastguard Worker     */
342*e07d83d3SAndroid Build Coastguard Worker    default io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallRequest> streamingInputCall(
343*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallResponse> responseObserver) {
344*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver);
345*e07d83d3SAndroid Build Coastguard Worker    }
346*e07d83d3SAndroid Build Coastguard Worker
347*e07d83d3SAndroid Build Coastguard Worker    /**
348*e07d83d3SAndroid Build Coastguard Worker     * <pre>
349*e07d83d3SAndroid Build Coastguard Worker     * A sequence of requests with each request served by the server immediately.
350*e07d83d3SAndroid Build Coastguard Worker     * As one request could lead to multiple responses, this interface
351*e07d83d3SAndroid Build Coastguard Worker     * demonstrates the idea of full bidirectionality.
352*e07d83d3SAndroid Build Coastguard Worker     * </pre>
353*e07d83d3SAndroid Build Coastguard Worker     */
354*e07d83d3SAndroid Build Coastguard Worker    default io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallRequest> fullBidiCall(
355*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> responseObserver) {
356*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getFullBidiCallMethod(), responseObserver);
357*e07d83d3SAndroid Build Coastguard Worker    }
358*e07d83d3SAndroid Build Coastguard Worker
359*e07d83d3SAndroid Build Coastguard Worker    /**
360*e07d83d3SAndroid Build Coastguard Worker     * <pre>
361*e07d83d3SAndroid Build Coastguard Worker     * A sequence of requests followed by a sequence of responses.
362*e07d83d3SAndroid Build Coastguard Worker     * The server buffers all the client requests and then serves them in order. A
363*e07d83d3SAndroid Build Coastguard Worker     * stream of responses are returned to the client when the server starts with
364*e07d83d3SAndroid Build Coastguard Worker     * first request.
365*e07d83d3SAndroid Build Coastguard Worker     * </pre>
366*e07d83d3SAndroid Build Coastguard Worker     */
367*e07d83d3SAndroid Build Coastguard Worker    default io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallRequest> halfBidiCall(
368*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> responseObserver) {
369*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHalfBidiCallMethod(), responseObserver);
370*e07d83d3SAndroid Build Coastguard Worker    }
371*e07d83d3SAndroid Build Coastguard Worker
372*e07d83d3SAndroid Build Coastguard Worker    /**
373*e07d83d3SAndroid Build Coastguard Worker     * <pre>
374*e07d83d3SAndroid Build Coastguard Worker     * An RPC method whose Java name collides with a keyword, and whose generated
375*e07d83d3SAndroid Build Coastguard Worker     * method should have a '_' appended.
376*e07d83d3SAndroid Build Coastguard Worker     * </pre>
377*e07d83d3SAndroid Build Coastguard Worker     */
378*e07d83d3SAndroid Build Coastguard Worker    default io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallRequest> import_(
379*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallResponse> responseObserver) {
380*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getImportMethod(), responseObserver);
381*e07d83d3SAndroid Build Coastguard Worker    }
382*e07d83d3SAndroid Build Coastguard Worker
383*e07d83d3SAndroid Build Coastguard Worker    /**
384*e07d83d3SAndroid Build Coastguard Worker     * <pre>
385*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Safe.
386*e07d83d3SAndroid Build Coastguard Worker     * </pre>
387*e07d83d3SAndroid Build Coastguard Worker     */
388*e07d83d3SAndroid Build Coastguard Worker    default void safeCall(io.grpc.testing.compiler.Test.SimpleRequest request,
389*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse> responseObserver) {
390*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSafeCallMethod(), responseObserver);
391*e07d83d3SAndroid Build Coastguard Worker    }
392*e07d83d3SAndroid Build Coastguard Worker
393*e07d83d3SAndroid Build Coastguard Worker    /**
394*e07d83d3SAndroid Build Coastguard Worker     * <pre>
395*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Idempotent.
396*e07d83d3SAndroid Build Coastguard Worker     * </pre>
397*e07d83d3SAndroid Build Coastguard Worker     */
398*e07d83d3SAndroid Build Coastguard Worker    default void idempotentCall(io.grpc.testing.compiler.Test.SimpleRequest request,
399*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse> responseObserver) {
400*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIdempotentCallMethod(), responseObserver);
401*e07d83d3SAndroid Build Coastguard Worker    }
402*e07d83d3SAndroid Build Coastguard Worker  }
403*e07d83d3SAndroid Build Coastguard Worker
404*e07d83d3SAndroid Build Coastguard Worker  /**
405*e07d83d3SAndroid Build Coastguard Worker   * Base class for the server implementation of the service TestService.
406*e07d83d3SAndroid Build Coastguard Worker   * <pre>
407*e07d83d3SAndroid Build Coastguard Worker   * Test service that supports all call types.
408*e07d83d3SAndroid Build Coastguard Worker   * </pre>
409*e07d83d3SAndroid Build Coastguard Worker   */
410*e07d83d3SAndroid Build Coastguard Worker  public static abstract class TestServiceImplBase
411*e07d83d3SAndroid Build Coastguard Worker      implements io.grpc.BindableService, AsyncService {
412*e07d83d3SAndroid Build Coastguard Worker
413*e07d83d3SAndroid Build Coastguard Worker    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
414*e07d83d3SAndroid Build Coastguard Worker      return TestServiceGrpc.bindService(this);
415*e07d83d3SAndroid Build Coastguard Worker    }
416*e07d83d3SAndroid Build Coastguard Worker  }
417*e07d83d3SAndroid Build Coastguard Worker
418*e07d83d3SAndroid Build Coastguard Worker  /**
419*e07d83d3SAndroid Build Coastguard Worker   * A stub to allow clients to do asynchronous rpc calls to service TestService.
420*e07d83d3SAndroid Build Coastguard Worker   * <pre>
421*e07d83d3SAndroid Build Coastguard Worker   * Test service that supports all call types.
422*e07d83d3SAndroid Build Coastguard Worker   * </pre>
423*e07d83d3SAndroid Build Coastguard Worker   */
424*e07d83d3SAndroid Build Coastguard Worker  public static final class TestServiceStub
425*e07d83d3SAndroid Build Coastguard Worker      extends io.grpc.stub.AbstractAsyncStub<TestServiceStub> {
426*e07d83d3SAndroid Build Coastguard Worker    private TestServiceStub(
427*e07d83d3SAndroid Build Coastguard Worker        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
428*e07d83d3SAndroid Build Coastguard Worker      super(channel, callOptions);
429*e07d83d3SAndroid Build Coastguard Worker    }
430*e07d83d3SAndroid Build Coastguard Worker
431*e07d83d3SAndroid Build Coastguard Worker    @java.lang.Override
432*e07d83d3SAndroid Build Coastguard Worker    protected TestServiceStub build(
433*e07d83d3SAndroid Build Coastguard Worker        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
434*e07d83d3SAndroid Build Coastguard Worker      return new TestServiceStub(channel, callOptions);
435*e07d83d3SAndroid Build Coastguard Worker    }
436*e07d83d3SAndroid Build Coastguard Worker
437*e07d83d3SAndroid Build Coastguard Worker    /**
438*e07d83d3SAndroid Build Coastguard Worker     * <pre>
439*e07d83d3SAndroid Build Coastguard Worker     * One request followed by one response.
440*e07d83d3SAndroid Build Coastguard Worker     * The server returns the client payload as-is.
441*e07d83d3SAndroid Build Coastguard Worker     * </pre>
442*e07d83d3SAndroid Build Coastguard Worker     */
443*e07d83d3SAndroid Build Coastguard Worker    public void unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request,
444*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse> responseObserver) {
445*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ClientCalls.asyncUnaryCall(
446*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver);
447*e07d83d3SAndroid Build Coastguard Worker    }
448*e07d83d3SAndroid Build Coastguard Worker
449*e07d83d3SAndroid Build Coastguard Worker    /**
450*e07d83d3SAndroid Build Coastguard Worker     * <pre>
451*e07d83d3SAndroid Build Coastguard Worker     * One request followed by a sequence of responses (streamed download).
452*e07d83d3SAndroid Build Coastguard Worker     * The server returns the payload with client desired type and sizes.
453*e07d83d3SAndroid Build Coastguard Worker     * </pre>
454*e07d83d3SAndroid Build Coastguard Worker     */
455*e07d83d3SAndroid Build Coastguard Worker    public void streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request,
456*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> responseObserver) {
457*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
458*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver);
459*e07d83d3SAndroid Build Coastguard Worker    }
460*e07d83d3SAndroid Build Coastguard Worker
461*e07d83d3SAndroid Build Coastguard Worker    /**
462*e07d83d3SAndroid Build Coastguard Worker     * <pre>
463*e07d83d3SAndroid Build Coastguard Worker     * A sequence of requests followed by one response (streamed upload).
464*e07d83d3SAndroid Build Coastguard Worker     * The server returns the aggregated size of client payload as the result.
465*e07d83d3SAndroid Build Coastguard Worker     * </pre>
466*e07d83d3SAndroid Build Coastguard Worker     */
467*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallRequest> streamingInputCall(
468*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallResponse> responseObserver) {
469*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.asyncClientStreamingCall(
470*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver);
471*e07d83d3SAndroid Build Coastguard Worker    }
472*e07d83d3SAndroid Build Coastguard Worker
473*e07d83d3SAndroid Build Coastguard Worker    /**
474*e07d83d3SAndroid Build Coastguard Worker     * <pre>
475*e07d83d3SAndroid Build Coastguard Worker     * A sequence of requests with each request served by the server immediately.
476*e07d83d3SAndroid Build Coastguard Worker     * As one request could lead to multiple responses, this interface
477*e07d83d3SAndroid Build Coastguard Worker     * demonstrates the idea of full bidirectionality.
478*e07d83d3SAndroid Build Coastguard Worker     * </pre>
479*e07d83d3SAndroid Build Coastguard Worker     */
480*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallRequest> fullBidiCall(
481*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> responseObserver) {
482*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
483*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getFullBidiCallMethod(), getCallOptions()), responseObserver);
484*e07d83d3SAndroid Build Coastguard Worker    }
485*e07d83d3SAndroid Build Coastguard Worker
486*e07d83d3SAndroid Build Coastguard Worker    /**
487*e07d83d3SAndroid Build Coastguard Worker     * <pre>
488*e07d83d3SAndroid Build Coastguard Worker     * A sequence of requests followed by a sequence of responses.
489*e07d83d3SAndroid Build Coastguard Worker     * The server buffers all the client requests and then serves them in order. A
490*e07d83d3SAndroid Build Coastguard Worker     * stream of responses are returned to the client when the server starts with
491*e07d83d3SAndroid Build Coastguard Worker     * first request.
492*e07d83d3SAndroid Build Coastguard Worker     * </pre>
493*e07d83d3SAndroid Build Coastguard Worker     */
494*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallRequest> halfBidiCall(
495*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> responseObserver) {
496*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
497*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getHalfBidiCallMethod(), getCallOptions()), responseObserver);
498*e07d83d3SAndroid Build Coastguard Worker    }
499*e07d83d3SAndroid Build Coastguard Worker
500*e07d83d3SAndroid Build Coastguard Worker    /**
501*e07d83d3SAndroid Build Coastguard Worker     * <pre>
502*e07d83d3SAndroid Build Coastguard Worker     * An RPC method whose Java name collides with a keyword, and whose generated
503*e07d83d3SAndroid Build Coastguard Worker     * method should have a '_' appended.
504*e07d83d3SAndroid Build Coastguard Worker     * </pre>
505*e07d83d3SAndroid Build Coastguard Worker     */
506*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallRequest> import_(
507*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallResponse> responseObserver) {
508*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
509*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getImportMethod(), getCallOptions()), responseObserver);
510*e07d83d3SAndroid Build Coastguard Worker    }
511*e07d83d3SAndroid Build Coastguard Worker
512*e07d83d3SAndroid Build Coastguard Worker    /**
513*e07d83d3SAndroid Build Coastguard Worker     * <pre>
514*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Safe.
515*e07d83d3SAndroid Build Coastguard Worker     * </pre>
516*e07d83d3SAndroid Build Coastguard Worker     */
517*e07d83d3SAndroid Build Coastguard Worker    public void safeCall(io.grpc.testing.compiler.Test.SimpleRequest request,
518*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse> responseObserver) {
519*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ClientCalls.asyncUnaryCall(
520*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getSafeCallMethod(), getCallOptions()), request, responseObserver);
521*e07d83d3SAndroid Build Coastguard Worker    }
522*e07d83d3SAndroid Build Coastguard Worker
523*e07d83d3SAndroid Build Coastguard Worker    /**
524*e07d83d3SAndroid Build Coastguard Worker     * <pre>
525*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Idempotent.
526*e07d83d3SAndroid Build Coastguard Worker     * </pre>
527*e07d83d3SAndroid Build Coastguard Worker     */
528*e07d83d3SAndroid Build Coastguard Worker    public void idempotentCall(io.grpc.testing.compiler.Test.SimpleRequest request,
529*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse> responseObserver) {
530*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ClientCalls.asyncUnaryCall(
531*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getIdempotentCallMethod(), getCallOptions()), request, responseObserver);
532*e07d83d3SAndroid Build Coastguard Worker    }
533*e07d83d3SAndroid Build Coastguard Worker  }
534*e07d83d3SAndroid Build Coastguard Worker
535*e07d83d3SAndroid Build Coastguard Worker  /**
536*e07d83d3SAndroid Build Coastguard Worker   * A stub to allow clients to do synchronous rpc calls to service TestService.
537*e07d83d3SAndroid Build Coastguard Worker   * <pre>
538*e07d83d3SAndroid Build Coastguard Worker   * Test service that supports all call types.
539*e07d83d3SAndroid Build Coastguard Worker   * </pre>
540*e07d83d3SAndroid Build Coastguard Worker   */
541*e07d83d3SAndroid Build Coastguard Worker  public static final class TestServiceBlockingStub
542*e07d83d3SAndroid Build Coastguard Worker      extends io.grpc.stub.AbstractBlockingStub<TestServiceBlockingStub> {
543*e07d83d3SAndroid Build Coastguard Worker    private TestServiceBlockingStub(
544*e07d83d3SAndroid Build Coastguard Worker        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
545*e07d83d3SAndroid Build Coastguard Worker      super(channel, callOptions);
546*e07d83d3SAndroid Build Coastguard Worker    }
547*e07d83d3SAndroid Build Coastguard Worker
548*e07d83d3SAndroid Build Coastguard Worker    @java.lang.Override
549*e07d83d3SAndroid Build Coastguard Worker    protected TestServiceBlockingStub build(
550*e07d83d3SAndroid Build Coastguard Worker        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
551*e07d83d3SAndroid Build Coastguard Worker      return new TestServiceBlockingStub(channel, callOptions);
552*e07d83d3SAndroid Build Coastguard Worker    }
553*e07d83d3SAndroid Build Coastguard Worker
554*e07d83d3SAndroid Build Coastguard Worker    /**
555*e07d83d3SAndroid Build Coastguard Worker     * <pre>
556*e07d83d3SAndroid Build Coastguard Worker     * One request followed by one response.
557*e07d83d3SAndroid Build Coastguard Worker     * The server returns the client payload as-is.
558*e07d83d3SAndroid Build Coastguard Worker     * </pre>
559*e07d83d3SAndroid Build Coastguard Worker     */
560*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.testing.compiler.Test.SimpleResponse unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request) {
561*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.blockingUnaryCall(
562*e07d83d3SAndroid Build Coastguard Worker          getChannel(), getUnaryCallMethod(), getCallOptions(), request);
563*e07d83d3SAndroid Build Coastguard Worker    }
564*e07d83d3SAndroid Build Coastguard Worker
565*e07d83d3SAndroid Build Coastguard Worker    /**
566*e07d83d3SAndroid Build Coastguard Worker     * <pre>
567*e07d83d3SAndroid Build Coastguard Worker     * One request followed by a sequence of responses (streamed download).
568*e07d83d3SAndroid Build Coastguard Worker     * The server returns the payload with client desired type and sizes.
569*e07d83d3SAndroid Build Coastguard Worker     * </pre>
570*e07d83d3SAndroid Build Coastguard Worker     */
571*e07d83d3SAndroid Build Coastguard Worker    public java.util.Iterator<io.grpc.testing.compiler.Test.StreamingOutputCallResponse> streamingOutputCall(
572*e07d83d3SAndroid Build Coastguard Worker        io.grpc.testing.compiler.Test.StreamingOutputCallRequest request) {
573*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
574*e07d83d3SAndroid Build Coastguard Worker          getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request);
575*e07d83d3SAndroid Build Coastguard Worker    }
576*e07d83d3SAndroid Build Coastguard Worker
577*e07d83d3SAndroid Build Coastguard Worker    /**
578*e07d83d3SAndroid Build Coastguard Worker     * <pre>
579*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Safe.
580*e07d83d3SAndroid Build Coastguard Worker     * </pre>
581*e07d83d3SAndroid Build Coastguard Worker     */
582*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.testing.compiler.Test.SimpleResponse safeCall(io.grpc.testing.compiler.Test.SimpleRequest request) {
583*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.blockingUnaryCall(
584*e07d83d3SAndroid Build Coastguard Worker          getChannel(), getSafeCallMethod(), getCallOptions(), request);
585*e07d83d3SAndroid Build Coastguard Worker    }
586*e07d83d3SAndroid Build Coastguard Worker
587*e07d83d3SAndroid Build Coastguard Worker    /**
588*e07d83d3SAndroid Build Coastguard Worker     * <pre>
589*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Idempotent.
590*e07d83d3SAndroid Build Coastguard Worker     * </pre>
591*e07d83d3SAndroid Build Coastguard Worker     */
592*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.testing.compiler.Test.SimpleResponse idempotentCall(io.grpc.testing.compiler.Test.SimpleRequest request) {
593*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.blockingUnaryCall(
594*e07d83d3SAndroid Build Coastguard Worker          getChannel(), getIdempotentCallMethod(), getCallOptions(), request);
595*e07d83d3SAndroid Build Coastguard Worker    }
596*e07d83d3SAndroid Build Coastguard Worker  }
597*e07d83d3SAndroid Build Coastguard Worker
598*e07d83d3SAndroid Build Coastguard Worker  /**
599*e07d83d3SAndroid Build Coastguard Worker   * A stub to allow clients to do ListenableFuture-style rpc calls to service TestService.
600*e07d83d3SAndroid Build Coastguard Worker   * <pre>
601*e07d83d3SAndroid Build Coastguard Worker   * Test service that supports all call types.
602*e07d83d3SAndroid Build Coastguard Worker   * </pre>
603*e07d83d3SAndroid Build Coastguard Worker   */
604*e07d83d3SAndroid Build Coastguard Worker  public static final class TestServiceFutureStub
605*e07d83d3SAndroid Build Coastguard Worker      extends io.grpc.stub.AbstractFutureStub<TestServiceFutureStub> {
606*e07d83d3SAndroid Build Coastguard Worker    private TestServiceFutureStub(
607*e07d83d3SAndroid Build Coastguard Worker        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
608*e07d83d3SAndroid Build Coastguard Worker      super(channel, callOptions);
609*e07d83d3SAndroid Build Coastguard Worker    }
610*e07d83d3SAndroid Build Coastguard Worker
611*e07d83d3SAndroid Build Coastguard Worker    @java.lang.Override
612*e07d83d3SAndroid Build Coastguard Worker    protected TestServiceFutureStub build(
613*e07d83d3SAndroid Build Coastguard Worker        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
614*e07d83d3SAndroid Build Coastguard Worker      return new TestServiceFutureStub(channel, callOptions);
615*e07d83d3SAndroid Build Coastguard Worker    }
616*e07d83d3SAndroid Build Coastguard Worker
617*e07d83d3SAndroid Build Coastguard Worker    /**
618*e07d83d3SAndroid Build Coastguard Worker     * <pre>
619*e07d83d3SAndroid Build Coastguard Worker     * One request followed by one response.
620*e07d83d3SAndroid Build Coastguard Worker     * The server returns the client payload as-is.
621*e07d83d3SAndroid Build Coastguard Worker     * </pre>
622*e07d83d3SAndroid Build Coastguard Worker     */
623*e07d83d3SAndroid Build Coastguard Worker    public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.compiler.Test.SimpleResponse> unaryCall(
624*e07d83d3SAndroid Build Coastguard Worker        io.grpc.testing.compiler.Test.SimpleRequest request) {
625*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.futureUnaryCall(
626*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request);
627*e07d83d3SAndroid Build Coastguard Worker    }
628*e07d83d3SAndroid Build Coastguard Worker
629*e07d83d3SAndroid Build Coastguard Worker    /**
630*e07d83d3SAndroid Build Coastguard Worker     * <pre>
631*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Safe.
632*e07d83d3SAndroid Build Coastguard Worker     * </pre>
633*e07d83d3SAndroid Build Coastguard Worker     */
634*e07d83d3SAndroid Build Coastguard Worker    public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.compiler.Test.SimpleResponse> safeCall(
635*e07d83d3SAndroid Build Coastguard Worker        io.grpc.testing.compiler.Test.SimpleRequest request) {
636*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.futureUnaryCall(
637*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getSafeCallMethod(), getCallOptions()), request);
638*e07d83d3SAndroid Build Coastguard Worker    }
639*e07d83d3SAndroid Build Coastguard Worker
640*e07d83d3SAndroid Build Coastguard Worker    /**
641*e07d83d3SAndroid Build Coastguard Worker     * <pre>
642*e07d83d3SAndroid Build Coastguard Worker     * A unary call that is Idempotent.
643*e07d83d3SAndroid Build Coastguard Worker     * </pre>
644*e07d83d3SAndroid Build Coastguard Worker     */
645*e07d83d3SAndroid Build Coastguard Worker    public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.compiler.Test.SimpleResponse> idempotentCall(
646*e07d83d3SAndroid Build Coastguard Worker        io.grpc.testing.compiler.Test.SimpleRequest request) {
647*e07d83d3SAndroid Build Coastguard Worker      return io.grpc.stub.ClientCalls.futureUnaryCall(
648*e07d83d3SAndroid Build Coastguard Worker          getChannel().newCall(getIdempotentCallMethod(), getCallOptions()), request);
649*e07d83d3SAndroid Build Coastguard Worker    }
650*e07d83d3SAndroid Build Coastguard Worker  }
651*e07d83d3SAndroid Build Coastguard Worker
652*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_UNARY_CALL = 0;
653*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_STREAMING_OUTPUT_CALL = 1;
654*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_SAFE_CALL = 2;
655*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_IDEMPOTENT_CALL = 3;
656*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_STREAMING_INPUT_CALL = 4;
657*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_FULL_BIDI_CALL = 5;
658*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_HALF_BIDI_CALL = 6;
659*e07d83d3SAndroid Build Coastguard Worker  private static final int METHODID_IMPORT = 7;
660*e07d83d3SAndroid Build Coastguard Worker
661*e07d83d3SAndroid Build Coastguard Worker  private static final class MethodHandlers<Req, Resp> implements
662*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
663*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
664*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
665*e07d83d3SAndroid Build Coastguard Worker      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
666*e07d83d3SAndroid Build Coastguard Worker    private final AsyncService serviceImpl;
667*e07d83d3SAndroid Build Coastguard Worker    private final int methodId;
668*e07d83d3SAndroid Build Coastguard Worker
669*e07d83d3SAndroid Build Coastguard Worker    MethodHandlers(AsyncService serviceImpl, int methodId) {
670*e07d83d3SAndroid Build Coastguard Worker      this.serviceImpl = serviceImpl;
671*e07d83d3SAndroid Build Coastguard Worker      this.methodId = methodId;
672*e07d83d3SAndroid Build Coastguard Worker    }
673*e07d83d3SAndroid Build Coastguard Worker
674*e07d83d3SAndroid Build Coastguard Worker    @java.lang.Override
675*e07d83d3SAndroid Build Coastguard Worker    @java.lang.SuppressWarnings("unchecked")
676*e07d83d3SAndroid Build Coastguard Worker    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
677*e07d83d3SAndroid Build Coastguard Worker      switch (methodId) {
678*e07d83d3SAndroid Build Coastguard Worker        case METHODID_UNARY_CALL:
679*e07d83d3SAndroid Build Coastguard Worker          serviceImpl.unaryCall((io.grpc.testing.compiler.Test.SimpleRequest) request,
680*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse>) responseObserver);
681*e07d83d3SAndroid Build Coastguard Worker          break;
682*e07d83d3SAndroid Build Coastguard Worker        case METHODID_STREAMING_OUTPUT_CALL:
683*e07d83d3SAndroid Build Coastguard Worker          serviceImpl.streamingOutputCall((io.grpc.testing.compiler.Test.StreamingOutputCallRequest) request,
684*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse>) responseObserver);
685*e07d83d3SAndroid Build Coastguard Worker          break;
686*e07d83d3SAndroid Build Coastguard Worker        case METHODID_SAFE_CALL:
687*e07d83d3SAndroid Build Coastguard Worker          serviceImpl.safeCall((io.grpc.testing.compiler.Test.SimpleRequest) request,
688*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse>) responseObserver);
689*e07d83d3SAndroid Build Coastguard Worker          break;
690*e07d83d3SAndroid Build Coastguard Worker        case METHODID_IDEMPOTENT_CALL:
691*e07d83d3SAndroid Build Coastguard Worker          serviceImpl.idempotentCall((io.grpc.testing.compiler.Test.SimpleRequest) request,
692*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.SimpleResponse>) responseObserver);
693*e07d83d3SAndroid Build Coastguard Worker          break;
694*e07d83d3SAndroid Build Coastguard Worker        default:
695*e07d83d3SAndroid Build Coastguard Worker          throw new AssertionError();
696*e07d83d3SAndroid Build Coastguard Worker      }
697*e07d83d3SAndroid Build Coastguard Worker    }
698*e07d83d3SAndroid Build Coastguard Worker
699*e07d83d3SAndroid Build Coastguard Worker    @java.lang.Override
700*e07d83d3SAndroid Build Coastguard Worker    @java.lang.SuppressWarnings("unchecked")
701*e07d83d3SAndroid Build Coastguard Worker    public io.grpc.stub.StreamObserver<Req> invoke(
702*e07d83d3SAndroid Build Coastguard Worker        io.grpc.stub.StreamObserver<Resp> responseObserver) {
703*e07d83d3SAndroid Build Coastguard Worker      switch (methodId) {
704*e07d83d3SAndroid Build Coastguard Worker        case METHODID_STREAMING_INPUT_CALL:
705*e07d83d3SAndroid Build Coastguard Worker          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.streamingInputCall(
706*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallResponse>) responseObserver);
707*e07d83d3SAndroid Build Coastguard Worker        case METHODID_FULL_BIDI_CALL:
708*e07d83d3SAndroid Build Coastguard Worker          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.fullBidiCall(
709*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse>) responseObserver);
710*e07d83d3SAndroid Build Coastguard Worker        case METHODID_HALF_BIDI_CALL:
711*e07d83d3SAndroid Build Coastguard Worker          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.halfBidiCall(
712*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingOutputCallResponse>) responseObserver);
713*e07d83d3SAndroid Build Coastguard Worker        case METHODID_IMPORT:
714*e07d83d3SAndroid Build Coastguard Worker          return (io.grpc.stub.StreamObserver<Req>) serviceImpl.import_(
715*e07d83d3SAndroid Build Coastguard Worker              (io.grpc.stub.StreamObserver<io.grpc.testing.compiler.Test.StreamingInputCallResponse>) responseObserver);
716*e07d83d3SAndroid Build Coastguard Worker        default:
717*e07d83d3SAndroid Build Coastguard Worker          throw new AssertionError();
718*e07d83d3SAndroid Build Coastguard Worker      }
719*e07d83d3SAndroid Build Coastguard Worker    }
720*e07d83d3SAndroid Build Coastguard Worker  }
721*e07d83d3SAndroid Build Coastguard Worker
722*e07d83d3SAndroid Build Coastguard Worker  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
723*e07d83d3SAndroid Build Coastguard Worker    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
724*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
725*e07d83d3SAndroid Build Coastguard Worker          getUnaryCallMethod(),
726*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncUnaryCall(
727*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
728*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.SimpleRequest,
729*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.SimpleResponse>(
730*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_UNARY_CALL)))
731*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
732*e07d83d3SAndroid Build Coastguard Worker          getStreamingOutputCallMethod(),
733*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
734*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
735*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
736*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingOutputCallResponse>(
737*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_STREAMING_OUTPUT_CALL)))
738*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
739*e07d83d3SAndroid Build Coastguard Worker          getStreamingInputCallMethod(),
740*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncClientStreamingCall(
741*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
742*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingInputCallRequest,
743*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingInputCallResponse>(
744*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_STREAMING_INPUT_CALL)))
745*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
746*e07d83d3SAndroid Build Coastguard Worker          getFullBidiCallMethod(),
747*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
748*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
749*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
750*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingOutputCallResponse>(
751*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_FULL_BIDI_CALL)))
752*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
753*e07d83d3SAndroid Build Coastguard Worker          getHalfBidiCallMethod(),
754*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
755*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
756*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingOutputCallRequest,
757*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingOutputCallResponse>(
758*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_HALF_BIDI_CALL)))
759*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
760*e07d83d3SAndroid Build Coastguard Worker          getImportMethod(),
761*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
762*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
763*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingInputCallRequest,
764*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.StreamingInputCallResponse>(
765*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_IMPORT)))
766*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
767*e07d83d3SAndroid Build Coastguard Worker          getSafeCallMethod(),
768*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncUnaryCall(
769*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
770*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.SimpleRequest,
771*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.SimpleResponse>(
772*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_SAFE_CALL)))
773*e07d83d3SAndroid Build Coastguard Worker        .addMethod(
774*e07d83d3SAndroid Build Coastguard Worker          getIdempotentCallMethod(),
775*e07d83d3SAndroid Build Coastguard Worker          io.grpc.stub.ServerCalls.asyncUnaryCall(
776*e07d83d3SAndroid Build Coastguard Worker            new MethodHandlers<
777*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.SimpleRequest,
778*e07d83d3SAndroid Build Coastguard Worker              io.grpc.testing.compiler.Test.SimpleResponse>(
779*e07d83d3SAndroid Build Coastguard Worker                service, METHODID_IDEMPOTENT_CALL)))
780*e07d83d3SAndroid Build Coastguard Worker        .build();
781*e07d83d3SAndroid Build Coastguard Worker  }
782*e07d83d3SAndroid Build Coastguard Worker
783*e07d83d3SAndroid Build Coastguard Worker  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
784*e07d83d3SAndroid Build Coastguard Worker
785*e07d83d3SAndroid Build Coastguard Worker  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
786*e07d83d3SAndroid Build Coastguard Worker    io.grpc.ServiceDescriptor result = serviceDescriptor;
787*e07d83d3SAndroid Build Coastguard Worker    if (result == null) {
788*e07d83d3SAndroid Build Coastguard Worker      synchronized (TestServiceGrpc.class) {
789*e07d83d3SAndroid Build Coastguard Worker        result = serviceDescriptor;
790*e07d83d3SAndroid Build Coastguard Worker        if (result == null) {
791*e07d83d3SAndroid Build Coastguard Worker          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
792*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getUnaryCallMethod())
793*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getStreamingOutputCallMethod())
794*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getStreamingInputCallMethod())
795*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getFullBidiCallMethod())
796*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getHalfBidiCallMethod())
797*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getImportMethod())
798*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getSafeCallMethod())
799*e07d83d3SAndroid Build Coastguard Worker              .addMethod(getIdempotentCallMethod())
800*e07d83d3SAndroid Build Coastguard Worker              .build();
801*e07d83d3SAndroid Build Coastguard Worker        }
802*e07d83d3SAndroid Build Coastguard Worker      }
803*e07d83d3SAndroid Build Coastguard Worker    }
804*e07d83d3SAndroid Build Coastguard Worker    return result;
805*e07d83d3SAndroid Build Coastguard Worker  }
806*e07d83d3SAndroid Build Coastguard Worker}
807