import typing

import android.content
import android.os
import android.service.credentials
import java
import java.lang
import java.util
import java.util.concurrent

class ClearCredentialStateException(java.lang.Exception):
    TYPE_UNKNOWN: typing.ClassVar[str] = ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...
    def getType(self) -> str: ...

class ClearCredentialStateRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ClearCredentialStateRequest]] = ...
    def __init__(self, data: android.os.Bundle, /) -> None: ...
    def describeContents(self) -> int: ...
    def getData(self) -> android.os.Bundle: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class CreateCredentialException(java.lang.Exception):
    TYPE_INTERRUPTED: typing.ClassVar[str] = ...
    TYPE_NO_CREATE_OPTIONS: typing.ClassVar[str] = ...
    TYPE_UNKNOWN: typing.ClassVar[str] = ...
    TYPE_USER_CANCELED: typing.ClassVar[str] = ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...
    def getType(self) -> str: ...

class CreateCredentialRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CreateCredentialRequest]] = ...
    def alwaysSendAppInfoToProvider(self) -> bool: ...
    def describeContents(self) -> int: ...
    def getCandidateQueryData(self) -> android.os.Bundle: ...
    def getCredentialData(self) -> android.os.Bundle: ...
    def getOrigin(self) -> str | None: ...
    def getType(self) -> str: ...
    def isSystemProviderRequired(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, type: str | java.lang.String, credentialData: android.os.Bundle, candidateQueryData: android.os.Bundle, /) -> None: ...
        def build(self) -> CreateCredentialRequest: ...
        def setAlwaysSendAppInfoToProvider(self, value: bool | java.jboolean | java.lang.Boolean, /) -> CreateCredentialRequest.Builder: ...
        def setIsSystemProviderRequired(self, value: bool | java.jboolean | java.lang.Boolean, /) -> CreateCredentialRequest.Builder: ...
        def setOrigin(self, origin: str | java.lang.String, /) -> CreateCredentialRequest.Builder: ...

class CreateCredentialResponse(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CreateCredentialResponse]] = ...
    def __init__(self, data: android.os.Bundle, /) -> None: ...
    def describeContents(self) -> int: ...
    def getData(self) -> android.os.Bundle: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class Credential(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Credential]] = ...
    TYPE_PASSWORD_CREDENTIAL: typing.ClassVar[str] = ...
    def __init__(self, type: str | java.lang.String, data: android.os.Bundle, /) -> None: ...
    def describeContents(self) -> int: ...
    def getData(self) -> android.os.Bundle: ...
    def getType(self) -> str: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class CredentialDescription(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CredentialDescription]] = ...
    def __init__(self, type: str | java.lang.String, supportedElementKeys: java.util.Set[java.lang.String], credentialEntries: java.util.List[android.service.credentials.CredentialEntry], /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCredentialEntries(self) -> java.util.List[android.service.credentials.CredentialEntry]: ...
    def getSupportedElementKeys(self) -> java.util.Set[java.lang.String]: ...
    def getType(self) -> str: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class CredentialManager(java.lang.Object):
    def clearCredentialState(self, request: ClearCredentialStateRequest, cancellationSignal: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, ClearCredentialStateException], /) -> None: ...
    def createCredential(self, context: android.content.Context, request: CreateCredentialRequest, cancellationSignal: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[CreateCredentialResponse, CreateCredentialException], /) -> None: ...
    @typing.overload
    def getCredential(self, context: android.content.Context, request: GetCredentialRequest, cancellationSignal: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[GetCredentialResponse, GetCredentialException], /) -> None: ...
    @typing.overload
    def getCredential(self, context: android.content.Context, pendingGetCredentialHandle: PrepareGetCredentialResponse.PendingGetCredentialHandle, cancellationSignal: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[GetCredentialResponse, GetCredentialException], /) -> None: ...
    def isEnabledCredentialProviderService(self, componentName: android.content.ComponentName, /) -> bool: ...
    def prepareGetCredential(self, request: GetCredentialRequest, cancellationSignal: android.os.CancellationSignal, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[PrepareGetCredentialResponse, GetCredentialException], /) -> None: ...
    def registerCredentialDescription(self, request: RegisterCredentialDescriptionRequest, /) -> None: ...
    def unregisterCredentialDescription(self, request: UnregisterCredentialDescriptionRequest, /) -> None: ...

class CredentialOption(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CredentialOption]] = ...
    SUPPORTED_ELEMENT_KEYS: typing.ClassVar[str] = ...
    def describeContents(self) -> int: ...
    def getAllowedProviders(self) -> java.util.Set[android.content.ComponentName]: ...
    def getCandidateQueryData(self) -> android.os.Bundle: ...
    def getCredentialRetrievalData(self) -> android.os.Bundle: ...
    def getType(self) -> str: ...
    def isSystemProviderRequired(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, type: str | java.lang.String, credentialRetrievalData: android.os.Bundle, candidateQueryData: android.os.Bundle, /) -> None: ...
        def addAllowedProvider(self, allowedProvider: android.content.ComponentName, /) -> CredentialOption.Builder: ...
        def build(self) -> CredentialOption: ...
        def setAllowedProviders(self, allowedProviders: java.util.Set[android.content.ComponentName], /) -> CredentialOption.Builder: ...
        def setIsSystemProviderRequired(self, isSystemProviderRequired: bool | java.jboolean | java.lang.Boolean, /) -> CredentialOption.Builder: ...

class GetCredentialException(java.lang.Exception):
    TYPE_INTERRUPTED: typing.ClassVar[str] = ...
    TYPE_NO_CREDENTIAL: typing.ClassVar[str] = ...
    TYPE_UNKNOWN: typing.ClassVar[str] = ...
    TYPE_USER_CANCELED: typing.ClassVar[str] = ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...
    @typing.overload
    def __init__(self, type: str | java.lang.String, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...
    def getType(self) -> str: ...

class GetCredentialRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetCredentialRequest]] = ...
    def alwaysSendAppInfoToProvider(self) -> bool: ...
    def describeContents(self) -> int: ...
    def getCredentialOptions(self) -> java.util.List[CredentialOption]: ...
    def getData(self) -> android.os.Bundle: ...
    def getOrigin(self) -> str | None: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, data: android.os.Bundle, /) -> None: ...
        def addCredentialOption(self, credentialOption: CredentialOption, /) -> GetCredentialRequest.Builder: ...
        def build(self) -> GetCredentialRequest: ...
        def setAlwaysSendAppInfoToProvider(self, value: bool | java.jboolean | java.lang.Boolean, /) -> GetCredentialRequest.Builder: ...
        def setCredentialOptions(self, credentialOptions: java.util.List[CredentialOption], /) -> GetCredentialRequest.Builder: ...
        def setOrigin(self, origin: str | java.lang.String, /) -> GetCredentialRequest.Builder: ...

class GetCredentialResponse(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetCredentialResponse]] = ...
    def __init__(self, credential: Credential, /) -> None: ...
    def describeContents(self) -> int: ...
    def getCredential(self) -> Credential: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PrepareGetCredentialResponse(java.lang.Object):
    def getPendingGetCredentialHandle(self) -> PrepareGetCredentialResponse.PendingGetCredentialHandle: ...
    def hasAuthenticationResults(self) -> bool: ...
    def hasCredentialResults(self, credentialType: str | java.lang.String, /) -> bool: ...
    def hasRemoteResults(self) -> bool: ...

    class PendingGetCredentialHandle(java.lang.Object): ...

class RegisterCredentialDescriptionRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[RegisterCredentialDescriptionRequest]] = ...
    @typing.overload
    def __init__(self, credentialDescription: CredentialDescription, /) -> None: ...
    @typing.overload
    def __init__(self, credentialDescriptions: java.util.Set[CredentialDescription], /) -> None: ...
    def describeContents(self) -> int: ...
    def getCredentialDescriptions(self) -> java.util.Set[CredentialDescription]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class UnregisterCredentialDescriptionRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[UnregisterCredentialDescriptionRequest]] = ...
    @typing.overload
    def __init__(self, credentialDescription: CredentialDescription, /) -> None: ...
    @typing.overload
    def __init__(self, credentialDescriptions: java.util.Set[CredentialDescription], /) -> None: ...
    def describeContents(self) -> int: ...
    def getCredentialDescriptions(self) -> java.util.Set[CredentialDescription]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...
