# 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 jail_pb2 as jail__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.JailInfo = channel.unary_unary(
                '/org.couchers.jail.Jail/JailInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=jail__pb2.JailInfoRes.FromString,
                )
        self.AcceptTOS = channel.unary_unary(
                '/org.couchers.jail.Jail/AcceptTOS',
                request_serializer=jail__pb2.AcceptTOSReq.SerializeToString,
                response_deserializer=jail__pb2.JailInfoRes.FromString,
                )
        self.SetLocation = channel.unary_unary(
                '/org.couchers.jail.Jail/SetLocation',
                request_serializer=jail__pb2.SetLocationReq.SerializeToString,
                response_deserializer=jail__pb2.JailInfoRes.FromString,
                )
        self.AcceptCommunityGuidelines = channel.unary_unary(
                '/org.couchers.jail.Jail/AcceptCommunityGuidelines',
                request_serializer=jail__pb2.AcceptCommunityGuidelinesReq.SerializeToString,
                response_deserializer=jail__pb2.JailInfoRes.FromString,
                )


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

    def JailInfo(self, request, context):
        """
        Jail API

        If the user hasn't completed necessary steps needed to use the app, they are
        only allowed to hit the Jail API.

        E.g. if signing up is incomplete, or they haven't agreed to TOS, etc.

        These API functions are available only to signed-in users, but while other
        APIs can't be used while Jailed, these can.
        Get reason why the user is in jail, e.g. hasn't completed all sign-up
        steps, or needs to read something, etc
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AcceptTOS(self, request, context):
        """Accept TOS
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetLocation(self, request, context):
        """Set the user's location
        If you're not jailed, do this with api.UpdateProfile!
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AcceptCommunityGuidelines(self, request, context):
        """Accept community guidelines
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_JailServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'JailInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.JailInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=jail__pb2.JailInfoRes.SerializeToString,
            ),
            'AcceptTOS': grpc.unary_unary_rpc_method_handler(
                    servicer.AcceptTOS,
                    request_deserializer=jail__pb2.AcceptTOSReq.FromString,
                    response_serializer=jail__pb2.JailInfoRes.SerializeToString,
            ),
            'SetLocation': grpc.unary_unary_rpc_method_handler(
                    servicer.SetLocation,
                    request_deserializer=jail__pb2.SetLocationReq.FromString,
                    response_serializer=jail__pb2.JailInfoRes.SerializeToString,
            ),
            'AcceptCommunityGuidelines': grpc.unary_unary_rpc_method_handler(
                    servicer.AcceptCommunityGuidelines,
                    request_deserializer=jail__pb2.AcceptCommunityGuidelinesReq.FromString,
                    response_serializer=jail__pb2.JailInfoRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.jail.Jail', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def JailInfo(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.jail.Jail/JailInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            jail__pb2.JailInfoRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AcceptTOS(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.jail.Jail/AcceptTOS',
            jail__pb2.AcceptTOSReq.SerializeToString,
            jail__pb2.JailInfoRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetLocation(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.jail.Jail/SetLocation',
            jail__pb2.SetLocationReq.SerializeToString,
            jail__pb2.JailInfoRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AcceptCommunityGuidelines(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.jail.Jail/AcceptCommunityGuidelines',
            jail__pb2.AcceptCommunityGuidelinesReq.SerializeToString,
            jail__pb2.JailInfoRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
