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

from placebrain_contracts import places_pb2 as places__pb2

GRPC_GENERATED_VERSION = '1.76.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in places_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreatePlace = channel.unary_unary(
                '/places.PlacesService/CreatePlace',
                request_serializer=places__pb2.CreatePlaceRequest.SerializeToString,
                response_deserializer=places__pb2.CreatePlaceResponse.FromString,
                _registered_method=True)
        self.GetPlace = channel.unary_unary(
                '/places.PlacesService/GetPlace',
                request_serializer=places__pb2.GetPlaceRequest.SerializeToString,
                response_deserializer=places__pb2.GetPlaceResponse.FromString,
                _registered_method=True)
        self.ListPlaces = channel.unary_unary(
                '/places.PlacesService/ListPlaces',
                request_serializer=places__pb2.ListPlacesRequest.SerializeToString,
                response_deserializer=places__pb2.ListPlacesResponse.FromString,
                _registered_method=True)
        self.UpdatePlace = channel.unary_unary(
                '/places.PlacesService/UpdatePlace',
                request_serializer=places__pb2.UpdatePlaceRequest.SerializeToString,
                response_deserializer=places__pb2.UpdatePlaceResponse.FromString,
                _registered_method=True)
        self.DeletePlace = channel.unary_unary(
                '/places.PlacesService/DeletePlace',
                request_serializer=places__pb2.DeletePlaceRequest.SerializeToString,
                response_deserializer=places__pb2.DeletePlaceResponse.FromString,
                _registered_method=True)
        self.AddMember = channel.unary_unary(
                '/places.PlacesService/AddMember',
                request_serializer=places__pb2.AddMemberRequest.SerializeToString,
                response_deserializer=places__pb2.AddMemberResponse.FromString,
                _registered_method=True)
        self.RemoveMember = channel.unary_unary(
                '/places.PlacesService/RemoveMember',
                request_serializer=places__pb2.RemoveMemberRequest.SerializeToString,
                response_deserializer=places__pb2.RemoveMemberResponse.FromString,
                _registered_method=True)
        self.UpdateMemberRole = channel.unary_unary(
                '/places.PlacesService/UpdateMemberRole',
                request_serializer=places__pb2.UpdateMemberRoleRequest.SerializeToString,
                response_deserializer=places__pb2.UpdateMemberRoleResponse.FromString,
                _registered_method=True)
        self.ListMembers = channel.unary_unary(
                '/places.PlacesService/ListMembers',
                request_serializer=places__pb2.ListMembersRequest.SerializeToString,
                response_deserializer=places__pb2.ListMembersResponse.FromString,
                _registered_method=True)


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

    def CreatePlace(self, request, context):
        """Places CRUD
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPlace(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 ListPlaces(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 UpdatePlace(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 DeletePlace(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 AddMember(self, request, context):
        """Members
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveMember(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 UpdateMemberRole(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 ListMembers(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 add_PlacesServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreatePlace': grpc.unary_unary_rpc_method_handler(
                    servicer.CreatePlace,
                    request_deserializer=places__pb2.CreatePlaceRequest.FromString,
                    response_serializer=places__pb2.CreatePlaceResponse.SerializeToString,
            ),
            'GetPlace': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPlace,
                    request_deserializer=places__pb2.GetPlaceRequest.FromString,
                    response_serializer=places__pb2.GetPlaceResponse.SerializeToString,
            ),
            'ListPlaces': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPlaces,
                    request_deserializer=places__pb2.ListPlacesRequest.FromString,
                    response_serializer=places__pb2.ListPlacesResponse.SerializeToString,
            ),
            'UpdatePlace': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdatePlace,
                    request_deserializer=places__pb2.UpdatePlaceRequest.FromString,
                    response_serializer=places__pb2.UpdatePlaceResponse.SerializeToString,
            ),
            'DeletePlace': grpc.unary_unary_rpc_method_handler(
                    servicer.DeletePlace,
                    request_deserializer=places__pb2.DeletePlaceRequest.FromString,
                    response_serializer=places__pb2.DeletePlaceResponse.SerializeToString,
            ),
            'AddMember': grpc.unary_unary_rpc_method_handler(
                    servicer.AddMember,
                    request_deserializer=places__pb2.AddMemberRequest.FromString,
                    response_serializer=places__pb2.AddMemberResponse.SerializeToString,
            ),
            'RemoveMember': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveMember,
                    request_deserializer=places__pb2.RemoveMemberRequest.FromString,
                    response_serializer=places__pb2.RemoveMemberResponse.SerializeToString,
            ),
            'UpdateMemberRole': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateMemberRole,
                    request_deserializer=places__pb2.UpdateMemberRoleRequest.FromString,
                    response_serializer=places__pb2.UpdateMemberRoleResponse.SerializeToString,
            ),
            'ListMembers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListMembers,
                    request_deserializer=places__pb2.ListMembersRequest.FromString,
                    response_serializer=places__pb2.ListMembersResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'places.PlacesService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('places.PlacesService', rpc_method_handlers)


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

    @staticmethod
    def CreatePlace(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,
            '/places.PlacesService/CreatePlace',
            places__pb2.CreatePlaceRequest.SerializeToString,
            places__pb2.CreatePlaceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPlace(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,
            '/places.PlacesService/GetPlace',
            places__pb2.GetPlaceRequest.SerializeToString,
            places__pb2.GetPlaceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListPlaces(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,
            '/places.PlacesService/ListPlaces',
            places__pb2.ListPlacesRequest.SerializeToString,
            places__pb2.ListPlacesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdatePlace(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,
            '/places.PlacesService/UpdatePlace',
            places__pb2.UpdatePlaceRequest.SerializeToString,
            places__pb2.UpdatePlaceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeletePlace(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,
            '/places.PlacesService/DeletePlace',
            places__pb2.DeletePlaceRequest.SerializeToString,
            places__pb2.DeletePlaceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddMember(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,
            '/places.PlacesService/AddMember',
            places__pb2.AddMemberRequest.SerializeToString,
            places__pb2.AddMemberResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveMember(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,
            '/places.PlacesService/RemoveMember',
            places__pb2.RemoveMemberRequest.SerializeToString,
            places__pb2.RemoveMemberResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateMemberRole(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,
            '/places.PlacesService/UpdateMemberRole',
            places__pb2.UpdateMemberRoleRequest.SerializeToString,
            places__pb2.UpdateMemberRoleResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListMembers(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,
            '/places.PlacesService/ListMembers',
            places__pb2.ListMembersRequest.SerializeToString,
            places__pb2.ListMembersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
