# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import mt5_term_api_internal_charts_pb2 as mt5__term__api__internal__charts__pb2


class InternalChartsStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.OpenChartForSymbol = channel.unary_unary(
                '/mt5_term_api.InternalCharts/OpenChartForSymbol',
                request_serializer=mt5__term__api__internal__charts__pb2.OpenChartForSymbolRequest.SerializeToString,
                response_deserializer=mt5__term__api__internal__charts__pb2.OpenChartForSymbolReply.FromString,
                )
        self.CloseChartForSymbol = channel.unary_unary(
                '/mt5_term_api.InternalCharts/CloseChartForSymbol',
                request_serializer=mt5__term__api__internal__charts__pb2.CloseChartForSymbolRequest.SerializeToString,
                response_deserializer=mt5__term__api__internal__charts__pb2.CloseChartForSymbolReply.FromString,
                )
        self.OpenChartWithEa = channel.unary_unary(
                '/mt5_term_api.InternalCharts/OpenChartWithEa',
                request_serializer=mt5__term__api__internal__charts__pb2.OpenChartWithEaRequest.SerializeToString,
                response_deserializer=mt5__term__api__internal__charts__pb2.OpenChartWithEaReply.FromString,
                )
        self.SaveChartTemplate = channel.unary_unary(
                '/mt5_term_api.InternalCharts/SaveChartTemplate',
                request_serializer=mt5__term__api__internal__charts__pb2.SaveChartTemplateRequest.SerializeToString,
                response_deserializer=mt5__term__api__internal__charts__pb2.SaveChartTemplateReply.FromString,
                )


class InternalChartsServicer(object):
    """Missing associated documentation comment in .proto file."""

    def OpenChartForSymbol(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CloseChartForSymbol(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def OpenChartWithEa(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SaveChartTemplate(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InternalChartsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'OpenChartForSymbol': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenChartForSymbol,
                    request_deserializer=mt5__term__api__internal__charts__pb2.OpenChartForSymbolRequest.FromString,
                    response_serializer=mt5__term__api__internal__charts__pb2.OpenChartForSymbolReply.SerializeToString,
            ),
            'CloseChartForSymbol': grpc.unary_unary_rpc_method_handler(
                    servicer.CloseChartForSymbol,
                    request_deserializer=mt5__term__api__internal__charts__pb2.CloseChartForSymbolRequest.FromString,
                    response_serializer=mt5__term__api__internal__charts__pb2.CloseChartForSymbolReply.SerializeToString,
            ),
            'OpenChartWithEa': grpc.unary_unary_rpc_method_handler(
                    servicer.OpenChartWithEa,
                    request_deserializer=mt5__term__api__internal__charts__pb2.OpenChartWithEaRequest.FromString,
                    response_serializer=mt5__term__api__internal__charts__pb2.OpenChartWithEaReply.SerializeToString,
            ),
            'SaveChartTemplate': grpc.unary_unary_rpc_method_handler(
                    servicer.SaveChartTemplate,
                    request_deserializer=mt5__term__api__internal__charts__pb2.SaveChartTemplateRequest.FromString,
                    response_serializer=mt5__term__api__internal__charts__pb2.SaveChartTemplateReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mt5_term_api.InternalCharts', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class InternalCharts(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def OpenChartForSymbol(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/mt5_term_api.InternalCharts/OpenChartForSymbol',
            mt5__term__api__internal__charts__pb2.OpenChartForSymbolRequest.SerializeToString,
            mt5__term__api__internal__charts__pb2.OpenChartForSymbolReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CloseChartForSymbol(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/mt5_term_api.InternalCharts/CloseChartForSymbol',
            mt5__term__api__internal__charts__pb2.CloseChartForSymbolRequest.SerializeToString,
            mt5__term__api__internal__charts__pb2.CloseChartForSymbolReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def OpenChartWithEa(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/mt5_term_api.InternalCharts/OpenChartWithEa',
            mt5__term__api__internal__charts__pb2.OpenChartWithEaRequest.SerializeToString,
            mt5__term__api__internal__charts__pb2.OpenChartWithEaReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SaveChartTemplate(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/mt5_term_api.InternalCharts/SaveChartTemplate',
            mt5__term__api__internal__charts__pb2.SaveChartTemplateRequest.SerializeToString,
            mt5__term__api__internal__charts__pb2.SaveChartTemplateReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
