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

from chirpstack_api.api import tenant_pb2 as chirpstack__api_dot_api_dot_tenant__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class TenantServiceStub(object):
    """TenantService is the service providing API methods for managing tenants.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/api.TenantService/Create',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.CreateTenantRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.CreateTenantResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/api.TenantService/Get',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/api.TenantService/Update',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.UpdateTenantRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Delete = channel.unary_unary(
                '/api.TenantService/Delete',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.DeleteTenantRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.List = channel.unary_unary(
                '/api.TenantService/List',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantsRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantsResponse.FromString,
                )
        self.AddUser = channel.unary_unary(
                '/api.TenantService/AddUser',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.AddTenantUserRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetUser = channel.unary_unary(
                '/api.TenantService/GetUser',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantUserRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantUserResponse.FromString,
                )
        self.UpdateUser = channel.unary_unary(
                '/api.TenantService/UpdateUser',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.UpdateTenantUserRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DeleteUser = channel.unary_unary(
                '/api.TenantService/DeleteUser',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.DeleteTenantUserRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ListUsers = channel.unary_unary(
                '/api.TenantService/ListUsers',
                request_serializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantUsersRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantUsersResponse.FromString,
                )


class TenantServiceServicer(object):
    """TenantService is the service providing API methods for managing tenants.
    """

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

    def Get(self, request, context):
        """Get the tenant for the given ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Update the given tenant.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete the tenant with the given ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Get the list of tenants.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddUser(self, request, context):
        """Add an user to the tenant.
        Note: the user must already exist.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUser(self, request, context):
        """Get the the tenant user for the given tenant and user IDs.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateUser(self, request, context):
        """Update the given tenant user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteUser(self, request, context):
        """Delete the given tenant user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUsers(self, request, context):
        """Get the list of tenant users.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TenantServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.CreateTenantRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_tenant__pb2.CreateTenantResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.UpdateTenantRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.DeleteTenantRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantsRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantsResponse.SerializeToString,
            ),
            'AddUser': grpc.unary_unary_rpc_method_handler(
                    servicer.AddUser,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.AddTenantUserRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUser,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantUserRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_tenant__pb2.GetTenantUserResponse.SerializeToString,
            ),
            'UpdateUser': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateUser,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.UpdateTenantUserRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DeleteUser': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteUser,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.DeleteTenantUserRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ListUsers': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUsers,
                    request_deserializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantUsersRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_tenant__pb2.ListTenantUsersResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'api.TenantService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class TenantService(object):
    """TenantService is the service providing API methods for managing tenants.
    """

    @staticmethod
    def Create(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, '/api.TenantService/Create',
            chirpstack__api_dot_api_dot_tenant__pb2.CreateTenantRequest.SerializeToString,
            chirpstack__api_dot_api_dot_tenant__pb2.CreateTenantResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Get(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, '/api.TenantService/Get',
            chirpstack__api_dot_api_dot_tenant__pb2.GetTenantRequest.SerializeToString,
            chirpstack__api_dot_api_dot_tenant__pb2.GetTenantResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/api.TenantService/Update',
            chirpstack__api_dot_api_dot_tenant__pb2.UpdateTenantRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/api.TenantService/Delete',
            chirpstack__api_dot_api_dot_tenant__pb2.DeleteTenantRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/api.TenantService/List',
            chirpstack__api_dot_api_dot_tenant__pb2.ListTenantsRequest.SerializeToString,
            chirpstack__api_dot_api_dot_tenant__pb2.ListTenantsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddUser(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, '/api.TenantService/AddUser',
            chirpstack__api_dot_api_dot_tenant__pb2.AddTenantUserRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUser(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, '/api.TenantService/GetUser',
            chirpstack__api_dot_api_dot_tenant__pb2.GetTenantUserRequest.SerializeToString,
            chirpstack__api_dot_api_dot_tenant__pb2.GetTenantUserResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateUser(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, '/api.TenantService/UpdateUser',
            chirpstack__api_dot_api_dot_tenant__pb2.UpdateTenantUserRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteUser(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, '/api.TenantService/DeleteUser',
            chirpstack__api_dot_api_dot_tenant__pb2.DeleteTenantUserRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListUsers(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, '/api.TenantService/ListUsers',
            chirpstack__api_dot_api_dot_tenant__pb2.ListTenantUsersRequest.SerializeToString,
            chirpstack__api_dot_api_dot_tenant__pb2.ListTenantUsersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
