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

from prodvana.proto.prodvana.desired_state import manager_pb2 as prodvana_dot_desired__state_dot_manager__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetDesiredState = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/SetDesiredState',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateResp.FromString,
                )
        self.PreviewEntityGraph = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/PreviewEntityGraph',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.PreviewEntityGraphResp.FromString,
                )
        self.GetServiceDesiredStateConvergenceSummary = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetServiceDesiredStateConvergenceSummary',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateConvergenceSummaryReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateConvergenceSummaryResp.FromString,
                )
        self.GetServiceLatestDesiredStateId = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetServiceLatestDesiredStateId',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLatestDesiredStateIdReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLatestDesiredStateIdResp.FromString,
                )
        self.GetServiceLastConvergedStates = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetServiceLastConvergedStates',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLastConvergedStateReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLastConvergedStateResp.FromString,
                )
        self.GetServiceDesiredStateHistory = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetServiceDesiredStateHistory',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateHistoryReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateHistoryResp.FromString,
                )
        self.GetDesiredState = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetDesiredState',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateResp.FromString,
                )
        self.GetDesiredStateGraph = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetDesiredStateGraph',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateGraphReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateGraphResp.FromString,
                )
        self.GetDesiredStateConvergenceSummary = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/GetDesiredStateConvergenceSummary',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateConvergenceReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateConvergenceSummaryResp.FromString,
                )
        self.ValidateDesiredState = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/ValidateDesiredState',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.ValidateDesiredStateReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.ValidateDesiredStateResp.FromString,
                )
        self.SetManualApproval = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/SetManualApproval',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.SetManualApprovalReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.SetManualApprovalResp.FromString,
                )
        self.PromoteDelivery = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/PromoteDelivery',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.PromoteDeliveryReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.PromoteDeliveryResp.FromString,
                )
        self.BypassProtection = channel.unary_unary(
                '/prodvana.desired_state.DesiredStateManager/BypassProtection',
                request_serializer=prodvana_dot_desired__state_dot_manager__pb2.BypassProtectionReq.SerializeToString,
                response_deserializer=prodvana_dot_desired__state_dot_manager__pb2.BypassProtectionResp.FromString,
                )


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

    def SetDesiredState(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 PreviewEntityGraph(self, request, context):
        """validate a SetDesiredState call and return a preview entity graph
        TODO(naphat) delete ValidateDesiredState and replace with this
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetServiceDesiredStateConvergenceSummary(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 GetServiceLatestDesiredStateId(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 GetServiceLastConvergedStates(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 GetServiceDesiredStateHistory(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 GetDesiredState(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 GetDesiredStateGraph(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 GetDesiredStateConvergenceSummary(self, request, context):
        """Get the convergence summary for a desired state id.
        If the desired state id is pending, the returned summary will not have the entity_graph set but will have pending_set_desired_state set.
        The status will be set to PENDING_SET_DESIRED_STATE.
        If the desired state id was pending and failed to be set, the returned summary will not have the entity_graph set but will have pending_set_desired_state set.
        The status will be set to FAILED.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ValidateDesiredState(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 SetManualApproval(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 PromoteDelivery(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 BypassProtection(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_DesiredStateManagerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetDesiredState': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDesiredState,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateResp.SerializeToString,
            ),
            'PreviewEntityGraph': grpc.unary_unary_rpc_method_handler(
                    servicer.PreviewEntityGraph,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.PreviewEntityGraphResp.SerializeToString,
            ),
            'GetServiceDesiredStateConvergenceSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServiceDesiredStateConvergenceSummary,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateConvergenceSummaryReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateConvergenceSummaryResp.SerializeToString,
            ),
            'GetServiceLatestDesiredStateId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServiceLatestDesiredStateId,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLatestDesiredStateIdReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLatestDesiredStateIdResp.SerializeToString,
            ),
            'GetServiceLastConvergedStates': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServiceLastConvergedStates,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLastConvergedStateReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceLastConvergedStateResp.SerializeToString,
            ),
            'GetServiceDesiredStateHistory': grpc.unary_unary_rpc_method_handler(
                    servicer.GetServiceDesiredStateHistory,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateHistoryReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateHistoryResp.SerializeToString,
            ),
            'GetDesiredState': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDesiredState,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateResp.SerializeToString,
            ),
            'GetDesiredStateGraph': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDesiredStateGraph,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateGraphReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateGraphResp.SerializeToString,
            ),
            'GetDesiredStateConvergenceSummary': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDesiredStateConvergenceSummary,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateConvergenceReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateConvergenceSummaryResp.SerializeToString,
            ),
            'ValidateDesiredState': grpc.unary_unary_rpc_method_handler(
                    servicer.ValidateDesiredState,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.ValidateDesiredStateReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.ValidateDesiredStateResp.SerializeToString,
            ),
            'SetManualApproval': grpc.unary_unary_rpc_method_handler(
                    servicer.SetManualApproval,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.SetManualApprovalReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.SetManualApprovalResp.SerializeToString,
            ),
            'PromoteDelivery': grpc.unary_unary_rpc_method_handler(
                    servicer.PromoteDelivery,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.PromoteDeliveryReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.PromoteDeliveryResp.SerializeToString,
            ),
            'BypassProtection': grpc.unary_unary_rpc_method_handler(
                    servicer.BypassProtection,
                    request_deserializer=prodvana_dot_desired__state_dot_manager__pb2.BypassProtectionReq.FromString,
                    response_serializer=prodvana_dot_desired__state_dot_manager__pb2.BypassProtectionResp.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'prodvana.desired_state.DesiredStateManager', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SetDesiredState(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, '/prodvana.desired_state.DesiredStateManager/SetDesiredState',
            prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PreviewEntityGraph(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, '/prodvana.desired_state.DesiredStateManager/PreviewEntityGraph',
            prodvana_dot_desired__state_dot_manager__pb2.SetDesiredStateReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.PreviewEntityGraphResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetServiceDesiredStateConvergenceSummary(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, '/prodvana.desired_state.DesiredStateManager/GetServiceDesiredStateConvergenceSummary',
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateConvergenceSummaryReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateConvergenceSummaryResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetServiceLatestDesiredStateId(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, '/prodvana.desired_state.DesiredStateManager/GetServiceLatestDesiredStateId',
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceLatestDesiredStateIdReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceLatestDesiredStateIdResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetServiceLastConvergedStates(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, '/prodvana.desired_state.DesiredStateManager/GetServiceLastConvergedStates',
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceLastConvergedStateReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceLastConvergedStateResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetServiceDesiredStateHistory(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, '/prodvana.desired_state.DesiredStateManager/GetServiceDesiredStateHistory',
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateHistoryReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetServiceDesiredStateHistoryResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDesiredState(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, '/prodvana.desired_state.DesiredStateManager/GetDesiredState',
            prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDesiredStateGraph(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, '/prodvana.desired_state.DesiredStateManager/GetDesiredStateGraph',
            prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateGraphReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateGraphResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDesiredStateConvergenceSummary(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, '/prodvana.desired_state.DesiredStateManager/GetDesiredStateConvergenceSummary',
            prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateConvergenceReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.GetDesiredStateConvergenceSummaryResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ValidateDesiredState(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, '/prodvana.desired_state.DesiredStateManager/ValidateDesiredState',
            prodvana_dot_desired__state_dot_manager__pb2.ValidateDesiredStateReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.ValidateDesiredStateResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetManualApproval(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, '/prodvana.desired_state.DesiredStateManager/SetManualApproval',
            prodvana_dot_desired__state_dot_manager__pb2.SetManualApprovalReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.SetManualApprovalResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PromoteDelivery(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, '/prodvana.desired_state.DesiredStateManager/PromoteDelivery',
            prodvana_dot_desired__state_dot_manager__pb2.PromoteDeliveryReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.PromoteDeliveryResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BypassProtection(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, '/prodvana.desired_state.DesiredStateManager/BypassProtection',
            prodvana_dot_desired__state_dot_manager__pb2.BypassProtectionReq.SerializeToString,
            prodvana_dot_desired__state_dot_manager__pb2.BypassProtectionResp.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
