"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import abc
import collections.abc
import core.mgmt.v1beta.mgmt_pb2
import grpc
import grpc.aio
import typing

_T = typing.TypeVar('_T')

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
    ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore
    ...

class MgmtPrivateServiceStub:
    """Mgmt service responds to internal access"""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    ListUsersAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListUsersAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.ListUsersAdminResponse,
    ]
    """ListUsersAdmin method receives a ListUsersAdminRequest message and returns
    a ListUsersAdminResponse message.
    """
    GetUserAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserAdminResponse,
    ]
    """GetUserAdmin method receives a GetUserAdminRequest message and returns
    a GetUserAdminResponse message.
    """
    LookUpUserAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminResponse,
    ]
    """LookUpUserAdmin method receives a LookUpUserAdminRequest message and
    returns a LookUpUserAdminResponse
    """
    ListOrganizationsAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminResponse,
    ]
    """ListOrganizationsAdmin method receives a ListOrganizationsAdminRequest message and returns
    a ListOrganizationsAdminResponse message.
    """
    GetOrganizationAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminResponse,
    ]
    """GetOrganizationAdmin method receives a GetOrganizationAdminRequest message and returns
    a GetOrganizationAdminResponse message.
    """
    LookUpOrganizationAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminResponse,
    ]
    """LookUpOrganizationAdmin method receives a LookUpOrganizationAdminRequest message and
    returns a LookUpOrganizationAdminResponse
    """
    GetUserSubscriptionAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminResponse,
    ]
    """GetUserSubscriptionAdmin"""
    GetOrganizationSubscriptionAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminResponse,
    ]
    """GetOrganizationSubscriptionAdmin"""
    SubtractCreditAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminResponse,
    ]
    """Subtract Instill Credit from a user or organization account.

    This endpoint subtracts the specified amount of Instill Credit from an
    account. This is intended for processes on Instill Cloud that consume
    credit, such as the execution of pre-configured connectors.
    Note that if the remaining credit in the account is less than the
    requested amount, it will be subtracted anyways, leaving the account
    credit at zero. A ResourceExhausted error will be returned in this case.

    On Instill Core, this endpoint will return an Unimplemented status.
    """
    GetRemainingCreditAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminResponse,
    ]
    """Get the remaining Instill Credit by owner UID

    This endpoint fetches the remaining unexpired credit of a user or
    organization, referenced by UID.

    On Instill Core, this endpoint will return a 404 Not Found status.
    """
    CheckNamespaceAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse,
    ]
    """Check if a namespace is in use

    Returns the availability of a namespace or, alternatively, the type of
    resource that is using it.
    """
    CheckNamespaceByUIDAdmin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminResponse,
    ]
    """Check if a namespace is in use by UID

    Returns the availability of a namespace or, alternatively, the type of
    resource that is using it.
    """

class MgmtPrivateServiceAsyncStub:
    """Mgmt service responds to internal access"""

    ListUsersAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListUsersAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.ListUsersAdminResponse,
    ]
    """ListUsersAdmin method receives a ListUsersAdminRequest message and returns
    a ListUsersAdminResponse message.
    """
    GetUserAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserAdminResponse,
    ]
    """GetUserAdmin method receives a GetUserAdminRequest message and returns
    a GetUserAdminResponse message.
    """
    LookUpUserAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminResponse,
    ]
    """LookUpUserAdmin method receives a LookUpUserAdminRequest message and
    returns a LookUpUserAdminResponse
    """
    ListOrganizationsAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminResponse,
    ]
    """ListOrganizationsAdmin method receives a ListOrganizationsAdminRequest message and returns
    a ListOrganizationsAdminResponse message.
    """
    GetOrganizationAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminResponse,
    ]
    """GetOrganizationAdmin method receives a GetOrganizationAdminRequest message and returns
    a GetOrganizationAdminResponse message.
    """
    LookUpOrganizationAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminResponse,
    ]
    """LookUpOrganizationAdmin method receives a LookUpOrganizationAdminRequest message and
    returns a LookUpOrganizationAdminResponse
    """
    GetUserSubscriptionAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminResponse,
    ]
    """GetUserSubscriptionAdmin"""
    GetOrganizationSubscriptionAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminResponse,
    ]
    """GetOrganizationSubscriptionAdmin"""
    SubtractCreditAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminResponse,
    ]
    """Subtract Instill Credit from a user or organization account.

    This endpoint subtracts the specified amount of Instill Credit from an
    account. This is intended for processes on Instill Cloud that consume
    credit, such as the execution of pre-configured connectors.
    Note that if the remaining credit in the account is less than the
    requested amount, it will be subtracted anyways, leaving the account
    credit at zero. A ResourceExhausted error will be returned in this case.

    On Instill Core, this endpoint will return an Unimplemented status.
    """
    GetRemainingCreditAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminResponse,
    ]
    """Get the remaining Instill Credit by owner UID

    This endpoint fetches the remaining unexpired credit of a user or
    organization, referenced by UID.

    On Instill Core, this endpoint will return a 404 Not Found status.
    """
    CheckNamespaceAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse,
    ]
    """Check if a namespace is in use

    Returns the availability of a namespace or, alternatively, the type of
    resource that is using it.
    """
    CheckNamespaceByUIDAdmin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminRequest,
        core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminResponse,
    ]
    """Check if a namespace is in use by UID

    Returns the availability of a namespace or, alternatively, the type of
    resource that is using it.
    """

class MgmtPrivateServiceServicer(metaclass=abc.ABCMeta):
    """Mgmt service responds to internal access"""

    @abc.abstractmethod
    def ListUsersAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListUsersAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListUsersAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListUsersAdminResponse]]:
        """ListUsersAdmin method receives a ListUsersAdminRequest message and returns
        a ListUsersAdminResponse message.
        """
    @abc.abstractmethod
    def GetUserAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetUserAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetUserAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetUserAdminResponse]]:
        """GetUserAdmin method receives a GetUserAdminRequest message and returns
        a GetUserAdminResponse message.
        """
    @abc.abstractmethod
    def LookUpUserAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.LookUpUserAdminResponse]]:
        """LookUpUserAdmin method receives a LookUpUserAdminRequest message and
        returns a LookUpUserAdminResponse
        """
    @abc.abstractmethod
    def ListOrganizationsAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListOrganizationsAdminResponse]]:
        """ListOrganizationsAdmin method receives a ListOrganizationsAdminRequest message and returns
        a ListOrganizationsAdminResponse message.
        """
    @abc.abstractmethod
    def GetOrganizationAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetOrganizationAdminResponse]]:
        """GetOrganizationAdmin method receives a GetOrganizationAdminRequest message and returns
        a GetOrganizationAdminResponse message.
        """
    @abc.abstractmethod
    def LookUpOrganizationAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.LookUpOrganizationAdminResponse]]:
        """LookUpOrganizationAdmin method receives a LookUpOrganizationAdminRequest message and
        returns a LookUpOrganizationAdminResponse
        """
    @abc.abstractmethod
    def GetUserSubscriptionAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetUserSubscriptionAdminResponse]]:
        """GetUserSubscriptionAdmin"""
    @abc.abstractmethod
    def GetOrganizationSubscriptionAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionAdminResponse]]:
        """GetOrganizationSubscriptionAdmin"""
    @abc.abstractmethod
    def SubtractCreditAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.SubtractCreditAdminResponse]]:
        """Subtract Instill Credit from a user or organization account.

        This endpoint subtracts the specified amount of Instill Credit from an
        account. This is intended for processes on Instill Cloud that consume
        credit, such as the execution of pre-configured connectors.
        Note that if the remaining credit in the account is less than the
        requested amount, it will be subtracted anyways, leaving the account
        credit at zero. A ResourceExhausted error will be returned in this case.

        On Instill Core, this endpoint will return an Unimplemented status.
        """
    @abc.abstractmethod
    def GetRemainingCreditAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditAdminResponse]]:
        """Get the remaining Instill Credit by owner UID

        This endpoint fetches the remaining unexpired credit of a user or
        organization, referenced by UID.

        On Instill Core, this endpoint will return a 404 Not Found status.
        """
    @abc.abstractmethod
    def CheckNamespaceAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceAdminResponse]]:
        """Check if a namespace is in use

        Returns the availability of a namespace or, alternatively, the type of
        resource that is using it.
        """
    @abc.abstractmethod
    def CheckNamespaceByUIDAdmin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceByUIDAdminResponse]]:
        """Check if a namespace is in use by UID

        Returns the availability of a namespace or, alternatively, the type of
        resource that is using it.
        """

def add_MgmtPrivateServiceServicer_to_server(servicer: MgmtPrivateServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
