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

from degiro_connector.quotecast.models import quotecast_pb2 as degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2
from degiro_connector.quotecast.models import quotecast_relay_pb2 as degiro__connector_dot_quotecast_dot_models_dot_quotecast__relay__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.set_config = channel.unary_unary(
                '/degiro_connector.quotecast_relay.QuotecastRelay/set_config',
                request_serializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__relay__pb2.SetConfig.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
                )
        self.connect = channel.unary_unary(
                '/degiro_connector.quotecast_relay.QuotecastRelay/connect',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                )
        self.fetch_data = channel.unary_unary(
                '/degiro_connector.quotecast_relay.QuotecastRelay/fetch_data',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Quotecast.FromString,
                )
        self.get_chart = channel.unary_unary(
                '/degiro_connector.quotecast_relay.QuotecastRelay/get_chart',
                request_serializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Chart.Request.SerializeToString,
                response_deserializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Chart.FromString,
                )
        self.subscribe = channel.unary_unary(
                '/degiro_connector.quotecast_relay.QuotecastRelay/subscribe',
                request_serializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Quotecast.Request.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
                )


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

    def set_config(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 connect(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 fetch_data(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 get_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 subscribe(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_QuotecastRelayServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'set_config': grpc.unary_unary_rpc_method_handler(
                    servicer.set_config,
                    request_deserializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__relay__pb2.SetConfig.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
            ),
            'connect': grpc.unary_unary_rpc_method_handler(
                    servicer.connect,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            ),
            'fetch_data': grpc.unary_unary_rpc_method_handler(
                    servicer.fetch_data,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Quotecast.SerializeToString,
            ),
            'get_chart': grpc.unary_unary_rpc_method_handler(
                    servicer.get_chart,
                    request_deserializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Chart.Request.FromString,
                    response_serializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Chart.SerializeToString,
            ),
            'subscribe': grpc.unary_unary_rpc_method_handler(
                    servicer.subscribe,
                    request_deserializer=degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Quotecast.Request.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'degiro_connector.quotecast_relay.QuotecastRelay', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def set_config(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, '/degiro_connector.quotecast_relay.QuotecastRelay/set_config',
            degiro__connector_dot_quotecast_dot_models_dot_quotecast__relay__pb2.SetConfig.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def connect(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, '/degiro_connector.quotecast_relay.QuotecastRelay/connect',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def fetch_data(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, '/degiro_connector.quotecast_relay.QuotecastRelay/fetch_data',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Quotecast.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get_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, '/degiro_connector.quotecast_relay.QuotecastRelay/get_chart',
            degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Chart.Request.SerializeToString,
            degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Chart.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def subscribe(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, '/degiro_connector.quotecast_relay.QuotecastRelay/subscribe',
            degiro__connector_dot_quotecast_dot_models_dot_quotecast__pb2.Quotecast.Request.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
