# 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 . import references_pb2 as references__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListReferences = channel.unary_unary(
                '/org.couchers.api.references.References/ListReferences',
                request_serializer=references__pb2.ListReferencesReq.SerializeToString,
                response_deserializer=references__pb2.ListReferencesRes.FromString,
                )
        self.WriteFriendReference = channel.unary_unary(
                '/org.couchers.api.references.References/WriteFriendReference',
                request_serializer=references__pb2.WriteFriendReferenceReq.SerializeToString,
                response_deserializer=references__pb2.Reference.FromString,
                )
        self.WriteHostRequestReference = channel.unary_unary(
                '/org.couchers.api.references.References/WriteHostRequestReference',
                request_serializer=references__pb2.WriteHostRequestReferenceReq.SerializeToString,
                response_deserializer=references__pb2.Reference.FromString,
                )
        self.HostRequestIndicateDidntMeetup = channel.unary_unary(
                '/org.couchers.api.references.References/HostRequestIndicateDidntMeetup',
                request_serializer=references__pb2.HostRequestIndicateDidntMeetupReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.AvailableWriteReferences = channel.unary_unary(
                '/org.couchers.api.references.References/AvailableWriteReferences',
                request_serializer=references__pb2.AvailableWriteReferencesReq.SerializeToString,
                response_deserializer=references__pb2.AvailableWriteReferencesRes.FromString,
                )
        self.ListPendingReferencesToWrite = channel.unary_unary(
                '/org.couchers.api.references.References/ListPendingReferencesToWrite',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=references__pb2.ListPendingReferencesToWriteRes.FromString,
                )
        self.GetHostRequestReferenceStatus = channel.unary_unary(
                '/org.couchers.api.references.References/GetHostRequestReferenceStatus',
                request_serializer=references__pb2.GetHostRequestReferenceStatusReq.SerializeToString,
                response_deserializer=references__pb2.GetHostRequestReferenceStatusRes.FromString,
                )


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

    def ListReferences(self, request, context):
        """Returns a paginated list of references satisfying some filtering criterion
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WriteFriendReference(self, request, context):
        """Write a reference for your friend. Raises INVALID_ARGUMENT if you
        try to write for yourself, or NOT_FOUND if the user doesn't exist.
        Raises FAILED_PRECONDITION if you try to write a reference for someone you already wrote a friend reference for.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WriteHostRequestReference(self, request, context):
        """Write a reference for someone after having hosted/surfed with them. Raises NOT_FOUND if the request doesn't
        exist.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def HostRequestIndicateDidntMeetup(self, request, context):
        """Indicate that the user didn't meet up
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AvailableWriteReferences(self, request, context):
        """Return the reference types that is, at the moment, possible to write about a user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListPendingReferencesToWrite(self, request, context):
        """Returns a list of references that you should write about others, e.g. after surfing or hosting
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetHostRequestReferenceStatus(self, request, context):
        """Returns status for whether the current user can write a host-request reference for the given request id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ReferencesServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListReferences': grpc.unary_unary_rpc_method_handler(
                    servicer.ListReferences,
                    request_deserializer=references__pb2.ListReferencesReq.FromString,
                    response_serializer=references__pb2.ListReferencesRes.SerializeToString,
            ),
            'WriteFriendReference': grpc.unary_unary_rpc_method_handler(
                    servicer.WriteFriendReference,
                    request_deserializer=references__pb2.WriteFriendReferenceReq.FromString,
                    response_serializer=references__pb2.Reference.SerializeToString,
            ),
            'WriteHostRequestReference': grpc.unary_unary_rpc_method_handler(
                    servicer.WriteHostRequestReference,
                    request_deserializer=references__pb2.WriteHostRequestReferenceReq.FromString,
                    response_serializer=references__pb2.Reference.SerializeToString,
            ),
            'HostRequestIndicateDidntMeetup': grpc.unary_unary_rpc_method_handler(
                    servicer.HostRequestIndicateDidntMeetup,
                    request_deserializer=references__pb2.HostRequestIndicateDidntMeetupReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'AvailableWriteReferences': grpc.unary_unary_rpc_method_handler(
                    servicer.AvailableWriteReferences,
                    request_deserializer=references__pb2.AvailableWriteReferencesReq.FromString,
                    response_serializer=references__pb2.AvailableWriteReferencesRes.SerializeToString,
            ),
            'ListPendingReferencesToWrite': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPendingReferencesToWrite,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=references__pb2.ListPendingReferencesToWriteRes.SerializeToString,
            ),
            'GetHostRequestReferenceStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetHostRequestReferenceStatus,
                    request_deserializer=references__pb2.GetHostRequestReferenceStatusReq.FromString,
                    response_serializer=references__pb2.GetHostRequestReferenceStatusRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.references.References', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def ListReferences(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, '/org.couchers.api.references.References/ListReferences',
            references__pb2.ListReferencesReq.SerializeToString,
            references__pb2.ListReferencesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WriteFriendReference(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, '/org.couchers.api.references.References/WriteFriendReference',
            references__pb2.WriteFriendReferenceReq.SerializeToString,
            references__pb2.Reference.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WriteHostRequestReference(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, '/org.couchers.api.references.References/WriteHostRequestReference',
            references__pb2.WriteHostRequestReferenceReq.SerializeToString,
            references__pb2.Reference.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def HostRequestIndicateDidntMeetup(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, '/org.couchers.api.references.References/HostRequestIndicateDidntMeetup',
            references__pb2.HostRequestIndicateDidntMeetupReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AvailableWriteReferences(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, '/org.couchers.api.references.References/AvailableWriteReferences',
            references__pb2.AvailableWriteReferencesReq.SerializeToString,
            references__pb2.AvailableWriteReferencesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListPendingReferencesToWrite(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, '/org.couchers.api.references.References/ListPendingReferencesToWrite',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            references__pb2.ListPendingReferencesToWriteRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetHostRequestReferenceStatus(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, '/org.couchers.api.references.References/GetHostRequestReferenceStatus',
            references__pb2.GetHostRequestReferenceStatusReq.SerializeToString,
            references__pb2.GetHostRequestReferenceStatusRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
