# 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
from systemathics.apis.services.daily.v2 import set_daily_scalar_pb2 as systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2


class SetDailyScalarServiceStub(object):
    """Called to set daily prices data and clear. 
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetDailyScalar = channel.stream_unary(
                '/systemathics.apis.services.daily.v2.SetDailyScalarService/SetDailyScalar',
                request_serializer=systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2.SetDailyScalarRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ClearDailyScalar = channel.unary_unary(
                '/systemathics.apis.services.daily.v2.SetDailyScalarService/ClearDailyScalar',
                request_serializer=systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2.ClearDailyScalarRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class SetDailyScalarServiceServicer(object):
    """Called to set daily prices data and clear. 
    """

    def SetDailyScalar(self, request_iterator, context):
        """Sets daily scalar timeseries.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClearDailyScalar(self, request, context):
        """Delete daily scalar timeseries.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SetDailyScalarServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetDailyScalar': grpc.stream_unary_rpc_method_handler(
                    servicer.SetDailyScalar,
                    request_deserializer=systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2.SetDailyScalarRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ClearDailyScalar': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearDailyScalar,
                    request_deserializer=systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2.ClearDailyScalarRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'systemathics.apis.services.daily.v2.SetDailyScalarService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SetDailyScalarService(object):
    """Called to set daily prices data and clear. 
    """

    @staticmethod
    def SetDailyScalar(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/systemathics.apis.services.daily.v2.SetDailyScalarService/SetDailyScalar',
            systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2.SetDailyScalarRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ClearDailyScalar(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.daily.v2.SetDailyScalarService/ClearDailyScalar',
            systemathics_dot_apis_dot_services_dot_daily_dot_v2_dot_set__daily__scalar__pb2.ClearDailyScalarRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
