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

from union.internal.identity import user_payload_pb2 as identity_dot_user__payload__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateUser = channel.unary_unary(
                '/cloudidl.identity.UserService/CreateUser',
                request_serializer=identity_dot_user__payload__pb2.CreateUserRequest.SerializeToString,
                response_deserializer=identity_dot_user__payload__pb2.CreateUserResponse.FromString,
                )
        self.GetUser = channel.unary_unary(
                '/cloudidl.identity.UserService/GetUser',
                request_serializer=identity_dot_user__payload__pb2.GetUserRequest.SerializeToString,
                response_deserializer=identity_dot_user__payload__pb2.GetUserResponse.FromString,
                )
        self.DeleteUser = channel.unary_unary(
                '/cloudidl.identity.UserService/DeleteUser',
                request_serializer=identity_dot_user__payload__pb2.DeleteUserRequest.SerializeToString,
                response_deserializer=identity_dot_user__payload__pb2.DeleteUserResponse.FromString,
                )
        self.ListUsers = channel.unary_unary(
                '/cloudidl.identity.UserService/ListUsers',
                request_serializer=identity_dot_user__payload__pb2.ListUsersRequest.SerializeToString,
                response_deserializer=identity_dot_user__payload__pb2.ListUsersResponse.FromString,
                )
        self.ListUsersCount = channel.unary_unary(
                '/cloudidl.identity.UserService/ListUsersCount',
                request_serializer=identity_dot_user__payload__pb2.ListUsersCountRequest.SerializeToString,
                response_deserializer=identity_dot_user__payload__pb2.ListUsersCountResponse.FromString,
                )
        self.GetUserAndGroupsForOrg = channel.unary_unary(
                '/cloudidl.identity.UserService/GetUserAndGroupsForOrg',
                request_serializer=identity_dot_user__payload__pb2.GetUserAndGroupsForOrgRequest.SerializeToString,
                response_deserializer=identity_dot_user__payload__pb2.GetUserAndGroupsForOrgResponse.FromString,
                )


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

    def CreateUser(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 GetUser(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 DeleteUser(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 ListUsers(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 ListUsersCount(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 GetUserAndGroupsForOrg(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_UserServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateUser': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateUser,
                    request_deserializer=identity_dot_user__payload__pb2.CreateUserRequest.FromString,
                    response_serializer=identity_dot_user__payload__pb2.CreateUserResponse.SerializeToString,
            ),
            'GetUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUser,
                    request_deserializer=identity_dot_user__payload__pb2.GetUserRequest.FromString,
                    response_serializer=identity_dot_user__payload__pb2.GetUserResponse.SerializeToString,
            ),
            'DeleteUser': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUser,
                    request_deserializer=identity_dot_user__payload__pb2.DeleteUserRequest.FromString,
                    response_serializer=identity_dot_user__payload__pb2.DeleteUserResponse.SerializeToString,
            ),
            'ListUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUsers,
                    request_deserializer=identity_dot_user__payload__pb2.ListUsersRequest.FromString,
                    response_serializer=identity_dot_user__payload__pb2.ListUsersResponse.SerializeToString,
            ),
            'ListUsersCount': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUsersCount,
                    request_deserializer=identity_dot_user__payload__pb2.ListUsersCountRequest.FromString,
                    response_serializer=identity_dot_user__payload__pb2.ListUsersCountResponse.SerializeToString,
            ),
            'GetUserAndGroupsForOrg': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserAndGroupsForOrg,
                    request_deserializer=identity_dot_user__payload__pb2.GetUserAndGroupsForOrgRequest.FromString,
                    response_serializer=identity_dot_user__payload__pb2.GetUserAndGroupsForOrgResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cloudidl.identity.UserService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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, '/cloudidl.identity.UserService/CreateUser',
            identity_dot_user__payload__pb2.CreateUserRequest.SerializeToString,
            identity_dot_user__payload__pb2.CreateUserResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUser(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, '/cloudidl.identity.UserService/GetUser',
            identity_dot_user__payload__pb2.GetUserRequest.SerializeToString,
            identity_dot_user__payload__pb2.GetUserResponse.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, '/cloudidl.identity.UserService/DeleteUser',
            identity_dot_user__payload__pb2.DeleteUserRequest.SerializeToString,
            identity_dot_user__payload__pb2.DeleteUserResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUsers(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, '/cloudidl.identity.UserService/ListUsers',
            identity_dot_user__payload__pb2.ListUsersRequest.SerializeToString,
            identity_dot_user__payload__pb2.ListUsersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUsersCount(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, '/cloudidl.identity.UserService/ListUsersCount',
            identity_dot_user__payload__pb2.ListUsersCountRequest.SerializeToString,
            identity_dot_user__payload__pb2.ListUsersCountResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUserAndGroupsForOrg(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, '/cloudidl.identity.UserService/GetUserAndGroupsForOrg',
            identity_dot_user__payload__pb2.GetUserAndGroupsForOrgRequest.SerializeToString,
            identity_dot_user__payload__pb2.GetUserAndGroupsForOrgResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
