@@ -37,6 +37,14 @@ class TestClient extends $grpc.Client {
37
37
'/Test/Bidirectional',
38
38
($0.Input value) => value.writeToBuffer(),
39
39
($core.List<$core.int> value) => $0.Output.fromBuffer(value));
40
+ static final _$call = $grpc.ClientMethod<$0.Input, $0.Output>(
41
+ '/Test/Call',
42
+ ($0.Input value) => value.writeToBuffer(),
43
+ ($core.List<$core.int> value) => $0.Output.fromBuffer(value));
44
+ static final _$request = $grpc.ClientMethod<$0.Input, $0.Output>(
45
+ '/Test/Request',
46
+ ($0.Input value) => value.writeToBuffer(),
47
+ ($core.List<$core.int> value) => $0.Output.fromBuffer(value));
40
48
41
49
TestClient($grpc.ClientChannel channel,
42
50
{$grpc.CallOptions? options,
@@ -59,6 +67,14 @@ class TestClient extends $grpc.Client {
59
67
$grpc.ResponseStream<$0.Output> bidirectional($async.Stream<$0.Input> request, {$grpc.CallOptions? options}) {
60
68
return $createStreamingCall(_$bidirectional, request, options: options);
61
69
}
70
+
71
+ $grpc.ResponseFuture<$0.Output> call($0.Input request, {$grpc.CallOptions? options}) {
72
+ return $createUnaryCall(_$call, request, options: options);
73
+ }
74
+
75
+ $grpc.ResponseFuture<$0.Output> request($0.Input request, {$grpc.CallOptions? options}) {
76
+ return $createUnaryCall(_$request, request, options: options);
77
+ }
62
78
}
63
79
64
80
@$pb.GrpcServiceName('Test')
@@ -94,18 +110,42 @@ abstract class TestServiceBase extends $grpc.Service {
94
110
true,
95
111
($core.List<$core.int> value) => $0.Input.fromBuffer(value),
96
112
($0.Output value) => value.writeToBuffer()));
113
+ $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(
114
+ 'Call',
115
+ call_Pre,
116
+ false,
117
+ false,
118
+ ($core.List<$core.int> value) => $0.Input.fromBuffer(value),
119
+ ($0.Output value) => value.writeToBuffer()));
120
+ $addMethod($grpc.ServiceMethod<$0.Input, $0.Output>(
121
+ 'Request',
122
+ request_Pre,
123
+ false,
124
+ false,
125
+ ($core.List<$core.int> value) => $0.Input.fromBuffer(value),
126
+ ($0.Output value) => value.writeToBuffer()));
127
+ }
128
+
129
+ $async.Future<$0.Output> unary_Pre($grpc.ServiceCall $call, $async.Future<$0.Input> $request) async {
130
+ return unary($call, await $request);
131
+ }
132
+
133
+ $async.Stream<$0.Output> serverStreaming_Pre($grpc.ServiceCall $call, $async.Future<$0.Input> $request) async* {
134
+ yield* serverStreaming($call, await $request);
97
135
}
98
136
99
- $async.Future<$0.Output> unary_Pre ($grpc.ServiceCall call, $async.Future<$0.Input> request) async {
100
- return unary( call, await request);
137
+ $async.Future<$0.Output> call_Pre ($grpc.ServiceCall $ call, $async.Future<$0.Input> $ request) async {
138
+ return call($ call, await $ request);
101
139
}
102
140
103
- $async.Stream <$0.Output> serverStreaming_Pre ($grpc.ServiceCall call, $async.Future<$0.Input> request) async* {
104
- yield* serverStreaming( call, await request);
141
+ $async.Future <$0.Output> request_Pre ($grpc.ServiceCall $ call, $async.Future<$0.Input> $ request) async {
142
+ return request($ call, await $ request);
105
143
}
106
144
107
- $async.Future<$0.Output> unary($grpc.ServiceCall call, $0.Input request);
108
- $async.Future<$0.Output> clientStreaming($grpc.ServiceCall call, $async.Stream<$0.Input> request);
109
- $async.Stream<$0.Output> serverStreaming($grpc.ServiceCall call, $0.Input request);
110
- $async.Stream<$0.Output> bidirectional($grpc.ServiceCall call, $async.Stream<$0.Input> request);
145
+ $async.Future<$0.Output> unary($grpc.ServiceCall $call, $0.Input $request);
146
+ $async.Future<$0.Output> clientStreaming($grpc.ServiceCall $call, $async.Stream<$0.Input> $request);
147
+ $async.Stream<$0.Output> serverStreaming($grpc.ServiceCall $call, $0.Input $request);
148
+ $async.Stream<$0.Output> bidirectional($grpc.ServiceCall $call, $async.Stream<$0.Input> $request);
149
+ $async.Future<$0.Output> call($grpc.ServiceCall $call, $0.Input $request);
150
+ $async.Future<$0.Output> request($grpc.ServiceCall $call, $0.Input $request);
111
151
}
0 commit comments