1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! 2"""Client and server classes corresponding to protobuf-defined services.""" 3import grpc 4 5from chromiumos.test.api import callbox_service_pb2 as chromiumos_dot_test_dot_api_dot_callbox__service__pb2 6 7 8class CallboxServiceStub(object): 9 """TODO(latware): Define API 10 """ 11 12 def __init__(self, channel): 13 """Constructor. 14 15 Args: 16 channel: A grpc.Channel. 17 """ 18 self.CheckHealth = channel.unary_stream( 19 '/chromiumos.test.api.CallboxService/CheckHealth', 20 request_serializer=chromiumos_dot_test_dot_api_dot_callbox__service__pb2.CheckHealthRequest.SerializeToString, 21 response_deserializer=chromiumos_dot_test_dot_api_dot_callbox__service__pb2.CheckHealthResponse.FromString, 22 ) 23 24 25class CallboxServiceServicer(object): 26 """TODO(latware): Define API 27 """ 28 29 def CheckHealth(self, request, context): 30 """Verifies the connection/status of the callbox 31 """ 32 context.set_code(grpc.StatusCode.UNIMPLEMENTED) 33 context.set_details('Method not implemented!') 34 raise NotImplementedError('Method not implemented!') 35 36 37def add_CallboxServiceServicer_to_server(servicer, server): 38 rpc_method_handlers = { 39 'CheckHealth': grpc.unary_stream_rpc_method_handler( 40 servicer.CheckHealth, 41 request_deserializer=chromiumos_dot_test_dot_api_dot_callbox__service__pb2.CheckHealthRequest.FromString, 42 response_serializer=chromiumos_dot_test_dot_api_dot_callbox__service__pb2.CheckHealthResponse.SerializeToString, 43 ), 44 } 45 generic_handler = grpc.method_handlers_generic_handler( 46 'chromiumos.test.api.CallboxService', rpc_method_handlers) 47 server.add_generic_rpc_handlers((generic_handler,)) 48 49 50 # This class is part of an EXPERIMENTAL API. 51class CallboxService(object): 52 """TODO(latware): Define API 53 """ 54 55 @staticmethod 56 def CheckHealth(request, 57 target, 58 options=(), 59 channel_credentials=None, 60 call_credentials=None, 61 insecure=False, 62 compression=None, 63 wait_for_ready=None, 64 timeout=None, 65 metadata=None): 66 return grpc.experimental.unary_stream(request, target, '/chromiumos.test.api.CallboxService/CheckHealth', 67 chromiumos_dot_test_dot_api_dot_callbox__service__pb2.CheckHealthRequest.SerializeToString, 68 chromiumos_dot_test_dot_api_dot_callbox__service__pb2.CheckHealthResponse.FromString, 69 options, channel_credentials, 70 insecure, call_credentials, compression, wait_for_ready, timeout, metadata) 71