import typing

import android.content
import java
import java.chaquopy
import java.lang
import java.security
import java.security.cert
import java.time
import java.util

class AccessControlProfile(java.lang.Object):

    class Builder(java.lang.Object):
        def __init__(self, accessControlProfileId: AccessControlProfileId, /) -> None: ...
        def build(self) -> AccessControlProfile: ...
        def setReaderCertificate(self, readerCertificate: java.security.cert.X509Certificate, /) -> AccessControlProfile.Builder: ...
        def setUserAuthenticationRequired(self, userAuthenticationRequired: bool | java.jboolean | java.lang.Boolean, /) -> AccessControlProfile.Builder: ...
        def setUserAuthenticationTimeout(self, userAuthenticationTimeoutMillis: int | java.jlong | java.lang.Long, /) -> AccessControlProfile.Builder: ...

class AccessControlProfileId(java.lang.Object):
    def __init__(self, id: int | java.jint | java.lang.Integer, /) -> None: ...
    def getId(self) -> int: ...

class AlreadyPersonalizedException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class AuthenticationKeyMetadata(java.lang.Object):
    def getExpirationDate(self) -> java.time.Instant: ...
    def getUsageCount(self) -> int: ...

class CipherSuiteNotSupportedException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class CredentialDataRequest(java.lang.Object):
    def getDeviceSignedEntriesToRequest(self) -> java.util.Map[java.lang.String, java.util.Collection[java.lang.String]]: ...
    def getIssuerSignedEntriesToRequest(self) -> java.util.Map[java.lang.String, java.util.Collection[java.lang.String]]: ...
    def getReaderSignature(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getRequestMessage(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def isAllowUsingExhaustedKeys(self) -> bool: ...
    def isAllowUsingExpiredKeys(self) -> bool: ...
    def isIncrementUseCount(self) -> bool: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> CredentialDataRequest: ...
        def setAllowUsingExhaustedKeys(self, allowUsingExhaustedKeys: bool | java.jboolean | java.lang.Boolean, /) -> CredentialDataRequest.Builder: ...
        def setAllowUsingExpiredKeys(self, allowUsingExpiredKeys: bool | java.jboolean | java.lang.Boolean, /) -> CredentialDataRequest.Builder: ...
        def setDeviceSignedEntriesToRequest(self, entriesToRequest: java.util.Map[java.lang.String, java.util.Collection[java.lang.String]], /) -> CredentialDataRequest.Builder: ...
        def setIncrementUseCount(self, incrementUseCount: bool | java.jboolean | java.lang.Boolean, /) -> CredentialDataRequest.Builder: ...
        def setIssuerSignedEntriesToRequest(self, entriesToRequest: java.util.Map[java.lang.String, java.util.Collection[java.lang.String]], /) -> CredentialDataRequest.Builder: ...
        def setReaderSignature(self, readerSignature: java.chaquopy.JavaArrayJByte, /) -> CredentialDataRequest.Builder: ...
        def setRequestMessage(self, requestMessage: java.chaquopy.JavaArrayJByte, /) -> CredentialDataRequest.Builder: ...

class CredentialDataResult(java.lang.Object):
    def getDeviceMac(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getDeviceNameSpaces(self) -> java.chaquopy.JavaArrayJByte: ...
    def getDeviceSignature(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getDeviceSignedEntries(self) -> CredentialDataResult.Entries: ...
    def getIssuerSignedEntries(self) -> CredentialDataResult.Entries: ...
    def getStaticAuthenticationData(self) -> java.chaquopy.JavaArrayJByte: ...

    class Entries(java.lang.Object):
        STATUS_NOT_IN_REQUEST_MESSAGE: typing.ClassVar[int] = ...
        STATUS_NOT_REQUESTED: typing.ClassVar[int] = ...
        STATUS_NO_ACCESS_CONTROL_PROFILES: typing.ClassVar[int] = ...
        STATUS_NO_SUCH_ENTRY: typing.ClassVar[int] = ...
        STATUS_OK: typing.ClassVar[int] = ...
        STATUS_READER_AUTHENTICATION_FAILED: typing.ClassVar[int] = ...
        STATUS_USER_AUTHENTICATION_FAILED: typing.ClassVar[int] = ...
        def getEntry(self, arg1: str | java.lang.String, arg2: str | java.lang.String, /) -> java.chaquopy.JavaArrayJByte: ...
        def getEntryNames(self, arg1: str | java.lang.String, /) -> java.util.Collection[java.lang.String]: ...
        def getNamespaces(self) -> java.util.Collection[java.lang.String]: ...
        def getRetrievedEntryNames(self, arg1: str | java.lang.String, /) -> java.util.Collection[java.lang.String]: ...
        def getStatus(self, arg1: str | java.lang.String, arg2: str | java.lang.String, /) -> int: ...

class DocTypeNotSupportedException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class EphemeralPublicKeyNotFoundException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class IdentityCredential(java.lang.Object):
    def createEphemeralKeyPair(self) -> java.security.KeyPair: ...
    def decryptMessageFromReader(self, arg1: java.chaquopy.JavaArrayJByte, /) -> java.chaquopy.JavaArrayJByte: ...
    def delete(self, challenge: java.chaquopy.JavaArrayJByte, /) -> java.chaquopy.JavaArrayJByte: ...
    def encryptMessageToReader(self, arg1: java.chaquopy.JavaArrayJByte, /) -> java.chaquopy.JavaArrayJByte: ...
    def getAuthKeysNeedingCertification(self) -> java.util.Collection[java.security.cert.X509Certificate]: ...
    def getAuthenticationDataUsageCount(self) -> java.chaquopy.JavaArrayJInt: ...
    def getAuthenticationKeyMetadata(self) -> java.util.List[AuthenticationKeyMetadata]: ...
    def getCredentialKeyCertificateChain(self) -> java.util.Collection[java.security.cert.X509Certificate]: ...
    def getEntries(self, arg1: java.chaquopy.JavaArrayJByte, arg2: java.util.Map[java.lang.String, java.util.Collection[java.lang.String]], arg3: java.chaquopy.JavaArrayJByte, arg4: java.chaquopy.JavaArrayJByte, /) -> ResultData: ...
    def proveOwnership(self, challenge: java.chaquopy.JavaArrayJByte, /) -> java.chaquopy.JavaArrayJByte: ...
    def setAllowUsingExhaustedKeys(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setAllowUsingExpiredKeys(self, allowUsingExpiredKeys: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    @typing.overload
    def setAvailableAuthenticationKeys(self, arg1: int | java.jint | java.lang.Integer, arg2: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def setAvailableAuthenticationKeys(self, keyCount: int | java.jint | java.lang.Integer, maxUsesPerKey: int | java.jint | java.lang.Integer, minValidTimeMillis: int | java.jlong | java.lang.Long, /) -> None: ...
    def setReaderEphemeralPublicKey(self, arg1: java.security.PublicKey, /) -> None: ...
    @typing.overload
    def storeStaticAuthenticationData(self, arg1: java.security.cert.X509Certificate, arg2: java.chaquopy.JavaArrayJByte, /) -> None: ...
    @typing.overload
    def storeStaticAuthenticationData(self, authenticationKey: java.security.cert.X509Certificate, expirationDate: java.time.Instant, staticAuthData: java.chaquopy.JavaArrayJByte, /) -> None: ...
    def update(self, personalizationData: PersonalizationData, /) -> java.chaquopy.JavaArrayJByte: ...

class IdentityCredentialException(java.lang.Exception):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class IdentityCredentialStore(java.lang.Object):
    CIPHERSUITE_ECDHE_HKDF_ECDSA_WITH_AES_256_GCM_SHA256: typing.ClassVar[int] = ...
    def createCredential(self, arg1: str | java.lang.String, arg2: str | java.lang.String, /) -> WritableIdentityCredential: ...
    def createPresentationSession(self, cipherSuite: int | java.jint | java.lang.Integer, /) -> PresentationSession: ...
    def deleteCredentialByName(self, arg1: str | java.lang.String, /) -> java.chaquopy.JavaArrayJByte | None: ...
    def getCredentialByName(self, arg1: str | java.lang.String, arg2: int | java.jint | java.lang.Integer, /) -> IdentityCredential | None: ...
    @staticmethod
    def getDirectAccessInstance(context: android.content.Context, /) -> IdentityCredentialStore | None: ...
    @staticmethod
    def getInstance(context: android.content.Context, /) -> IdentityCredentialStore | None: ...
    def getSupportedDocTypes(self) -> java.chaquopy.JavaArray[java.lang.String]: ...

class InvalidReaderSignatureException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class InvalidRequestMessageException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class MessageDecryptionException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class NoAuthenticationKeyAvailableException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class PersonalizationData(java.lang.Object):

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def addAccessControlProfile(self, profile: AccessControlProfile, /) -> PersonalizationData.Builder: ...
        def build(self) -> PersonalizationData: ...
        def putEntry(self, namespace: str | java.lang.String, name: str | java.lang.String, accessControlProfileIds: java.util.Collection[AccessControlProfileId], value: java.chaquopy.JavaArrayJByte, /) -> PersonalizationData.Builder: ...

class PresentationSession(java.lang.Object):
    def getCredentialData(self, arg1: str | java.lang.String, arg2: CredentialDataRequest, /) -> CredentialDataResult | None: ...
    def getEphemeralKeyPair(self) -> java.security.KeyPair: ...
    def setReaderEphemeralPublicKey(self, arg1: java.security.PublicKey, /) -> None: ...
    def setSessionTranscript(self, arg1: java.chaquopy.JavaArrayJByte, /) -> None: ...

class ResultData(java.lang.Object):
    STATUS_NOT_IN_REQUEST_MESSAGE: typing.ClassVar[int] = ...
    STATUS_NOT_REQUESTED: typing.ClassVar[int] = ...
    STATUS_NO_ACCESS_CONTROL_PROFILES: typing.ClassVar[int] = ...
    STATUS_NO_SUCH_ENTRY: typing.ClassVar[int] = ...
    STATUS_OK: typing.ClassVar[int] = ...
    STATUS_READER_AUTHENTICATION_FAILED: typing.ClassVar[int] = ...
    STATUS_USER_AUTHENTICATION_FAILED: typing.ClassVar[int] = ...
    def getAuthenticatedData(self) -> java.chaquopy.JavaArrayJByte: ...
    def getEntry(self, arg1: str | java.lang.String, arg2: str | java.lang.String, /) -> java.chaquopy.JavaArrayJByte | None: ...
    def getEntryNames(self, arg1: str | java.lang.String, /) -> java.util.Collection[java.lang.String] | None: ...
    def getMessageAuthenticationCode(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getNamespaces(self) -> java.util.Collection[java.lang.String]: ...
    def getRetrievedEntryNames(self, arg1: str | java.lang.String, /) -> java.util.Collection[java.lang.String] | None: ...
    def getStaticAuthenticationData(self) -> java.chaquopy.JavaArrayJByte: ...
    def getStatus(self, arg1: str | java.lang.String, arg2: str | java.lang.String, /) -> int: ...

class SessionTranscriptMismatchException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class UnknownAuthenticationKeyException(IdentityCredentialException):
    @typing.overload
    def __init__(self, message: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class WritableIdentityCredential(java.lang.Object):
    def getCredentialKeyCertificateChain(self, arg1: java.chaquopy.JavaArrayJByte, /) -> java.util.Collection[java.security.cert.X509Certificate]: ...
    def personalize(self, arg1: PersonalizationData, /) -> java.chaquopy.JavaArrayJByte: ...
