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