"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import abc
import collections.abc
import grpc
import prodvana.proto.prodvana.auth.auth_manager_pb2

class AuthManagerStub:
    def __init__(self, channel: grpc.Channel) -> None: ...
    GetAuthToken: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.GetTokenRequest,
        prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthTokenResp,
    ]
    """web auth flow
    TODO(naphat) we should make this only available to our UI app
    """
    GetAuthUrl: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthUrlRequest,
        prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthUrlResponse,
    ]
    RefreshToken: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.RefreshTokenReq,
        prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthTokenResp,
    ]
    CliAuth: grpc.UnaryStreamMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.CliAuthReq,
        prodvana.proto.prodvana.auth.auth_manager_pb2.CliAuthResp,
    ]
    """cli auth flow
    This returns a streaming response with exactly two items:
    1. Immediately, a UserPrmopt will be returned which should then be conveyed to the user
    2. Once user authenticates via a browser, a Token will be returned
    """

class AuthManagerServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def GetAuthToken(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.GetTokenRequest,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthTokenResp:
        """web auth flow
        TODO(naphat) we should make this only available to our UI app
        """
    @abc.abstractmethod
    def GetAuthUrl(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthUrlRequest,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthUrlResponse: ...
    @abc.abstractmethod
    def RefreshToken(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.RefreshTokenReq,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.GetAuthTokenResp: ...
    @abc.abstractmethod
    def CliAuth(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.CliAuthReq,
        context: grpc.ServicerContext,
    ) -> collections.abc.Iterator[prodvana.proto.prodvana.auth.auth_manager_pb2.CliAuthResp]:
        """cli auth flow
        This returns a streaming response with exactly two items:
        1. Immediately, a UserPrmopt will be returned which should then be conveyed to the user
        2. Once user authenticates via a browser, a Token will be returned
        """

def add_AuthManagerServicer_to_server(servicer: AuthManagerServicer, server: grpc.Server) -> None: ...

class AuthSessionManagerStub:
    """unlike AuthManager, AuthSessionManager is about the current authenticated session, i.e. it requires
    user to be authed already
    """

    def __init__(self, channel: grpc.Channel) -> None: ...
    Check: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.Empty,
        prodvana.proto.prodvana.auth.auth_manager_pb2.Empty,
    ]
    """check if user is authenticated and token is still valid"""
    Logout: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.LogoutReq,
        prodvana.proto.prodvana.auth.auth_manager_pb2.LogoutResp,
    ]

class AuthSessionManagerServicer(metaclass=abc.ABCMeta):
    """unlike AuthManager, AuthSessionManager is about the current authenticated session, i.e. it requires
    user to be authed already
    """

    @abc.abstractmethod
    def Check(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.Empty,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.Empty:
        """check if user is authenticated and token is still valid"""
    @abc.abstractmethod
    def Logout(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.LogoutReq,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.LogoutResp: ...

def add_AuthSessionManagerServicer_to_server(servicer: AuthSessionManagerServicer, server: grpc.Server) -> None: ...

class ApiTokenManagerStub:
    def __init__(self, channel: grpc.Channel) -> None: ...
    CreateOrgApiToken: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.Empty,
        prodvana.proto.prodvana.auth.auth_manager_pb2.CreateOrgApiTokenResp,
    ]
    """Create an api token tied to the organization. This api token is not tied to the user in anyway,
    e.g. if the user is deleted, the token will continue to have access to the organization.
    This token currently does not expire, so be very careful with storing them.
    """
    CreateOrgApiToken2: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.CreateOrgApiTokenReq,
        prodvana.proto.prodvana.auth.auth_manager_pb2.CreateOrgApiTokenResp,
    ]
    DeleteOrgApiToken: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.DeleteOrgApiTokenReq,
        prodvana.proto.prodvana.auth.auth_manager_pb2.DeleteOrgApiTokenResp,
    ]
    ListOrgApiTokens: grpc.UnaryUnaryMultiCallable[
        prodvana.proto.prodvana.auth.auth_manager_pb2.ListOrgApiTokensReq,
        prodvana.proto.prodvana.auth.auth_manager_pb2.ListOrgApiTokensResp,
    ]

class ApiTokenManagerServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def CreateOrgApiToken(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.Empty,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.CreateOrgApiTokenResp:
        """Create an api token tied to the organization. This api token is not tied to the user in anyway,
        e.g. if the user is deleted, the token will continue to have access to the organization.
        This token currently does not expire, so be very careful with storing them.
        """
    @abc.abstractmethod
    def CreateOrgApiToken2(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.CreateOrgApiTokenReq,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.CreateOrgApiTokenResp: ...
    @abc.abstractmethod
    def DeleteOrgApiToken(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.DeleteOrgApiTokenReq,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.DeleteOrgApiTokenResp: ...
    @abc.abstractmethod
    def ListOrgApiTokens(
        self,
        request: prodvana.proto.prodvana.auth.auth_manager_pb2.ListOrgApiTokensReq,
        context: grpc.ServicerContext,
    ) -> prodvana.proto.prodvana.auth.auth_manager_pb2.ListOrgApiTokensResp: ...

def add_ApiTokenManagerServicer_to_server(servicer: ApiTokenManagerServicer, server: grpc.Server) -> None: ...
