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

from . import public_trips_pb2 as public__trips__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreatePublicTrip = channel.unary_unary(
                '/org.couchers.api.public_trips.PublicTrips/CreatePublicTrip',
                request_serializer=public__trips__pb2.CreatePublicTripReq.SerializeToString,
                response_deserializer=public__trips__pb2.PublicTrip.FromString,
                )
        self.GetPublicTrip = channel.unary_unary(
                '/org.couchers.api.public_trips.PublicTrips/GetPublicTrip',
                request_serializer=public__trips__pb2.GetPublicTripReq.SerializeToString,
                response_deserializer=public__trips__pb2.PublicTrip.FromString,
                )
        self.ListPublicTrips = channel.unary_unary(
                '/org.couchers.api.public_trips.PublicTrips/ListPublicTrips',
                request_serializer=public__trips__pb2.ListPublicTripsReq.SerializeToString,
                response_deserializer=public__trips__pb2.ListPublicTripsRes.FromString,
                )
        self.ListPublicTripsByUser = channel.unary_unary(
                '/org.couchers.api.public_trips.PublicTrips/ListPublicTripsByUser',
                request_serializer=public__trips__pb2.ListPublicTripsByUserReq.SerializeToString,
                response_deserializer=public__trips__pb2.ListPublicTripsByUserRes.FromString,
                )
        self.UpdatePublicTrip = channel.unary_unary(
                '/org.couchers.api.public_trips.PublicTrips/UpdatePublicTrip',
                request_serializer=public__trips__pb2.UpdatePublicTripReq.SerializeToString,
                response_deserializer=public__trips__pb2.PublicTrip.FromString,
                )


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

    def CreatePublicTrip(self, request, context):
        """Create a new public trip in a community
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPublicTrip(self, request, context):
        """Get details of a public trip
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListPublicTrips(self, request, context):
        """List public trips in a community (for hosts browsing)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListPublicTripsByUser(self, request, context):
        """List a user's public trips. Used for both the user's own dashboard and
        for showing upcoming trips on another user's profile.
        - If user_id matches the caller, all trips (including closed/past) are returned.
        - Otherwise only active, upcoming trips are returned.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdatePublicTrip(self, request, context):
        """Edit a public trip. Owner-only. Content edits (dates, description)
        require the trip's end date to be today or later. Status can be set to
        CLOSED at any time, or back to SEARCHING_FOR_HOST as long as the trip is
        not in the past.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PublicTripsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreatePublicTrip': grpc.unary_unary_rpc_method_handler(
                    servicer.CreatePublicTrip,
                    request_deserializer=public__trips__pb2.CreatePublicTripReq.FromString,
                    response_serializer=public__trips__pb2.PublicTrip.SerializeToString,
            ),
            'GetPublicTrip': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPublicTrip,
                    request_deserializer=public__trips__pb2.GetPublicTripReq.FromString,
                    response_serializer=public__trips__pb2.PublicTrip.SerializeToString,
            ),
            'ListPublicTrips': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPublicTrips,
                    request_deserializer=public__trips__pb2.ListPublicTripsReq.FromString,
                    response_serializer=public__trips__pb2.ListPublicTripsRes.SerializeToString,
            ),
            'ListPublicTripsByUser': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPublicTripsByUser,
                    request_deserializer=public__trips__pb2.ListPublicTripsByUserReq.FromString,
                    response_serializer=public__trips__pb2.ListPublicTripsByUserRes.SerializeToString,
            ),
            'UpdatePublicTrip': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdatePublicTrip,
                    request_deserializer=public__trips__pb2.UpdatePublicTripReq.FromString,
                    response_serializer=public__trips__pb2.PublicTrip.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.public_trips.PublicTrips', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreatePublicTrip(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.public_trips.PublicTrips/CreatePublicTrip',
            public__trips__pb2.CreatePublicTripReq.SerializeToString,
            public__trips__pb2.PublicTrip.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPublicTrip(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.public_trips.PublicTrips/GetPublicTrip',
            public__trips__pb2.GetPublicTripReq.SerializeToString,
            public__trips__pb2.PublicTrip.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListPublicTrips(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.public_trips.PublicTrips/ListPublicTrips',
            public__trips__pb2.ListPublicTripsReq.SerializeToString,
            public__trips__pb2.ListPublicTripsRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListPublicTripsByUser(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.public_trips.PublicTrips/ListPublicTripsByUser',
            public__trips__pb2.ListPublicTripsByUserReq.SerializeToString,
            public__trips__pb2.ListPublicTripsByUserRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdatePublicTrip(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.public_trips.PublicTrips/UpdatePublicTrip',
            public__trips__pb2.UpdatePublicTripReq.SerializeToString,
            public__trips__pb2.PublicTrip.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
