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

from systemathics.apis.services.intraday.v1 import intraday_bars_pb2 as systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2


class IntradayBarsServiceStub(object):
    """Called to request intraday bars data. 
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.IntradayBars = channel.unary_unary(
                '/systemathics.apis.services.intraday.v1.IntradayBarsService/IntradayBars',
                request_serializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsRequest.SerializeToString,
                response_deserializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsResponse.FromString,
                )
        self.IntradayBarsStream = channel.unary_stream(
                '/systemathics.apis.services.intraday.v1.IntradayBarsService/IntradayBarsStream',
                request_serializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsRequest.SerializeToString,
                response_deserializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBar.FromString,
                )


class IntradayBarsServiceServicer(object):
    """Called to request intraday bars data. 
    """

    def IntradayBars(self, request, context):
        """Gets intraday historical data: date, open, high, low, close and volume
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IntradayBarsStream(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_IntradayBarsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'IntradayBars': grpc.unary_unary_rpc_method_handler(
                    servicer.IntradayBars,
                    request_deserializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsRequest.FromString,
                    response_serializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsResponse.SerializeToString,
            ),
            'IntradayBarsStream': grpc.unary_stream_rpc_method_handler(
                    servicer.IntradayBarsStream,
                    request_deserializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsRequest.FromString,
                    response_serializer=systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBar.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'systemathics.apis.services.intraday.v1.IntradayBarsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class IntradayBarsService(object):
    """Called to request intraday bars data. 
    """

    @staticmethod
    def IntradayBars(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, '/systemathics.apis.services.intraday.v1.IntradayBarsService/IntradayBars',
            systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsRequest.SerializeToString,
            systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IntradayBarsStream(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_stream(request, target, '/systemathics.apis.services.intraday.v1.IntradayBarsService/IntradayBarsStream',
            systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBarsRequest.SerializeToString,
            systemathics_dot_apis_dot_services_dot_intraday_dot_v1_dot_intraday__bars__pb2.IntradayBar.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
