• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 adb_service_pb2 as chromiumos_dot_test_dot_api_dot_adb__service__pb2
6
7
8class ADBServiceStub(object):
9    """Missing associated documentation comment in .proto file."""
10
11    def __init__(self, channel):
12        """Constructor.
13
14        Args:
15            channel: A grpc.Channel.
16        """
17        self.ExecCommand = channel.unary_unary(
18                '/chromiumos.test.api.ADBService/ExecCommand',
19                request_serializer=chromiumos_dot_test_dot_api_dot_adb__service__pb2.ADBCommandRequest.SerializeToString,
20                response_deserializer=chromiumos_dot_test_dot_api_dot_adb__service__pb2.ADBCommandResponse.FromString,
21                )
22
23
24class ADBServiceServicer(object):
25    """Missing associated documentation comment in .proto file."""
26
27    def ExecCommand(self, request, context):
28        """ExecCommand runs a command on ABD.
29        """
30        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
31        context.set_details('Method not implemented!')
32        raise NotImplementedError('Method not implemented!')
33
34
35def add_ADBServiceServicer_to_server(servicer, server):
36    rpc_method_handlers = {
37            'ExecCommand': grpc.unary_unary_rpc_method_handler(
38                    servicer.ExecCommand,
39                    request_deserializer=chromiumos_dot_test_dot_api_dot_adb__service__pb2.ADBCommandRequest.FromString,
40                    response_serializer=chromiumos_dot_test_dot_api_dot_adb__service__pb2.ADBCommandResponse.SerializeToString,
41            ),
42    }
43    generic_handler = grpc.method_handlers_generic_handler(
44            'chromiumos.test.api.ADBService', rpc_method_handlers)
45    server.add_generic_rpc_handlers((generic_handler,))
46
47
48 # This class is part of an EXPERIMENTAL API.
49class ADBService(object):
50    """Missing associated documentation comment in .proto file."""
51
52    @staticmethod
53    def ExecCommand(request,
54            target,
55            options=(),
56            channel_credentials=None,
57            call_credentials=None,
58            insecure=False,
59            compression=None,
60            wait_for_ready=None,
61            timeout=None,
62            metadata=None):
63        return grpc.experimental.unary_unary(request, target, '/chromiumos.test.api.ADBService/ExecCommand',
64            chromiumos_dot_test_dot_api_dot_adb__service__pb2.ADBCommandRequest.SerializeToString,
65            chromiumos_dot_test_dot_api_dot_adb__service__pb2.ADBCommandResponse.FromString,
66            options, channel_credentials,
67            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
68