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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import stock_pb2 as stock__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Account = channel.unary_unary(
                '/stock.Stock/Account',
                request_serializer=stock__pb2.AccountRequest.SerializeToString,
                response_deserializer=stock__pb2.AccountReply.FromString,
                )
        self.Tick = channel.unary_stream(
                '/stock.Stock/Tick',
                request_serializer=stock__pb2.TickRequest.SerializeToString,
                response_deserializer=stock__pb2.TickReply.FromString,
                )
        self.Chart = channel.unary_unary(
                '/stock.Stock/Chart',
                request_serializer=stock__pb2.ChartRequest.SerializeToString,
                response_deserializer=stock__pb2.ChartReply.FromString,
                )
        self.Accounts = channel.unary_unary(
                '/stock.Stock/Accounts',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=stock__pb2.AccountsReply.FromString,
                )
        self.Buy = channel.unary_unary(
                '/stock.Stock/Buy',
                request_serializer=stock__pb2.BuyRequest.SerializeToString,
                response_deserializer=stock__pb2.BuyReply.FromString,
                )
        self.Sell = channel.unary_unary(
                '/stock.Stock/Sell',
                request_serializer=stock__pb2.SellRequest.SerializeToString,
                response_deserializer=stock__pb2.SellReply.FromString,
                )


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

    def Account(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 Tick(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 Chart(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 Accounts(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 Buy(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 Sell(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_StockServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Account': grpc.unary_unary_rpc_method_handler(
                    servicer.Account,
                    request_deserializer=stock__pb2.AccountRequest.FromString,
                    response_serializer=stock__pb2.AccountReply.SerializeToString,
            ),
            'Tick': grpc.unary_stream_rpc_method_handler(
                    servicer.Tick,
                    request_deserializer=stock__pb2.TickRequest.FromString,
                    response_serializer=stock__pb2.TickReply.SerializeToString,
            ),
            'Chart': grpc.unary_unary_rpc_method_handler(
                    servicer.Chart,
                    request_deserializer=stock__pb2.ChartRequest.FromString,
                    response_serializer=stock__pb2.ChartReply.SerializeToString,
            ),
            'Accounts': grpc.unary_unary_rpc_method_handler(
                    servicer.Accounts,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=stock__pb2.AccountsReply.SerializeToString,
            ),
            'Buy': grpc.unary_unary_rpc_method_handler(
                    servicer.Buy,
                    request_deserializer=stock__pb2.BuyRequest.FromString,
                    response_serializer=stock__pb2.BuyReply.SerializeToString,
            ),
            'Sell': grpc.unary_unary_rpc_method_handler(
                    servicer.Sell,
                    request_deserializer=stock__pb2.SellRequest.FromString,
                    response_serializer=stock__pb2.SellReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'stock.Stock', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Account(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, '/stock.Stock/Account',
            stock__pb2.AccountRequest.SerializeToString,
            stock__pb2.AccountReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Tick(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, '/stock.Stock/Tick',
            stock__pb2.TickRequest.SerializeToString,
            stock__pb2.TickReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Chart(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, '/stock.Stock/Chart',
            stock__pb2.ChartRequest.SerializeToString,
            stock__pb2.ChartReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Accounts(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, '/stock.Stock/Accounts',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            stock__pb2.AccountsReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Buy(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, '/stock.Stock/Buy',
            stock__pb2.BuyRequest.SerializeToString,
            stock__pb2.BuyReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Sell(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, '/stock.Stock/Sell',
            stock__pb2.SellRequest.SerializeToString,
            stock__pb2.SellReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
