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

from cs3.identity.group.v1beta1 import group_api_pb2 as cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2


class GroupAPIStub(object):
    """GroupProvider API.

    The GroupProvider API is responsible for providing methods to retrieve
    information about groups and their interactions with users.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a successful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.

    Provides an API for managing groups.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetGroup = channel.unary_unary(
                '/cs3.identity.group.v1beta1.GroupAPI/GetGroup',
                request_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupRequest.SerializeToString,
                response_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupResponse.FromString,
                )
        self.GetGroupByClaim = channel.unary_unary(
                '/cs3.identity.group.v1beta1.GroupAPI/GetGroupByClaim',
                request_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupByClaimRequest.SerializeToString,
                response_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupByClaimResponse.FromString,
                )
        self.GetMembers = channel.unary_unary(
                '/cs3.identity.group.v1beta1.GroupAPI/GetMembers',
                request_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetMembersRequest.SerializeToString,
                response_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetMembersResponse.FromString,
                )
        self.HasMember = channel.unary_unary(
                '/cs3.identity.group.v1beta1.GroupAPI/HasMember',
                request_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.HasMemberRequest.SerializeToString,
                response_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.HasMemberResponse.FromString,
                )
        self.FindGroups = channel.unary_unary(
                '/cs3.identity.group.v1beta1.GroupAPI/FindGroups',
                request_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.FindGroupsRequest.SerializeToString,
                response_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.FindGroupsResponse.FromString,
                )


class GroupAPIServicer(object):
    """GroupProvider API.

    The GroupProvider API is responsible for providing methods to retrieve
    information about groups and their interactions with users.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a successful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.

    Provides an API for managing groups.
    """

    def GetGroup(self, request, context):
        """Gets the information about a group by the group id.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetGroupByClaim(self, request, context):
        """Gets the information about a group based on a specified claim.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMembers(self, request, context):
        """Gets the members of a group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def HasMember(self, request, context):
        """Tells if the group has certain member.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FindGroups(self, request, context):
        """Finds groups whose names match the specified filter.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GroupAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroup,
                    request_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupRequest.FromString,
                    response_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupResponse.SerializeToString,
            ),
            'GetGroupByClaim': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGroupByClaim,
                    request_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupByClaimRequest.FromString,
                    response_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupByClaimResponse.SerializeToString,
            ),
            'GetMembers': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMembers,
                    request_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetMembersRequest.FromString,
                    response_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetMembersResponse.SerializeToString,
            ),
            'HasMember': grpc.unary_unary_rpc_method_handler(
                    servicer.HasMember,
                    request_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.HasMemberRequest.FromString,
                    response_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.HasMemberResponse.SerializeToString,
            ),
            'FindGroups': grpc.unary_unary_rpc_method_handler(
                    servicer.FindGroups,
                    request_deserializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.FindGroupsRequest.FromString,
                    response_serializer=cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.FindGroupsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cs3.identity.group.v1beta1.GroupAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class GroupAPI(object):
    """GroupProvider API.

    The GroupProvider API is responsible for providing methods to retrieve
    information about groups and their interactions with users.

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
    NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    RFC 2119.

    The following are global requirements that apply to all methods:
    Any method MUST return CODE_OK on a successful operation.
    Any method MAY return NOT_IMPLEMENTED.
    Any method MAY return INTERNAL.
    Any method MAY return UNKNOWN.
    Any method MAY return UNAUTHENTICATED.

    Provides an API for managing groups.
    """

    @staticmethod
    def GetGroup(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.identity.group.v1beta1.GroupAPI/GetGroup',
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupRequest.SerializeToString,
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetGroupByClaim(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.identity.group.v1beta1.GroupAPI/GetGroupByClaim',
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupByClaimRequest.SerializeToString,
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetGroupByClaimResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMembers(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.identity.group.v1beta1.GroupAPI/GetMembers',
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetMembersRequest.SerializeToString,
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.GetMembersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def HasMember(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.identity.group.v1beta1.GroupAPI/HasMember',
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.HasMemberRequest.SerializeToString,
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.HasMemberResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FindGroups(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.identity.group.v1beta1.GroupAPI/FindGroups',
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.FindGroupsRequest.SerializeToString,
            cs3_dot_identity_dot_group_dot_v1beta1_dot_group__api__pb2.FindGroupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
