github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/dart/lib/commandstation.pbgrpc.dart (about)

     1  ///
     2  //  Generated code. Do not modify.
     3  //  source: commandstation.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  export 'commandstation.pb.dart';
    15  
    16  class CommandStationServiceClient extends $grpc.Client {
    17    static final _$getInfo = $grpc.ClientMethod<$0.Empty, $0.CommandStationInfo>(
    18        '/binkynet.v1.CommandStationService/GetInfo',
    19        ($0.Empty value) => value.writeToBuffer(),
    20        ($core.List<$core.int> value) => $0.CommandStationInfo.fromBuffer(value));
    21    static final _$power = $grpc.ClientMethod<$0.PowerState, $0.Power>(
    22        '/binkynet.v1.CommandStationService/Power',
    23        ($0.PowerState value) => value.writeToBuffer(),
    24        ($core.List<$core.int> value) => $0.Power.fromBuffer(value));
    25    static final _$locs = $grpc.ClientMethod<$0.Loc, $0.Loc>(
    26        '/binkynet.v1.CommandStationService/Locs',
    27        ($0.Loc value) => value.writeToBuffer(),
    28        ($core.List<$core.int> value) => $0.Loc.fromBuffer(value));
    29  
    30    CommandStationServiceClient($grpc.ClientChannel channel,
    31        {$grpc.CallOptions? options,
    32        $core.Iterable<$grpc.ClientInterceptor>? interceptors})
    33        : super(channel, options: options, interceptors: interceptors);
    34  
    35    $grpc.ResponseFuture<$0.CommandStationInfo> getInfo($0.Empty request,
    36        {$grpc.CallOptions? options}) {
    37      return $createUnaryCall(_$getInfo, request, options: options);
    38    }
    39  
    40    $grpc.ResponseStream<$0.Power> power($async.Stream<$0.PowerState> request,
    41        {$grpc.CallOptions? options}) {
    42      return $createStreamingCall(_$power, request, options: options);
    43    }
    44  
    45    $grpc.ResponseStream<$0.Loc> locs($async.Stream<$0.Loc> request,
    46        {$grpc.CallOptions? options}) {
    47      return $createStreamingCall(_$locs, request, options: options);
    48    }
    49  }
    50  
    51  abstract class CommandStationServiceBase extends $grpc.Service {
    52    $core.String get $name => 'binkynet.v1.CommandStationService';
    53  
    54    CommandStationServiceBase() {
    55      $addMethod($grpc.ServiceMethod<$0.Empty, $0.CommandStationInfo>(
    56          'GetInfo',
    57          getInfo_Pre,
    58          false,
    59          false,
    60          ($core.List<$core.int> value) => $0.Empty.fromBuffer(value),
    61          ($0.CommandStationInfo value) => value.writeToBuffer()));
    62      $addMethod($grpc.ServiceMethod<$0.PowerState, $0.Power>(
    63          'Power',
    64          power,
    65          true,
    66          true,
    67          ($core.List<$core.int> value) => $0.PowerState.fromBuffer(value),
    68          ($0.Power value) => value.writeToBuffer()));
    69      $addMethod($grpc.ServiceMethod<$0.Loc, $0.Loc>(
    70          'Locs',
    71          locs,
    72          true,
    73          true,
    74          ($core.List<$core.int> value) => $0.Loc.fromBuffer(value),
    75          ($0.Loc value) => value.writeToBuffer()));
    76    }
    77  
    78    $async.Future<$0.CommandStationInfo> getInfo_Pre(
    79        $grpc.ServiceCall call, $async.Future<$0.Empty> request) async {
    80      return getInfo(call, await request);
    81    }
    82  
    83    $async.Future<$0.CommandStationInfo> getInfo(
    84        $grpc.ServiceCall call, $0.Empty request);
    85    $async.Stream<$0.Power> power(
    86        $grpc.ServiceCall call, $async.Stream<$0.PowerState> request);
    87    $async.Stream<$0.Loc> locs(
    88        $grpc.ServiceCall call, $async.Stream<$0.Loc> request);
    89  }