perxis.common.operation_service_pb2_grpc

Client and server classes corresponding to protobuf-defined services.

  1# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2"""Client and server classes corresponding to protobuf-defined services."""
  3import grpc
  4import warnings
  5
  6from perxis.common import operation_pb2 as common_dot_operation__pb2
  7from perxis.common import operation_service_pb2 as common_dot_operation__service__pb2
  8
  9GRPC_GENERATED_VERSION = '1.67.1'
 10GRPC_VERSION = grpc.__version__
 11_version_not_supported = False
 12
 13try:
 14    from grpc._utilities import first_version_is_lower
 15    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
 16except ImportError:
 17    _version_not_supported = True
 18
 19if _version_not_supported:
 20    raise RuntimeError(
 21        f'The grpc package installed is at version {GRPC_VERSION},'
 22        + f' but the generated code in common/operation_service_pb2_grpc.py depends on'
 23        + f' grpcio>={GRPC_GENERATED_VERSION}.'
 24        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
 25        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
 26    )
 27
 28
 29class OperationServiceStub(object):
 30    """Missing associated documentation comment in .proto file."""
 31
 32    def __init__(self, channel):
 33        """Constructor.
 34
 35        Args:
 36            channel: A grpc.Channel.
 37        """
 38        self.Get = channel.unary_unary(
 39                '/common.OperationService/Get',
 40                request_serializer=common_dot_operation__service__pb2.GetOperationRequest.SerializeToString,
 41                response_deserializer=common_dot_operation__pb2.Operation.FromString,
 42                _registered_method=True)
 43        self.Cancel = channel.unary_unary(
 44                '/common.OperationService/Cancel',
 45                request_serializer=common_dot_operation__service__pb2.CancelOperationRequest.SerializeToString,
 46                response_deserializer=common_dot_operation__pb2.Operation.FromString,
 47                _registered_method=True)
 48
 49
 50class OperationServiceServicer(object):
 51    """Missing associated documentation comment in .proto file."""
 52
 53    def Get(self, request, context):
 54        """Возвращает статус операции и ее результат, если она завершена
 55        """
 56        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 57        context.set_details('Method not implemented!')
 58        raise NotImplementedError('Method not implemented!')
 59
 60    def Cancel(self, request, context):
 61        """Отменяет выполнение операции, если это поддерживается сервисом
 62        """
 63        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
 64        context.set_details('Method not implemented!')
 65        raise NotImplementedError('Method not implemented!')
 66
 67
 68def add_OperationServiceServicer_to_server(servicer, server):
 69    rpc_method_handlers = {
 70            'Get': grpc.unary_unary_rpc_method_handler(
 71                    servicer.Get,
 72                    request_deserializer=common_dot_operation__service__pb2.GetOperationRequest.FromString,
 73                    response_serializer=common_dot_operation__pb2.Operation.SerializeToString,
 74            ),
 75            'Cancel': grpc.unary_unary_rpc_method_handler(
 76                    servicer.Cancel,
 77                    request_deserializer=common_dot_operation__service__pb2.CancelOperationRequest.FromString,
 78                    response_serializer=common_dot_operation__pb2.Operation.SerializeToString,
 79            ),
 80    }
 81    generic_handler = grpc.method_handlers_generic_handler(
 82            'common.OperationService', rpc_method_handlers)
 83    server.add_generic_rpc_handlers((generic_handler,))
 84    server.add_registered_method_handlers('common.OperationService', rpc_method_handlers)
 85
 86
 87 # This class is part of an EXPERIMENTAL API.
 88class OperationService(object):
 89    """Missing associated documentation comment in .proto file."""
 90
 91    @staticmethod
 92    def Get(request,
 93            target,
 94            options=(),
 95            channel_credentials=None,
 96            call_credentials=None,
 97            insecure=False,
 98            compression=None,
 99            wait_for_ready=None,
100            timeout=None,
101            metadata=None):
102        return grpc.experimental.unary_unary(
103            request,
104            target,
105            '/common.OperationService/Get',
106            common_dot_operation__service__pb2.GetOperationRequest.SerializeToString,
107            common_dot_operation__pb2.Operation.FromString,
108            options,
109            channel_credentials,
110            insecure,
111            call_credentials,
112            compression,
113            wait_for_ready,
114            timeout,
115            metadata,
116            _registered_method=True)
117
118    @staticmethod
119    def Cancel(request,
120            target,
121            options=(),
122            channel_credentials=None,
123            call_credentials=None,
124            insecure=False,
125            compression=None,
126            wait_for_ready=None,
127            timeout=None,
128            metadata=None):
129        return grpc.experimental.unary_unary(
130            request,
131            target,
132            '/common.OperationService/Cancel',
133            common_dot_operation__service__pb2.CancelOperationRequest.SerializeToString,
134            common_dot_operation__pb2.Operation.FromString,
135            options,
136            channel_credentials,
137            insecure,
138            call_credentials,
139            compression,
140            wait_for_ready,
141            timeout,
142            metadata,
143            _registered_method=True)
GRPC_GENERATED_VERSION = '1.67.1'
GRPC_VERSION = '1.67.1'
class OperationServiceStub:
30class OperationServiceStub(object):
31    """Missing associated documentation comment in .proto file."""
32
33    def __init__(self, channel):
34        """Constructor.
35
36        Args:
37            channel: A grpc.Channel.
38        """
39        self.Get = channel.unary_unary(
40                '/common.OperationService/Get',
41                request_serializer=common_dot_operation__service__pb2.GetOperationRequest.SerializeToString,
42                response_deserializer=common_dot_operation__pb2.Operation.FromString,
43                _registered_method=True)
44        self.Cancel = channel.unary_unary(
45                '/common.OperationService/Cancel',
46                request_serializer=common_dot_operation__service__pb2.CancelOperationRequest.SerializeToString,
47                response_deserializer=common_dot_operation__pb2.Operation.FromString,
48                _registered_method=True)

Missing associated documentation comment in .proto file.

OperationServiceStub(channel)
33    def __init__(self, channel):
34        """Constructor.
35
36        Args:
37            channel: A grpc.Channel.
38        """
39        self.Get = channel.unary_unary(
40                '/common.OperationService/Get',
41                request_serializer=common_dot_operation__service__pb2.GetOperationRequest.SerializeToString,
42                response_deserializer=common_dot_operation__pb2.Operation.FromString,
43                _registered_method=True)
44        self.Cancel = channel.unary_unary(
45                '/common.OperationService/Cancel',
46                request_serializer=common_dot_operation__service__pb2.CancelOperationRequest.SerializeToString,
47                response_deserializer=common_dot_operation__pb2.Operation.FromString,
48                _registered_method=True)

Constructor.

Arguments:
  • channel: A grpc.Channel.
Get
Cancel
class OperationServiceServicer:
51class OperationServiceServicer(object):
52    """Missing associated documentation comment in .proto file."""
53
54    def Get(self, request, context):
55        """Возвращает статус операции и ее результат, если она завершена
56        """
57        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58        context.set_details('Method not implemented!')
59        raise NotImplementedError('Method not implemented!')
60
61    def Cancel(self, request, context):
62        """Отменяет выполнение операции, если это поддерживается сервисом
63        """
64        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
65        context.set_details('Method not implemented!')
66        raise NotImplementedError('Method not implemented!')

Missing associated documentation comment in .proto file.

def Get(self, request, context):
54    def Get(self, request, context):
55        """Возвращает статус операции и ее результат, если она завершена
56        """
57        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58        context.set_details('Method not implemented!')
59        raise NotImplementedError('Method not implemented!')

Возвращает статус операции и ее результат, если она завершена

def Cancel(self, request, context):
61    def Cancel(self, request, context):
62        """Отменяет выполнение операции, если это поддерживается сервисом
63        """
64        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
65        context.set_details('Method not implemented!')
66        raise NotImplementedError('Method not implemented!')

Отменяет выполнение операции, если это поддерживается сервисом

def add_OperationServiceServicer_to_server(servicer, server):
69def add_OperationServiceServicer_to_server(servicer, server):
70    rpc_method_handlers = {
71            'Get': grpc.unary_unary_rpc_method_handler(
72                    servicer.Get,
73                    request_deserializer=common_dot_operation__service__pb2.GetOperationRequest.FromString,
74                    response_serializer=common_dot_operation__pb2.Operation.SerializeToString,
75            ),
76            'Cancel': grpc.unary_unary_rpc_method_handler(
77                    servicer.Cancel,
78                    request_deserializer=common_dot_operation__service__pb2.CancelOperationRequest.FromString,
79                    response_serializer=common_dot_operation__pb2.Operation.SerializeToString,
80            ),
81    }
82    generic_handler = grpc.method_handlers_generic_handler(
83            'common.OperationService', rpc_method_handlers)
84    server.add_generic_rpc_handlers((generic_handler,))
85    server.add_registered_method_handlers('common.OperationService', rpc_method_handlers)
class OperationService:
 89class OperationService(object):
 90    """Missing associated documentation comment in .proto file."""
 91
 92    @staticmethod
 93    def Get(request,
 94            target,
 95            options=(),
 96            channel_credentials=None,
 97            call_credentials=None,
 98            insecure=False,
 99            compression=None,
100            wait_for_ready=None,
101            timeout=None,
102            metadata=None):
103        return grpc.experimental.unary_unary(
104            request,
105            target,
106            '/common.OperationService/Get',
107            common_dot_operation__service__pb2.GetOperationRequest.SerializeToString,
108            common_dot_operation__pb2.Operation.FromString,
109            options,
110            channel_credentials,
111            insecure,
112            call_credentials,
113            compression,
114            wait_for_ready,
115            timeout,
116            metadata,
117            _registered_method=True)
118
119    @staticmethod
120    def Cancel(request,
121            target,
122            options=(),
123            channel_credentials=None,
124            call_credentials=None,
125            insecure=False,
126            compression=None,
127            wait_for_ready=None,
128            timeout=None,
129            metadata=None):
130        return grpc.experimental.unary_unary(
131            request,
132            target,
133            '/common.OperationService/Cancel',
134            common_dot_operation__service__pb2.CancelOperationRequest.SerializeToString,
135            common_dot_operation__pb2.Operation.FromString,
136            options,
137            channel_credentials,
138            insecure,
139            call_credentials,
140            compression,
141            wait_for_ready,
142            timeout,
143            metadata,
144            _registered_method=True)

Missing associated documentation comment in .proto file.

@staticmethod
def Get( request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None):
 92    @staticmethod
 93    def Get(request,
 94            target,
 95            options=(),
 96            channel_credentials=None,
 97            call_credentials=None,
 98            insecure=False,
 99            compression=None,
100            wait_for_ready=None,
101            timeout=None,
102            metadata=None):
103        return grpc.experimental.unary_unary(
104            request,
105            target,
106            '/common.OperationService/Get',
107            common_dot_operation__service__pb2.GetOperationRequest.SerializeToString,
108            common_dot_operation__pb2.Operation.FromString,
109            options,
110            channel_credentials,
111            insecure,
112            call_credentials,
113            compression,
114            wait_for_ready,
115            timeout,
116            metadata,
117            _registered_method=True)
@staticmethod
def Cancel( request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None):
119    @staticmethod
120    def Cancel(request,
121            target,
122            options=(),
123            channel_credentials=None,
124            call_credentials=None,
125            insecure=False,
126            compression=None,
127            wait_for_ready=None,
128            timeout=None,
129            metadata=None):
130        return grpc.experimental.unary_unary(
131            request,
132            target,
133            '/common.OperationService/Cancel',
134            common_dot_operation__service__pb2.CancelOperationRequest.SerializeToString,
135            common_dot_operation__pb2.Operation.FromString,
136            options,
137            channel_credentials,
138            insecure,
139            call_credentials,
140            compression,
141            wait_for_ready,
142            timeout,
143            metadata,
144            _registered_method=True)