github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/dart/lib/network.pbgrpc.dart (about) 1 /// 2 // Generated code. Do not modify. 3 // source: network.proto 4 // 5 // @dart = 2.12 6 // ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name 7 8 import 'dart:async' as $async; 9 10 import 'dart:core' as $core; 11 12 import 'package:grpc/service_api.dart' as $grpc; 13 import 'types.pb.dart' as $0; 14 import 'network.pb.dart' as $2; 15 export 'network.pb.dart'; 16 17 class NetworkControlServiceClient extends $grpc.Client { 18 static final _$setLocalWorkerRequest = 19 $grpc.ClientMethod<$0.LocalWorker, $0.Empty>( 20 '/binkynet.v1.NetworkControlService/SetLocalWorkerRequest', 21 ($0.LocalWorker value) => value.writeToBuffer(), 22 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 23 static final _$setLocalWorkerActual = 24 $grpc.ClientMethod<$0.LocalWorker, $0.Empty>( 25 '/binkynet.v1.NetworkControlService/SetLocalWorkerActual', 26 ($0.LocalWorker value) => value.writeToBuffer(), 27 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 28 static final _$watchLocalWorkers = 29 $grpc.ClientMethod<$2.WatchOptions, $0.LocalWorker>( 30 '/binkynet.v1.NetworkControlService/WatchLocalWorkers', 31 ($2.WatchOptions value) => value.writeToBuffer(), 32 ($core.List<$core.int> value) => $0.LocalWorker.fromBuffer(value)); 33 static final _$setDeviceDiscoveryActual = 34 $grpc.ClientMethod<$0.DeviceDiscovery, $0.Empty>( 35 '/binkynet.v1.NetworkControlService/SetDeviceDiscoveryActual', 36 ($0.DeviceDiscovery value) => value.writeToBuffer(), 37 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 38 static final _$setPowerActual = $grpc.ClientMethod<$0.PowerState, $0.Empty>( 39 '/binkynet.v1.NetworkControlService/SetPowerActual', 40 ($0.PowerState value) => value.writeToBuffer(), 41 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 42 static final _$setLocActual = $grpc.ClientMethod<$0.Loc, $0.Empty>( 43 '/binkynet.v1.NetworkControlService/SetLocActual', 44 ($0.Loc value) => value.writeToBuffer(), 45 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 46 static final _$setSensorActual = $grpc.ClientMethod<$0.Sensor, $0.Empty>( 47 '/binkynet.v1.NetworkControlService/SetSensorActual', 48 ($0.Sensor value) => value.writeToBuffer(), 49 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 50 static final _$setOutputActual = $grpc.ClientMethod<$0.Output, $0.Empty>( 51 '/binkynet.v1.NetworkControlService/SetOutputActual', 52 ($0.Output value) => value.writeToBuffer(), 53 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 54 static final _$setSwitchActual = $grpc.ClientMethod<$0.Switch, $0.Empty>( 55 '/binkynet.v1.NetworkControlService/SetSwitchActual', 56 ($0.Switch value) => value.writeToBuffer(), 57 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 58 static final _$setClockActual = $grpc.ClientMethod<$0.Clock, $0.Empty>( 59 '/binkynet.v1.NetworkControlService/SetClockActual', 60 ($0.Clock value) => value.writeToBuffer(), 61 ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 62 static final _$watchClock = $grpc.ClientMethod<$2.WatchOptions, $0.Clock>( 63 '/binkynet.v1.NetworkControlService/WatchClock', 64 ($2.WatchOptions value) => value.writeToBuffer(), 65 ($core.List<$core.int> value) => $0.Clock.fromBuffer(value)); 66 67 NetworkControlServiceClient($grpc.ClientChannel channel, 68 {$grpc.CallOptions? options, 69 $core.Iterable<$grpc.ClientInterceptor>? interceptors}) 70 : super(channel, options: options, interceptors: interceptors); 71 72 $grpc.ResponseFuture<$0.Empty> setLocalWorkerRequest($0.LocalWorker request, 73 {$grpc.CallOptions? options}) { 74 return $createUnaryCall(_$setLocalWorkerRequest, request, options: options); 75 } 76 77 $grpc.ResponseFuture<$0.Empty> setLocalWorkerActual($0.LocalWorker request, 78 {$grpc.CallOptions? options}) { 79 return $createUnaryCall(_$setLocalWorkerActual, request, options: options); 80 } 81 82 $grpc.ResponseStream<$0.LocalWorker> watchLocalWorkers( 83 $2.WatchOptions request, 84 {$grpc.CallOptions? options}) { 85 return $createStreamingCall( 86 _$watchLocalWorkers, $async.Stream.fromIterable([request]), 87 options: options); 88 } 89 90 $grpc.ResponseFuture<$0.Empty> setDeviceDiscoveryActual( 91 $0.DeviceDiscovery request, 92 {$grpc.CallOptions? options}) { 93 return $createUnaryCall(_$setDeviceDiscoveryActual, request, 94 options: options); 95 } 96 97 $grpc.ResponseFuture<$0.Empty> setPowerActual($0.PowerState request, 98 {$grpc.CallOptions? options}) { 99 return $createUnaryCall(_$setPowerActual, request, options: options); 100 } 101 102 $grpc.ResponseFuture<$0.Empty> setLocActual($0.Loc request, 103 {$grpc.CallOptions? options}) { 104 return $createUnaryCall(_$setLocActual, request, options: options); 105 } 106 107 $grpc.ResponseFuture<$0.Empty> setSensorActual($0.Sensor request, 108 {$grpc.CallOptions? options}) { 109 return $createUnaryCall(_$setSensorActual, request, options: options); 110 } 111 112 $grpc.ResponseFuture<$0.Empty> setOutputActual($0.Output request, 113 {$grpc.CallOptions? options}) { 114 return $createUnaryCall(_$setOutputActual, request, options: options); 115 } 116 117 $grpc.ResponseFuture<$0.Empty> setSwitchActual($0.Switch request, 118 {$grpc.CallOptions? options}) { 119 return $createUnaryCall(_$setSwitchActual, request, options: options); 120 } 121 122 $grpc.ResponseFuture<$0.Empty> setClockActual($0.Clock request, 123 {$grpc.CallOptions? options}) { 124 return $createUnaryCall(_$setClockActual, request, options: options); 125 } 126 127 $grpc.ResponseStream<$0.Clock> watchClock($2.WatchOptions request, 128 {$grpc.CallOptions? options}) { 129 return $createStreamingCall( 130 _$watchClock, $async.Stream.fromIterable([request]), 131 options: options); 132 } 133 } 134 135 abstract class NetworkControlServiceBase extends $grpc.Service { 136 $core.String get $name => 'binkynet.v1.NetworkControlService'; 137 138 NetworkControlServiceBase() { 139 $addMethod($grpc.ServiceMethod<$0.LocalWorker, $0.Empty>( 140 'SetLocalWorkerRequest', 141 setLocalWorkerRequest_Pre, 142 false, 143 false, 144 ($core.List<$core.int> value) => $0.LocalWorker.fromBuffer(value), 145 ($0.Empty value) => value.writeToBuffer())); 146 $addMethod($grpc.ServiceMethod<$0.LocalWorker, $0.Empty>( 147 'SetLocalWorkerActual', 148 setLocalWorkerActual_Pre, 149 false, 150 false, 151 ($core.List<$core.int> value) => $0.LocalWorker.fromBuffer(value), 152 ($0.Empty value) => value.writeToBuffer())); 153 $addMethod($grpc.ServiceMethod<$2.WatchOptions, $0.LocalWorker>( 154 'WatchLocalWorkers', 155 watchLocalWorkers_Pre, 156 false, 157 true, 158 ($core.List<$core.int> value) => $2.WatchOptions.fromBuffer(value), 159 ($0.LocalWorker value) => value.writeToBuffer())); 160 $addMethod($grpc.ServiceMethod<$0.DeviceDiscovery, $0.Empty>( 161 'SetDeviceDiscoveryActual', 162 setDeviceDiscoveryActual_Pre, 163 false, 164 false, 165 ($core.List<$core.int> value) => $0.DeviceDiscovery.fromBuffer(value), 166 ($0.Empty value) => value.writeToBuffer())); 167 $addMethod($grpc.ServiceMethod<$0.PowerState, $0.Empty>( 168 'SetPowerActual', 169 setPowerActual_Pre, 170 false, 171 false, 172 ($core.List<$core.int> value) => $0.PowerState.fromBuffer(value), 173 ($0.Empty value) => value.writeToBuffer())); 174 $addMethod($grpc.ServiceMethod<$0.Loc, $0.Empty>( 175 'SetLocActual', 176 setLocActual_Pre, 177 false, 178 false, 179 ($core.List<$core.int> value) => $0.Loc.fromBuffer(value), 180 ($0.Empty value) => value.writeToBuffer())); 181 $addMethod($grpc.ServiceMethod<$0.Sensor, $0.Empty>( 182 'SetSensorActual', 183 setSensorActual_Pre, 184 false, 185 false, 186 ($core.List<$core.int> value) => $0.Sensor.fromBuffer(value), 187 ($0.Empty value) => value.writeToBuffer())); 188 $addMethod($grpc.ServiceMethod<$0.Output, $0.Empty>( 189 'SetOutputActual', 190 setOutputActual_Pre, 191 false, 192 false, 193 ($core.List<$core.int> value) => $0.Output.fromBuffer(value), 194 ($0.Empty value) => value.writeToBuffer())); 195 $addMethod($grpc.ServiceMethod<$0.Switch, $0.Empty>( 196 'SetSwitchActual', 197 setSwitchActual_Pre, 198 false, 199 false, 200 ($core.List<$core.int> value) => $0.Switch.fromBuffer(value), 201 ($0.Empty value) => value.writeToBuffer())); 202 $addMethod($grpc.ServiceMethod<$0.Clock, $0.Empty>( 203 'SetClockActual', 204 setClockActual_Pre, 205 false, 206 false, 207 ($core.List<$core.int> value) => $0.Clock.fromBuffer(value), 208 ($0.Empty value) => value.writeToBuffer())); 209 $addMethod($grpc.ServiceMethod<$2.WatchOptions, $0.Clock>( 210 'WatchClock', 211 watchClock_Pre, 212 false, 213 true, 214 ($core.List<$core.int> value) => $2.WatchOptions.fromBuffer(value), 215 ($0.Clock value) => value.writeToBuffer())); 216 } 217 218 $async.Future<$0.Empty> setLocalWorkerRequest_Pre( 219 $grpc.ServiceCall call, $async.Future<$0.LocalWorker> request) async { 220 return setLocalWorkerRequest(call, await request); 221 } 222 223 $async.Future<$0.Empty> setLocalWorkerActual_Pre( 224 $grpc.ServiceCall call, $async.Future<$0.LocalWorker> request) async { 225 return setLocalWorkerActual(call, await request); 226 } 227 228 $async.Stream<$0.LocalWorker> watchLocalWorkers_Pre( 229 $grpc.ServiceCall call, $async.Future<$2.WatchOptions> request) async* { 230 yield* watchLocalWorkers(call, await request); 231 } 232 233 $async.Future<$0.Empty> setDeviceDiscoveryActual_Pre( 234 $grpc.ServiceCall call, $async.Future<$0.DeviceDiscovery> request) async { 235 return setDeviceDiscoveryActual(call, await request); 236 } 237 238 $async.Future<$0.Empty> setPowerActual_Pre( 239 $grpc.ServiceCall call, $async.Future<$0.PowerState> request) async { 240 return setPowerActual(call, await request); 241 } 242 243 $async.Future<$0.Empty> setLocActual_Pre( 244 $grpc.ServiceCall call, $async.Future<$0.Loc> request) async { 245 return setLocActual(call, await request); 246 } 247 248 $async.Future<$0.Empty> setSensorActual_Pre( 249 $grpc.ServiceCall call, $async.Future<$0.Sensor> request) async { 250 return setSensorActual(call, await request); 251 } 252 253 $async.Future<$0.Empty> setOutputActual_Pre( 254 $grpc.ServiceCall call, $async.Future<$0.Output> request) async { 255 return setOutputActual(call, await request); 256 } 257 258 $async.Future<$0.Empty> setSwitchActual_Pre( 259 $grpc.ServiceCall call, $async.Future<$0.Switch> request) async { 260 return setSwitchActual(call, await request); 261 } 262 263 $async.Future<$0.Empty> setClockActual_Pre( 264 $grpc.ServiceCall call, $async.Future<$0.Clock> request) async { 265 return setClockActual(call, await request); 266 } 267 268 $async.Stream<$0.Clock> watchClock_Pre( 269 $grpc.ServiceCall call, $async.Future<$2.WatchOptions> request) async* { 270 yield* watchClock(call, await request); 271 } 272 273 $async.Future<$0.Empty> setLocalWorkerRequest( 274 $grpc.ServiceCall call, $0.LocalWorker request); 275 $async.Future<$0.Empty> setLocalWorkerActual( 276 $grpc.ServiceCall call, $0.LocalWorker request); 277 $async.Stream<$0.LocalWorker> watchLocalWorkers( 278 $grpc.ServiceCall call, $2.WatchOptions request); 279 $async.Future<$0.Empty> setDeviceDiscoveryActual( 280 $grpc.ServiceCall call, $0.DeviceDiscovery request); 281 $async.Future<$0.Empty> setPowerActual( 282 $grpc.ServiceCall call, $0.PowerState request); 283 $async.Future<$0.Empty> setLocActual($grpc.ServiceCall call, $0.Loc request); 284 $async.Future<$0.Empty> setSensorActual( 285 $grpc.ServiceCall call, $0.Sensor request); 286 $async.Future<$0.Empty> setOutputActual( 287 $grpc.ServiceCall call, $0.Output request); 288 $async.Future<$0.Empty> setSwitchActual( 289 $grpc.ServiceCall call, $0.Switch request); 290 $async.Future<$0.Empty> setClockActual( 291 $grpc.ServiceCall call, $0.Clock request); 292 $async.Stream<$0.Clock> watchClock( 293 $grpc.ServiceCall call, $2.WatchOptions request); 294 }