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

from cs3.admin.user.v1beta1 import user_api_pb2 as cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2


class UserAPIStub(object):
    """Provides a write only API for managing users.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateUser = channel.unary_unary(
                '/cs3.admin.user.v1beta1.UserAPI/CreateUser',
                request_serializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.CreateUserRequest.SerializeToString,
                response_deserializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.CreateUserResponse.FromString,
                )
        self.DeleteUser = channel.unary_unary(
                '/cs3.admin.user.v1beta1.UserAPI/DeleteUser',
                request_serializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.DeleteUserRequest.SerializeToString,
                response_deserializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.DeleteUserResponse.FromString,
                )


class UserAPIServicer(object):
    """Provides a write only API for managing users.
    """

    def CreateUser(self, request, context):
        """Create a user account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteUser(self, request, context):
        """Delete a user account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UserAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateUser': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateUser,
                    request_deserializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.CreateUserRequest.FromString,
                    response_serializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.CreateUserResponse.SerializeToString,
            ),
            'DeleteUser': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUser,
                    request_deserializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.DeleteUserRequest.FromString,
                    response_serializer=cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.DeleteUserResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cs3.admin.user.v1beta1.UserAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class UserAPI(object):
    """Provides a write only API for managing users.
    """

    @staticmethod
    def CreateUser(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, '/cs3.admin.user.v1beta1.UserAPI/CreateUser',
            cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.CreateUserRequest.SerializeToString,
            cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.CreateUserResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteUser(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, '/cs3.admin.user.v1beta1.UserAPI/DeleteUser',
            cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.DeleteUserRequest.SerializeToString,
            cs3_dot_admin_dot_user_dot_v1beta1_dot_user__api__pb2.DeleteUserResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
