detector_pb2_grpc.py 6.18 KB
Newer Older
Wei Shoulin's avatar
bug  
Wei Shoulin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import detector_pb2 as facility_dot_detector__pb2


class DetectorSrvStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.Find = channel.unary_unary(
        '/facility.DetectorSrv/Find',
        request_serializer=facility_dot_detector__pb2.FindDetectorReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.FindDetectorResp.FromString,
        )
    self.Get = channel.unary_unary(
        '/facility.DetectorSrv/Get',
        request_serializer=facility_dot_detector__pb2.GetDetectorReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.GetDetectorResp.FromString,
        )
    self.Write = channel.unary_unary(
        '/facility.DetectorSrv/Write',
        request_serializer=facility_dot_detector__pb2.WriteDetectorReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.WriteDetectorResp.FromString,
        )
    self.Update = channel.unary_unary(
        '/facility.DetectorSrv/Update',
        request_serializer=facility_dot_detector__pb2.UpdateDetectorReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.UpdateDetectorResp.FromString,
        )
    self.FindStatus = channel.unary_unary(
        '/facility.DetectorSrv/FindStatus',
        request_serializer=facility_dot_detector__pb2.FindStatusReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.FindStatusResp.FromString,
        )
    self.GetStatus = channel.unary_unary(
        '/facility.DetectorSrv/GetStatus',
        request_serializer=facility_dot_detector__pb2.GetStatusReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.GetStatusResp.FromString,
        )
    self.WriteStatus = channel.unary_unary(
        '/facility.DetectorSrv/WriteStatus',
        request_serializer=facility_dot_detector__pb2.WriteStatusReq.SerializeToString,
        response_deserializer=facility_dot_detector__pb2.WriteStatusResp.FromString,
        )


class DetectorSrvServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def Find(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Get(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Write(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Update(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def FindStatus(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetStatus(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WriteStatus(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_DetectorSrvServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Find': grpc.unary_unary_rpc_method_handler(
          servicer.Find,
          request_deserializer=facility_dot_detector__pb2.FindDetectorReq.FromString,
          response_serializer=facility_dot_detector__pb2.FindDetectorResp.SerializeToString,
      ),
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=facility_dot_detector__pb2.GetDetectorReq.FromString,
          response_serializer=facility_dot_detector__pb2.GetDetectorResp.SerializeToString,
      ),
      'Write': grpc.unary_unary_rpc_method_handler(
          servicer.Write,
          request_deserializer=facility_dot_detector__pb2.WriteDetectorReq.FromString,
          response_serializer=facility_dot_detector__pb2.WriteDetectorResp.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=facility_dot_detector__pb2.UpdateDetectorReq.FromString,
          response_serializer=facility_dot_detector__pb2.UpdateDetectorResp.SerializeToString,
      ),
      'FindStatus': grpc.unary_unary_rpc_method_handler(
          servicer.FindStatus,
          request_deserializer=facility_dot_detector__pb2.FindStatusReq.FromString,
          response_serializer=facility_dot_detector__pb2.FindStatusResp.SerializeToString,
      ),
      'GetStatus': grpc.unary_unary_rpc_method_handler(
          servicer.GetStatus,
          request_deserializer=facility_dot_detector__pb2.GetStatusReq.FromString,
          response_serializer=facility_dot_detector__pb2.GetStatusResp.SerializeToString,
      ),
      'WriteStatus': grpc.unary_unary_rpc_method_handler(
          servicer.WriteStatus,
          request_deserializer=facility_dot_detector__pb2.WriteStatusReq.FromString,
          response_serializer=facility_dot_detector__pb2.WriteStatusResp.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'facility.DetectorSrv', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))