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

from terrascope_api.models import user_collection_pb2 as user__collection__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/oi.papi.UserCollectionApi/create',
                request_serializer=user__collection__pb2.UserCollectionCreateRequest.SerializeToString,
                response_deserializer=user__collection__pb2.UserCollectionCreateResponse.FromString,
                )
        self.get = channel.unary_unary(
                '/oi.papi.UserCollectionApi/get',
                request_serializer=user__collection__pb2.UserCollectionGetRequest.SerializeToString,
                response_deserializer=user__collection__pb2.UserCollectionGetResponse.FromString,
                )
        self.list = channel.unary_unary(
                '/oi.papi.UserCollectionApi/list',
                request_serializer=user__collection__pb2.UserCollectionListRequest.SerializeToString,
                response_deserializer=user__collection__pb2.UserCollectionListResponse.FromString,
                )


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

    def create(self, request, context):
        """
        Create a new UserCollection to house a collection of users. This can only be done by an admin.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        Get the details of a UserCollection. This can only done for the UserCollection that a User is a part of.
        If include_users is set to true, this endpoint also returns the list of Users in the UserCollection.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        List user collections a user is a member of
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UserCollectionApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=user__collection__pb2.UserCollectionCreateRequest.FromString,
                    response_serializer=user__collection__pb2.UserCollectionCreateResponse.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=user__collection__pb2.UserCollectionGetRequest.FromString,
                    response_serializer=user__collection__pb2.UserCollectionGetResponse.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=user__collection__pb2.UserCollectionListRequest.FromString,
                    response_serializer=user__collection__pb2.UserCollectionListResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.UserCollectionApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class UserCollectionApi(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, '/oi.papi.UserCollectionApi/create',
            user__collection__pb2.UserCollectionCreateRequest.SerializeToString,
            user__collection__pb2.UserCollectionCreateResponse.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, '/oi.papi.UserCollectionApi/get',
            user__collection__pb2.UserCollectionGetRequest.SerializeToString,
            user__collection__pb2.UserCollectionGetResponse.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, '/oi.papi.UserCollectionApi/list',
            user__collection__pb2.UserCollectionListRequest.SerializeToString,
            user__collection__pb2.UserCollectionListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
