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

import context_pb2 as context__pb2
import policy_pb2 as policy__pb2
import service_pb2 as service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.PolicyAdd = channel.unary_unary(
                '/policy.PolicyService/PolicyAdd',
                request_serializer=policy__pb2.PolicyRule.SerializeToString,
                response_deserializer=policy__pb2.PolicyRuleState.FromString,
                )
        self.PolicyUpdate = channel.unary_unary(
                '/policy.PolicyService/PolicyUpdate',
                request_serializer=policy__pb2.PolicyRule.SerializeToString,
                response_deserializer=policy__pb2.PolicyRuleState.FromString,
                )
        self.PolicyDelete = channel.unary_unary(
                '/policy.PolicyService/PolicyDelete',
                request_serializer=policy__pb2.PolicyRule.SerializeToString,
                response_deserializer=policy__pb2.PolicyRuleState.FromString,
                )
        self.GetPolicy = channel.unary_unary(
                '/policy.PolicyService/GetPolicy',
                request_serializer=policy__pb2.PolicyRuleId.SerializeToString,
                response_deserializer=policy__pb2.PolicyRule.FromString,
                )
        self.GetPolicyByDeviceId = channel.unary_unary(
                '/policy.PolicyService/GetPolicyByDeviceId',
                request_serializer=context__pb2.DeviceId.SerializeToString,
                response_deserializer=policy__pb2.PolicyRuleList.FromString,
                )
        self.GetPolicyByServiceId = channel.unary_unary(
                '/policy.PolicyService/GetPolicyByServiceId',
                request_serializer=service__pb2.ServiceId.SerializeToString,
                response_deserializer=policy__pb2.PolicyRuleList.FromString,
                )


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

    def PolicyAdd(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 PolicyUpdate(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 PolicyDelete(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 GetPolicy(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 GetPolicyByDeviceId(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 GetPolicyByServiceId(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_PolicyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PolicyAdd': grpc.unary_unary_rpc_method_handler(
                    servicer.PolicyAdd,
                    request_deserializer=policy__pb2.PolicyRule.FromString,
                    response_serializer=policy__pb2.PolicyRuleState.SerializeToString,
            ),
            'PolicyUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.PolicyUpdate,
                    request_deserializer=policy__pb2.PolicyRule.FromString,
                    response_serializer=policy__pb2.PolicyRuleState.SerializeToString,
            ),
            'PolicyDelete': grpc.unary_unary_rpc_method_handler(
                    servicer.PolicyDelete,
                    request_deserializer=policy__pb2.PolicyRule.FromString,
                    response_serializer=policy__pb2.PolicyRuleState.SerializeToString,
            ),
            'GetPolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPolicy,
                    request_deserializer=policy__pb2.PolicyRuleId.FromString,
                    response_serializer=policy__pb2.PolicyRule.SerializeToString,
            ),
            'GetPolicyByDeviceId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPolicyByDeviceId,
                    request_deserializer=context__pb2.DeviceId.FromString,
                    response_serializer=policy__pb2.PolicyRuleList.SerializeToString,
            ),
            'GetPolicyByServiceId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPolicyByServiceId,
                    request_deserializer=service__pb2.ServiceId.FromString,
                    response_serializer=policy__pb2.PolicyRuleList.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'policy.PolicyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def PolicyAdd(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, '/policy.PolicyService/PolicyAdd',
            policy__pb2.PolicyRule.SerializeToString,
            policy__pb2.PolicyRuleState.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PolicyUpdate(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, '/policy.PolicyService/PolicyUpdate',
            policy__pb2.PolicyRule.SerializeToString,
            policy__pb2.PolicyRuleState.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PolicyDelete(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, '/policy.PolicyService/PolicyDelete',
            policy__pb2.PolicyRule.SerializeToString,
            policy__pb2.PolicyRuleState.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPolicy(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, '/policy.PolicyService/GetPolicy',
            policy__pb2.PolicyRuleId.SerializeToString,
            policy__pb2.PolicyRule.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPolicyByDeviceId(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, '/policy.PolicyService/GetPolicyByDeviceId',
            context__pb2.DeviceId.SerializeToString,
            policy__pb2.PolicyRuleList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPolicyByServiceId(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, '/policy.PolicyService/GetPolicyByServiceId',
            service__pb2.ServiceId.SerializeToString,
            policy__pb2.PolicyRuleList.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
