"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import abc
import collections.abc
import core.mgmt.v1beta.metric_pb2
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 MgmtPublicServiceStub:
    """MGMT

    MgmtPublicService exposes the public Core endpoints that allow clients to
    manage user resources.
    """

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Liveness: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.LivenessRequest,
        core.mgmt.v1beta.mgmt_pb2.LivenessResponse,
    ]
    """Check if the MGMT server is alive

    See https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
    """
    Readiness: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ReadinessRequest,
        core.mgmt.v1beta.mgmt_pb2.ReadinessResponse,
    ]
    """Check if the pipeline server is ready

    See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
    """
    GetAuthenticatedUser: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserRequest,
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserResponse,
    ]
    """Get the authenticated user

    Returns the details of the authenticated user.
    """
    PatchAuthenticatedUser: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserRequest,
        core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserResponse,
    ]
    """Update the authenticated user

    Updates the information of the authenticated user.

    In REST requests, only the supplied user fields will be taken into account
    when updating the resource.
    """
    ListUsers: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListUsersRequest,
        core.mgmt.v1beta.mgmt_pb2.ListUsersResponse,
    ]
    """List users

    Returns a paginated list of users.
    """
    GetUser: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserResponse,
    ]
    """Get a user

    Returns the details of a user by their ID.
    """
    CreateOrganization: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CreateOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.CreateOrganizationResponse,
    ]
    """Create an organization

    Creates an organization.
    """
    ListOrganizations: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsRequest,
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsResponse,
    ]
    """List organizations

    Returns a paginated list of organizations.
    """
    GetOrganization: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationResponse,
    ]
    """Get an organization

    Returns the organization details by its ID.
    """
    UpdateOrganization: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationResponse,
    ]
    """Update an organization

    Accesses and updates an organization by ID.

    In REST requests, only the supplied organization fields will be taken into
    account when updating the resource.
    """
    DeleteOrganization: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationResponse,
    ]
    """Delete an organization

    Accesses and deletes an organization by ID.
    """
    ListUserMemberships: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsRequest,
        core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsResponse,
    ]
    """List user memberships

    Returns the memberships of a user.
    """
    GetUserMembership: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserMembershipResponse,
    ]
    """Get a user membership

    Returns the details of the relationship between a user and an
    organization. The authenticated must match the membership parent.
    """
    UpdateUserMembership: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipResponse,
    ]
    """Update a user membership

    Accesses and updates a user membership by parent and membership IDs.
    """
    DeleteUserMembership: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipResponse,
    ]
    """Delete a user membership

    Accesses and deletes a user membership by parent and membership IDs.
    """
    ListOrganizationMemberships: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsRequest,
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsResponse,
    ]
    """List organization memberships

    Returns a paginated list of the user memberships in an organization.
    """
    GetOrganizationMembership: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipResponse,
    ]
    """Get a an organization membership

    Returns the details of a user membership within an organization.
    """
    UpdateOrganizationMembership: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipResponse,
    ]
    """Uppdate an organization membership

    Updates a user membership within an organization.
    """
    DeleteOrganizationMembership: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipResponse,
    ]
    """Delete an organization membership

    Deletes a user membership within an organization.
    """
    GetAuthenticatedUserSubscription: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionRequest,
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionResponse,
    ]
    """Get the subscription of the authenticated user

    Returns the subscription details of the authenticated user.
    """
    GetOrganizationSubscription: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionResponse,
    ]
    """Get the subscription of an organization

    Returns the subscription details of an organization.
    """
    CreateToken: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CreateTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.CreateTokenResponse,
    ]
    """Create an API token

    Creates an API token for the authenticated user.
    """
    ListTokens: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListTokensRequest,
        core.mgmt.v1beta.mgmt_pb2.ListTokensResponse,
    ]
    """List API tokens

    Returns a paginated list of the API tokens of the authenticated user.
    """
    GetToken: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.GetTokenResponse,
    ]
    """Get an API token

    Returns the details of an API token.
    """
    DeleteToken: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteTokenResponse,
    ]
    """Delete an API token

    Deletes an API token.
    """
    ValidateToken: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ValidateTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.ValidateTokenResponse,
    ]
    """Validate an API token

    Validates an API token.
    """
    GetRemainingCredit: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditRequest,
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditResponse,
    ]
    """Get the remaining Instill Credit

    This endpoint returns the remaining [Instill Credit](https://www.instill.tech/docs/vdp/credit) of a given user or
    organization. The requested credit owner must be either the authenticated
    user or an organization they belong to.

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

    Returns the availability of a namespace or, alternatively, the type of
    resource that is using it.
    """
    GetPipelineTriggerCount: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountRequest,
        core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountResponse,
    ]
    """Get pipeline trigger count

    Returns the pipeline trigger count of a given requester within a timespan.
    Results are grouped by trigger status.
    """
    ListPipelineTriggerTableRecords: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsRequest,
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsResponse,
    ]
    """List pipeline trigger metrics

    Returns a paginated list of pipeline executions aggregated by pipeline ID.
    NOTE: This method is deprecated and will be retired soon.
    """
    ListPipelineTriggerChartRecords: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsRequest,
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsResponse,
    ]
    """List pipeline trigger time charts

    Returns a timeline of pipline trigger counts for the pipelines of a given
    owner.
    NOTE: This method will soon return the trigger counts of a given requester.
    """
    ListCreditConsumptionChartRecords: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsRequest,
        core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsResponse,
    ]
    """List Instill Credit consumption time charts

    Returns a timeline of Instill Credit consumption for a given owner. The
    response will contain one set of records (datapoints) per consumption
    source (e.g. "pipeline", "model"). Each datapoint represents the amount
    consumed in a time bucket.
    """
    AuthTokenIssuer: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerResponse,
    ]
    """Auth endpoints are only used in the community edition and the OpenAPI
    documentation references Instill Cloud. Therefore, these endpoints are
    hidden.

    Get Auth token issuer

    Returns the auth token issuer details. This operation requires admin permissions.
    """
    AuthLogin: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthLoginRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthLoginResponse,
    ]
    """Log in a user

    Authenticates a user and returns an access token.
    """
    AuthLogout: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthLogoutRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthLogoutResponse,
    ]
    """Log out a user

    Logs out an authenticated user.
    """
    AuthChangePassword: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordResponse,
    ]
    """Change password

    Updates the password of a user.
    """
    AuthValidateAccessToken: grpc.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenResponse,
    ]
    """Validate an access token

    Checks the validity of an access token.
    """

class MgmtPublicServiceAsyncStub:
    """MGMT

    MgmtPublicService exposes the public Core endpoints that allow clients to
    manage user resources.
    """

    Liveness: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.LivenessRequest,
        core.mgmt.v1beta.mgmt_pb2.LivenessResponse,
    ]
    """Check if the MGMT server is alive

    See https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
    """
    Readiness: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ReadinessRequest,
        core.mgmt.v1beta.mgmt_pb2.ReadinessResponse,
    ]
    """Check if the pipeline server is ready

    See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
    """
    GetAuthenticatedUser: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserRequest,
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserResponse,
    ]
    """Get the authenticated user

    Returns the details of the authenticated user.
    """
    PatchAuthenticatedUser: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserRequest,
        core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserResponse,
    ]
    """Update the authenticated user

    Updates the information of the authenticated user.

    In REST requests, only the supplied user fields will be taken into account
    when updating the resource.
    """
    ListUsers: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListUsersRequest,
        core.mgmt.v1beta.mgmt_pb2.ListUsersResponse,
    ]
    """List users

    Returns a paginated list of users.
    """
    GetUser: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserResponse,
    ]
    """Get a user

    Returns the details of a user by their ID.
    """
    CreateOrganization: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CreateOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.CreateOrganizationResponse,
    ]
    """Create an organization

    Creates an organization.
    """
    ListOrganizations: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsRequest,
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationsResponse,
    ]
    """List organizations

    Returns a paginated list of organizations.
    """
    GetOrganization: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationResponse,
    ]
    """Get an organization

    Returns the organization details by its ID.
    """
    UpdateOrganization: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationResponse,
    ]
    """Update an organization

    Accesses and updates an organization by ID.

    In REST requests, only the supplied organization fields will be taken into
    account when updating the resource.
    """
    DeleteOrganization: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationResponse,
    ]
    """Delete an organization

    Accesses and deletes an organization by ID.
    """
    ListUserMemberships: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsRequest,
        core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsResponse,
    ]
    """List user memberships

    Returns the memberships of a user.
    """
    GetUserMembership: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetUserMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.GetUserMembershipResponse,
    ]
    """Get a user membership

    Returns the details of the relationship between a user and an
    organization. The authenticated must match the membership parent.
    """
    UpdateUserMembership: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipResponse,
    ]
    """Update a user membership

    Accesses and updates a user membership by parent and membership IDs.
    """
    DeleteUserMembership: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipResponse,
    ]
    """Delete a user membership

    Accesses and deletes a user membership by parent and membership IDs.
    """
    ListOrganizationMemberships: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsRequest,
        core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsResponse,
    ]
    """List organization memberships

    Returns a paginated list of the user memberships in an organization.
    """
    GetOrganizationMembership: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipResponse,
    ]
    """Get a an organization membership

    Returns the details of a user membership within an organization.
    """
    UpdateOrganizationMembership: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipResponse,
    ]
    """Uppdate an organization membership

    Updates a user membership within an organization.
    """
    DeleteOrganizationMembership: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipResponse,
    ]
    """Delete an organization membership

    Deletes a user membership within an organization.
    """
    GetAuthenticatedUserSubscription: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionRequest,
        core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionResponse,
    ]
    """Get the subscription of the authenticated user

    Returns the subscription details of the authenticated user.
    """
    GetOrganizationSubscription: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionRequest,
        core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionResponse,
    ]
    """Get the subscription of an organization

    Returns the subscription details of an organization.
    """
    CreateToken: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.CreateTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.CreateTokenResponse,
    ]
    """Create an API token

    Creates an API token for the authenticated user.
    """
    ListTokens: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ListTokensRequest,
        core.mgmt.v1beta.mgmt_pb2.ListTokensResponse,
    ]
    """List API tokens

    Returns a paginated list of the API tokens of the authenticated user.
    """
    GetToken: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.GetTokenResponse,
    ]
    """Get an API token

    Returns the details of an API token.
    """
    DeleteToken: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.DeleteTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.DeleteTokenResponse,
    ]
    """Delete an API token

    Deletes an API token.
    """
    ValidateToken: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.ValidateTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.ValidateTokenResponse,
    ]
    """Validate an API token

    Validates an API token.
    """
    GetRemainingCredit: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditRequest,
        core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditResponse,
    ]
    """Get the remaining Instill Credit

    This endpoint returns the remaining [Instill Credit](https://www.instill.tech/docs/vdp/credit) of a given user or
    organization. The requested credit owner must be either the authenticated
    user or an organization they belong to.

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

    Returns the availability of a namespace or, alternatively, the type of
    resource that is using it.
    """
    GetPipelineTriggerCount: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountRequest,
        core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountResponse,
    ]
    """Get pipeline trigger count

    Returns the pipeline trigger count of a given requester within a timespan.
    Results are grouped by trigger status.
    """
    ListPipelineTriggerTableRecords: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsRequest,
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsResponse,
    ]
    """List pipeline trigger metrics

    Returns a paginated list of pipeline executions aggregated by pipeline ID.
    NOTE: This method is deprecated and will be retired soon.
    """
    ListPipelineTriggerChartRecords: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsRequest,
        core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsResponse,
    ]
    """List pipeline trigger time charts

    Returns a timeline of pipline trigger counts for the pipelines of a given
    owner.
    NOTE: This method will soon return the trigger counts of a given requester.
    """
    ListCreditConsumptionChartRecords: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsRequest,
        core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsResponse,
    ]
    """List Instill Credit consumption time charts

    Returns a timeline of Instill Credit consumption for a given owner. The
    response will contain one set of records (datapoints) per consumption
    source (e.g. "pipeline", "model"). Each datapoint represents the amount
    consumed in a time bucket.
    """
    AuthTokenIssuer: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerResponse,
    ]
    """Auth endpoints are only used in the community edition and the OpenAPI
    documentation references Instill Cloud. Therefore, these endpoints are
    hidden.

    Get Auth token issuer

    Returns the auth token issuer details. This operation requires admin permissions.
    """
    AuthLogin: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthLoginRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthLoginResponse,
    ]
    """Log in a user

    Authenticates a user and returns an access token.
    """
    AuthLogout: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthLogoutRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthLogoutResponse,
    ]
    """Log out a user

    Logs out an authenticated user.
    """
    AuthChangePassword: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordResponse,
    ]
    """Change password

    Updates the password of a user.
    """
    AuthValidateAccessToken: grpc.aio.UnaryUnaryMultiCallable[
        core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenRequest,
        core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenResponse,
    ]
    """Validate an access token

    Checks the validity of an access token.
    """

class MgmtPublicServiceServicer(metaclass=abc.ABCMeta):
    """MGMT

    MgmtPublicService exposes the public Core endpoints that allow clients to
    manage user resources.
    """

    @abc.abstractmethod
    def Liveness(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.LivenessRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.LivenessResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.LivenessResponse]]:
        """Check if the MGMT server is alive

        See https://github.com/grpc/grpc/blob/master/doc/health-checking.md.
        """
    @abc.abstractmethod
    def Readiness(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ReadinessRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ReadinessResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ReadinessResponse]]:
        """Check if the pipeline server is ready

        See https://github.com/grpc/grpc/blob/master/doc/health-checking.md
        """
    @abc.abstractmethod
    def GetAuthenticatedUser(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserResponse]]:
        """Get the authenticated user

        Returns the details of the authenticated user.
        """
    @abc.abstractmethod
    def PatchAuthenticatedUser(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.PatchAuthenticatedUserResponse]]:
        """Update the authenticated user

        Updates the information of the authenticated user.

        In REST requests, only the supplied user fields will be taken into account
        when updating the resource.
        """
    @abc.abstractmethod
    def ListUsers(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListUsersRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListUsersResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListUsersResponse]]:
        """List users

        Returns a paginated list of users.
        """
    @abc.abstractmethod
    def GetUser(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetUserRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetUserResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetUserResponse]]:
        """Get a user

        Returns the details of a user by their ID.
        """
    @abc.abstractmethod
    def CreateOrganization(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.CreateOrganizationRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.CreateOrganizationResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.CreateOrganizationResponse]]:
        """Create an organization

        Creates an organization.
        """
    @abc.abstractmethod
    def ListOrganizations(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListOrganizationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListOrganizationsResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListOrganizationsResponse]]:
        """List organizations

        Returns a paginated list of organizations.
        """
    @abc.abstractmethod
    def GetOrganization(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetOrganizationRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetOrganizationResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetOrganizationResponse]]:
        """Get an organization

        Returns the organization details by its ID.
        """
    @abc.abstractmethod
    def UpdateOrganization(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationResponse]]:
        """Update an organization

        Accesses and updates an organization by ID.

        In REST requests, only the supplied organization fields will be taken into
        account when updating the resource.
        """
    @abc.abstractmethod
    def DeleteOrganization(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationResponse]]:
        """Delete an organization

        Accesses and deletes an organization by ID.
        """
    @abc.abstractmethod
    def ListUserMemberships(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListUserMembershipsResponse]]:
        """List user memberships

        Returns the memberships of a user.
        """
    @abc.abstractmethod
    def GetUserMembership(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetUserMembershipRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetUserMembershipResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetUserMembershipResponse]]:
        """Get a user membership

        Returns the details of the relationship between a user and an
        organization. The authenticated must match the membership parent.
        """
    @abc.abstractmethod
    def UpdateUserMembership(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.UpdateUserMembershipResponse]]:
        """Update a user membership

        Accesses and updates a user membership by parent and membership IDs.
        """
    @abc.abstractmethod
    def DeleteUserMembership(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.DeleteUserMembershipResponse]]:
        """Delete a user membership

        Accesses and deletes a user membership by parent and membership IDs.
        """
    @abc.abstractmethod
    def ListOrganizationMemberships(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListOrganizationMembershipsResponse]]:
        """List organization memberships

        Returns a paginated list of the user memberships in an organization.
        """
    @abc.abstractmethod
    def GetOrganizationMembership(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetOrganizationMembershipResponse]]:
        """Get a an organization membership

        Returns the details of a user membership within an organization.
        """
    @abc.abstractmethod
    def UpdateOrganizationMembership(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.UpdateOrganizationMembershipResponse]]:
        """Uppdate an organization membership

        Updates a user membership within an organization.
        """
    @abc.abstractmethod
    def DeleteOrganizationMembership(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.DeleteOrganizationMembershipResponse]]:
        """Delete an organization membership

        Deletes a user membership within an organization.
        """
    @abc.abstractmethod
    def GetAuthenticatedUserSubscription(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetAuthenticatedUserSubscriptionResponse]]:
        """Get the subscription of the authenticated user

        Returns the subscription details of the authenticated user.
        """
    @abc.abstractmethod
    def GetOrganizationSubscription(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetOrganizationSubscriptionResponse]]:
        """Get the subscription of an organization

        Returns the subscription details of an organization.
        """
    @abc.abstractmethod
    def CreateToken(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.CreateTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.CreateTokenResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.CreateTokenResponse]]:
        """Create an API token

        Creates an API token for the authenticated user.
        """
    @abc.abstractmethod
    def ListTokens(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ListTokensRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ListTokensResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ListTokensResponse]]:
        """List API tokens

        Returns a paginated list of the API tokens of the authenticated user.
        """
    @abc.abstractmethod
    def GetToken(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetTokenResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetTokenResponse]]:
        """Get an API token

        Returns the details of an API token.
        """
    @abc.abstractmethod
    def DeleteToken(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.DeleteTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.DeleteTokenResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.DeleteTokenResponse]]:
        """Delete an API token

        Deletes an API token.
        """
    @abc.abstractmethod
    def ValidateToken(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.ValidateTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.ValidateTokenResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.ValidateTokenResponse]]:
        """Validate an API token

        Validates an API token.
        """
    @abc.abstractmethod
    def GetRemainingCredit(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.GetRemainingCreditResponse]]:
        """Get the remaining Instill Credit

        This endpoint returns the remaining [Instill Credit](https://www.instill.tech/docs/vdp/credit) of a given user or
        organization. The requested credit owner must be either the authenticated
        user or an organization they belong to.

        On Instill Core, this endpoint will return a 404 Not Found status.
        """
    @abc.abstractmethod
    def CheckNamespace(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.CheckNamespaceRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.CheckNamespaceResponse]]:
        """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 GetPipelineTriggerCount(
        self,
        request: core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountResponse, collections.abc.Awaitable[core.mgmt.v1beta.metric_pb2.GetPipelineTriggerCountResponse]]:
        """Get pipeline trigger count

        Returns the pipeline trigger count of a given requester within a timespan.
        Results are grouped by trigger status.
        """
    @abc.abstractmethod
    def ListPipelineTriggerTableRecords(
        self,
        request: core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsResponse, collections.abc.Awaitable[core.mgmt.v1beta.metric_pb2.ListPipelineTriggerTableRecordsResponse]]:
        """List pipeline trigger metrics

        Returns a paginated list of pipeline executions aggregated by pipeline ID.
        NOTE: This method is deprecated and will be retired soon.
        """
    @abc.abstractmethod
    def ListPipelineTriggerChartRecords(
        self,
        request: core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsResponse, collections.abc.Awaitable[core.mgmt.v1beta.metric_pb2.ListPipelineTriggerChartRecordsResponse]]:
        """List pipeline trigger time charts

        Returns a timeline of pipline trigger counts for the pipelines of a given
        owner.
        NOTE: This method will soon return the trigger counts of a given requester.
        """
    @abc.abstractmethod
    def ListCreditConsumptionChartRecords(
        self,
        request: core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsResponse, collections.abc.Awaitable[core.mgmt.v1beta.metric_pb2.ListCreditConsumptionChartRecordsResponse]]:
        """List Instill Credit consumption time charts

        Returns a timeline of Instill Credit consumption for a given owner. The
        response will contain one set of records (datapoints) per consumption
        source (e.g. "pipeline", "model"). Each datapoint represents the amount
        consumed in a time bucket.
        """
    @abc.abstractmethod
    def AuthTokenIssuer(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.AuthTokenIssuerResponse]]:
        """Auth endpoints are only used in the community edition and the OpenAPI
        documentation references Instill Cloud. Therefore, these endpoints are
        hidden.

        Get Auth token issuer

        Returns the auth token issuer details. This operation requires admin permissions.
        """
    @abc.abstractmethod
    def AuthLogin(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.AuthLoginRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.AuthLoginResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.AuthLoginResponse]]:
        """Log in a user

        Authenticates a user and returns an access token.
        """
    @abc.abstractmethod
    def AuthLogout(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.AuthLogoutRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.AuthLogoutResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.AuthLogoutResponse]]:
        """Log out a user

        Logs out an authenticated user.
        """
    @abc.abstractmethod
    def AuthChangePassword(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.AuthChangePasswordResponse]]:
        """Change password

        Updates the password of a user.
        """
    @abc.abstractmethod
    def AuthValidateAccessToken(
        self,
        request: core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenResponse, collections.abc.Awaitable[core.mgmt.v1beta.mgmt_pb2.AuthValidateAccessTokenResponse]]:
        """Validate an access token

        Checks the validity of an access token.
        """

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