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

from . import policies_pb2 as admin_dot_v1_dot_policies__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetPolicies = channel.unary_unary(
                '/admin.v1.PolicyService/GetPolicies',
                request_serializer=admin_dot_v1_dot_policies__pb2.GetPoliciesRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.GetPoliciesResponse.FromString,
                )
        self.GetPolicy = channel.unary_unary(
                '/admin.v1.PolicyService/GetPolicy',
                request_serializer=admin_dot_v1_dot_policies__pb2.GetPolicyRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.GetPolicyResponse.FromString,
                )
        self.GetPolicyV2 = channel.unary_unary(
                '/admin.v1.PolicyService/GetPolicyV2',
                request_serializer=admin_dot_v1_dot_policies__pb2.GetPolicyV2Request.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.GetPolicyV2Response.FromString,
                )
        self.CreatePolicy = channel.unary_unary(
                '/admin.v1.PolicyService/CreatePolicy',
                request_serializer=admin_dot_v1_dot_policies__pb2.CreatePolicyRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.CreatePolicyResponse.FromString,
                )
        self.CreatePolicyV2 = channel.unary_unary(
                '/admin.v1.PolicyService/CreatePolicyV2',
                request_serializer=admin_dot_v1_dot_policies__pb2.CreatePolicyV2Request.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.CreatePolicyV2Response.FromString,
                )
        self.UpdatePolicy = channel.unary_unary(
                '/admin.v1.PolicyService/UpdatePolicy',
                request_serializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyResponse.FromString,
                )
        self.UpdatePolicyV2 = channel.unary_unary(
                '/admin.v1.PolicyService/UpdatePolicyV2',
                request_serializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyV2Request.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyV2Response.FromString,
                )
        self.DeletePolicy = channel.unary_unary(
                '/admin.v1.PolicyService/DeletePolicy',
                request_serializer=admin_dot_v1_dot_policies__pb2.DeletePolicyRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.DeletePolicyResponse.FromString,
                )
        self.DryRunPolicies = channel.unary_unary(
                '/admin.v1.PolicyService/DryRunPolicies',
                request_serializer=admin_dot_v1_dot_policies__pb2.DryRunPoliciesRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.DryRunPoliciesResponse.FromString,
                )
        self.EvaluatePolicyValidity = channel.unary_unary(
                '/admin.v1.PolicyService/EvaluatePolicyValidity',
                request_serializer=admin_dot_v1_dot_policies__pb2.EvaluatePolicyValidityRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.EvaluatePolicyValidityResponse.FromString,
                )
        self.CreatePolicySuggestion = channel.unary_unary(
                '/admin.v1.PolicyService/CreatePolicySuggestion',
                request_serializer=admin_dot_v1_dot_policies__pb2.CreatePolicySuggestionRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_policies__pb2.CreatePolicySuggestionResponse.FromString,
                )


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

    def GetPolicies(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 GetPolicyV2(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 CreatePolicy(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 CreatePolicyV2(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 UpdatePolicy(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 UpdatePolicyV2(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 DeletePolicy(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 DryRunPolicies(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 EvaluatePolicyValidity(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 CreatePolicySuggestion(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 = {
            'GetPolicies': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPolicies,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.GetPoliciesRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.GetPoliciesResponse.SerializeToString,
            ),
            'GetPolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPolicy,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.GetPolicyRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.GetPolicyResponse.SerializeToString,
            ),
            'GetPolicyV2': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPolicyV2,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.GetPolicyV2Request.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.GetPolicyV2Response.SerializeToString,
            ),
            'CreatePolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.CreatePolicy,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.CreatePolicyRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.CreatePolicyResponse.SerializeToString,
            ),
            'CreatePolicyV2': grpc.unary_unary_rpc_method_handler(
                    servicer.CreatePolicyV2,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.CreatePolicyV2Request.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.CreatePolicyV2Response.SerializeToString,
            ),
            'UpdatePolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdatePolicy,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyResponse.SerializeToString,
            ),
            'UpdatePolicyV2': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdatePolicyV2,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyV2Request.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.UpdatePolicyV2Response.SerializeToString,
            ),
            'DeletePolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.DeletePolicy,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.DeletePolicyRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.DeletePolicyResponse.SerializeToString,
            ),
            'DryRunPolicies': grpc.unary_unary_rpc_method_handler(
                    servicer.DryRunPolicies,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.DryRunPoliciesRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.DryRunPoliciesResponse.SerializeToString,
            ),
            'EvaluatePolicyValidity': grpc.unary_unary_rpc_method_handler(
                    servicer.EvaluatePolicyValidity,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.EvaluatePolicyValidityRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.EvaluatePolicyValidityResponse.SerializeToString,
            ),
            'CreatePolicySuggestion': grpc.unary_unary_rpc_method_handler(
                    servicer.CreatePolicySuggestion,
                    request_deserializer=admin_dot_v1_dot_policies__pb2.CreatePolicySuggestionRequest.FromString,
                    response_serializer=admin_dot_v1_dot_policies__pb2.CreatePolicySuggestionResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'admin.v1.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 GetPolicies(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, '/admin.v1.PolicyService/GetPolicies',
            admin_dot_v1_dot_policies__pb2.GetPoliciesRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.GetPoliciesResponse.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, '/admin.v1.PolicyService/GetPolicy',
            admin_dot_v1_dot_policies__pb2.GetPolicyRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.GetPolicyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPolicyV2(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, '/admin.v1.PolicyService/GetPolicyV2',
            admin_dot_v1_dot_policies__pb2.GetPolicyV2Request.SerializeToString,
            admin_dot_v1_dot_policies__pb2.GetPolicyV2Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreatePolicy(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, '/admin.v1.PolicyService/CreatePolicy',
            admin_dot_v1_dot_policies__pb2.CreatePolicyRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.CreatePolicyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreatePolicyV2(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, '/admin.v1.PolicyService/CreatePolicyV2',
            admin_dot_v1_dot_policies__pb2.CreatePolicyV2Request.SerializeToString,
            admin_dot_v1_dot_policies__pb2.CreatePolicyV2Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdatePolicy(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, '/admin.v1.PolicyService/UpdatePolicy',
            admin_dot_v1_dot_policies__pb2.UpdatePolicyRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.UpdatePolicyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdatePolicyV2(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, '/admin.v1.PolicyService/UpdatePolicyV2',
            admin_dot_v1_dot_policies__pb2.UpdatePolicyV2Request.SerializeToString,
            admin_dot_v1_dot_policies__pb2.UpdatePolicyV2Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeletePolicy(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, '/admin.v1.PolicyService/DeletePolicy',
            admin_dot_v1_dot_policies__pb2.DeletePolicyRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.DeletePolicyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DryRunPolicies(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, '/admin.v1.PolicyService/DryRunPolicies',
            admin_dot_v1_dot_policies__pb2.DryRunPoliciesRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.DryRunPoliciesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def EvaluatePolicyValidity(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, '/admin.v1.PolicyService/EvaluatePolicyValidity',
            admin_dot_v1_dot_policies__pb2.EvaluatePolicyValidityRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.EvaluatePolicyValidityResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreatePolicySuggestion(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, '/admin.v1.PolicyService/CreatePolicySuggestion',
            admin_dot_v1_dot_policies__pb2.CreatePolicySuggestionRequest.SerializeToString,
            admin_dot_v1_dot_policies__pb2.CreatePolicySuggestionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
