# 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 google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from spaceone.api.repository.v1 import policy_pb2 as spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/spaceone.api.repository.v1.Policy/create',
                request_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.CreatePolicyRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.FromString,
                )
        self.update = channel.unary_unary(
                '/spaceone.api.repository.v1.Policy/update',
                request_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.UpdatePolicyRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.FromString,
                )
        self.delete = channel.unary_unary(
                '/spaceone.api.repository.v1.Policy/delete',
                request_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.get = channel.unary_unary(
                '/spaceone.api.repository.v1.Policy/get',
                request_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.GetRepositoryPolicyRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.FromString,
                )
        self.list = channel.unary_unary(
                '/spaceone.api.repository.v1.Policy/list',
                request_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PoliciesInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.repository.v1.Policy/stat',
                request_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


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

    def create(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 update(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 delete(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(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 list(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 stat(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_PolicyServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.CreatePolicyRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.UpdatePolicyRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.GetRepositoryPolicyRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PoliciesInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.repository.v1.Policy', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def create(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, '/spaceone.api.repository.v1.Policy/create',
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.CreatePolicyRequest.SerializeToString,
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update(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, '/spaceone.api.repository.v1.Policy/update',
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.UpdatePolicyRequest.SerializeToString,
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def delete(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, '/spaceone.api.repository.v1.Policy/delete',
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get(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, '/spaceone.api.repository.v1.Policy/get',
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.GetRepositoryPolicyRequest.SerializeToString,
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list(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, '/spaceone.api.repository.v1.Policy/list',
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyQuery.SerializeToString,
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PoliciesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stat(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, '/spaceone.api.repository.v1.Policy/stat',
            spaceone_dot_api_dot_repository_dot_v1_dot_policy__pb2.PolicyStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
