# 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 requests_pb2 as requests__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateHostRequest = channel.unary_unary(
                '/org.couchers.api.requests.Requests/CreateHostRequest',
                request_serializer=requests__pb2.CreateHostRequestReq.SerializeToString,
                response_deserializer=requests__pb2.CreateHostRequestRes.FromString,
                )
        self.GetHostRequest = channel.unary_unary(
                '/org.couchers.api.requests.Requests/GetHostRequest',
                request_serializer=requests__pb2.GetHostRequestReq.SerializeToString,
                response_deserializer=requests__pb2.HostRequest.FromString,
                )
        self.RespondHostRequest = channel.unary_unary(
                '/org.couchers.api.requests.Requests/RespondHostRequest',
                request_serializer=requests__pb2.RespondHostRequestReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.SetHostRequestArchiveStatus = channel.unary_unary(
                '/org.couchers.api.requests.Requests/SetHostRequestArchiveStatus',
                request_serializer=requests__pb2.SetHostRequestArchiveStatusReq.SerializeToString,
                response_deserializer=requests__pb2.SetHostRequestArchiveStatusRes.FromString,
                )
        self.ListHostRequests = channel.unary_unary(
                '/org.couchers.api.requests.Requests/ListHostRequests',
                request_serializer=requests__pb2.ListHostRequestsReq.SerializeToString,
                response_deserializer=requests__pb2.ListHostRequestsRes.FromString,
                )
        self.GetHostRequestMessages = channel.unary_unary(
                '/org.couchers.api.requests.Requests/GetHostRequestMessages',
                request_serializer=requests__pb2.GetHostRequestMessagesReq.SerializeToString,
                response_deserializer=requests__pb2.GetHostRequestMessagesRes.FromString,
                )
        self.SendHostRequestMessage = channel.unary_unary(
                '/org.couchers.api.requests.Requests/SendHostRequestMessage',
                request_serializer=requests__pb2.SendHostRequestMessageReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetHostRequestUpdates = channel.unary_unary(
                '/org.couchers.api.requests.Requests/GetHostRequestUpdates',
                request_serializer=requests__pb2.GetHostRequestUpdatesReq.SerializeToString,
                response_deserializer=requests__pb2.GetHostRequestUpdatesRes.FromString,
                )
        self.MarkLastSeenHostRequest = channel.unary_unary(
                '/org.couchers.api.requests.Requests/MarkLastSeenHostRequest',
                request_serializer=requests__pb2.MarkLastSeenHostRequestReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetResponseRate = channel.unary_unary(
                '/org.couchers.api.requests.Requests/GetResponseRate',
                request_serializer=requests__pb2.GetResponseRateReq.SerializeToString,
                response_deserializer=requests__pb2.GetResponseRateRes.FromString,
                )
        self.SendHostRequestFeedback = channel.unary_unary(
                '/org.couchers.api.requests.Requests/SendHostRequestFeedback',
                request_serializer=requests__pb2.SendHostRequestFeedbackReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


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

    def CreateHostRequest(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 GetHostRequest(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 RespondHostRequest(self, request, context):
        """Change the status of a host request.
        Throws NOT_FOUND if you don't have a host request of that id, NOT_AUTHORIZED
        if you try to change the status to one you aren't allowed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetHostRequestArchiveStatus(self, request, context):
        """Archive a host request. This will remove it from the list of requests
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListHostRequests(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 GetHostRequestMessages(self, request, context):
        """Get the messages and events (created, accepted, etc) for a host request
        Throws NOT_FOUND if the user isn't part of the request or it doesn't exist
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendHostRequestMessage(self, request, context):
        """Adds a new message to a host request
        Throws NOT_FOUND if the user isn't part of the request or it doesn't exist
        Throws PERMISSION_DENIED if you try to send a message to a rejected, confirmed
        or cancelled request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetHostRequestUpdates(self, request, context):
        """Get new messages in a host request and latest status
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MarkLastSeenHostRequest(self, request, context):
        """Saves the last seen message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetResponseRate(self, request, context):
        """Get the response rate and response time for a given user
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendHostRequestFeedback(self, request, context):
        """Send private feedback on host reqeust
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RequestsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateHostRequest': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateHostRequest,
                    request_deserializer=requests__pb2.CreateHostRequestReq.FromString,
                    response_serializer=requests__pb2.CreateHostRequestRes.SerializeToString,
            ),
            'GetHostRequest': grpc.unary_unary_rpc_method_handler(
                    servicer.GetHostRequest,
                    request_deserializer=requests__pb2.GetHostRequestReq.FromString,
                    response_serializer=requests__pb2.HostRequest.SerializeToString,
            ),
            'RespondHostRequest': grpc.unary_unary_rpc_method_handler(
                    servicer.RespondHostRequest,
                    request_deserializer=requests__pb2.RespondHostRequestReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetHostRequestArchiveStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.SetHostRequestArchiveStatus,
                    request_deserializer=requests__pb2.SetHostRequestArchiveStatusReq.FromString,
                    response_serializer=requests__pb2.SetHostRequestArchiveStatusRes.SerializeToString,
            ),
            'ListHostRequests': grpc.unary_unary_rpc_method_handler(
                    servicer.ListHostRequests,
                    request_deserializer=requests__pb2.ListHostRequestsReq.FromString,
                    response_serializer=requests__pb2.ListHostRequestsRes.SerializeToString,
            ),
            'GetHostRequestMessages': grpc.unary_unary_rpc_method_handler(
                    servicer.GetHostRequestMessages,
                    request_deserializer=requests__pb2.GetHostRequestMessagesReq.FromString,
                    response_serializer=requests__pb2.GetHostRequestMessagesRes.SerializeToString,
            ),
            'SendHostRequestMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendHostRequestMessage,
                    request_deserializer=requests__pb2.SendHostRequestMessageReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetHostRequestUpdates': grpc.unary_unary_rpc_method_handler(
                    servicer.GetHostRequestUpdates,
                    request_deserializer=requests__pb2.GetHostRequestUpdatesReq.FromString,
                    response_serializer=requests__pb2.GetHostRequestUpdatesRes.SerializeToString,
            ),
            'MarkLastSeenHostRequest': grpc.unary_unary_rpc_method_handler(
                    servicer.MarkLastSeenHostRequest,
                    request_deserializer=requests__pb2.MarkLastSeenHostRequestReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetResponseRate': grpc.unary_unary_rpc_method_handler(
                    servicer.GetResponseRate,
                    request_deserializer=requests__pb2.GetResponseRateReq.FromString,
                    response_serializer=requests__pb2.GetResponseRateRes.SerializeToString,
            ),
            'SendHostRequestFeedback': grpc.unary_unary_rpc_method_handler(
                    servicer.SendHostRequestFeedback,
                    request_deserializer=requests__pb2.SendHostRequestFeedbackReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.requests.Requests', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateHostRequest(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.requests.Requests/CreateHostRequest',
            requests__pb2.CreateHostRequestReq.SerializeToString,
            requests__pb2.CreateHostRequestRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetHostRequest(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.requests.Requests/GetHostRequest',
            requests__pb2.GetHostRequestReq.SerializeToString,
            requests__pb2.HostRequest.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RespondHostRequest(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.requests.Requests/RespondHostRequest',
            requests__pb2.RespondHostRequestReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetHostRequestArchiveStatus(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.requests.Requests/SetHostRequestArchiveStatus',
            requests__pb2.SetHostRequestArchiveStatusReq.SerializeToString,
            requests__pb2.SetHostRequestArchiveStatusRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListHostRequests(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.requests.Requests/ListHostRequests',
            requests__pb2.ListHostRequestsReq.SerializeToString,
            requests__pb2.ListHostRequestsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetHostRequestMessages(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.requests.Requests/GetHostRequestMessages',
            requests__pb2.GetHostRequestMessagesReq.SerializeToString,
            requests__pb2.GetHostRequestMessagesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendHostRequestMessage(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.requests.Requests/SendHostRequestMessage',
            requests__pb2.SendHostRequestMessageReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetHostRequestUpdates(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.requests.Requests/GetHostRequestUpdates',
            requests__pb2.GetHostRequestUpdatesReq.SerializeToString,
            requests__pb2.GetHostRequestUpdatesRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MarkLastSeenHostRequest(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.requests.Requests/MarkLastSeenHostRequest',
            requests__pb2.MarkLastSeenHostRequestReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetResponseRate(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.requests.Requests/GetResponseRate',
            requests__pb2.GetResponseRateReq.SerializeToString,
            requests__pb2.GetResponseRateRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendHostRequestFeedback(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.requests.Requests/SendHostRequestFeedback',
            requests__pb2.SendHostRequestFeedbackReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
