import typing

import android.content
import android.graphics
import android.os
import android.view
import android.view.autofill
import java
import java.chaquopy
import java.lang
import java.util
import java.util.concurrent

class ContentCaptureCondition(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ContentCaptureCondition]] = ...
    FLAG_IS_REGEX: typing.ClassVar[int] = ...
    def __init__(self, locusId: android.content.LocusId, flags: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getFlags(self) -> int: ...
    def getLocusId(self) -> android.content.LocusId: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class ContentCaptureContext(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ContentCaptureContext]] = ...
    def describeContents(self) -> int: ...
    @staticmethod
    def forLocusId(id: str | java.lang.String, /) -> ContentCaptureContext: ...
    def getExtras(self) -> android.os.Bundle | None: ...
    def getLocusId(self) -> android.content.LocusId | None: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, id: android.content.LocusId, /) -> None: ...
        def build(self) -> ContentCaptureContext: ...
        def setExtras(self, extras: android.os.Bundle, /) -> ContentCaptureContext.Builder: ...

class ContentCaptureManager(java.lang.Object):
    DATA_SHARE_ERROR_CONCURRENT_REQUEST: typing.ClassVar[int] = ...
    DATA_SHARE_ERROR_TIMEOUT_INTERRUPTED: typing.ClassVar[int] = ...
    DATA_SHARE_ERROR_UNKNOWN: typing.ClassVar[int] = ...
    def getContentCaptureConditions(self) -> java.util.Set[ContentCaptureCondition] | None: ...
    def getServiceComponentName(self) -> android.content.ComponentName | None: ...
    def isContentCaptureEnabled(self) -> bool: ...
    def removeData(self, request: DataRemovalRequest, /) -> None: ...
    def setContentCaptureEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def shareData(self, request: DataShareRequest, executor: java.util.concurrent.Executor, dataShareWriteAdapter: DataShareWriteAdapter, /) -> None: ...

class ContentCaptureSession(java.lang.AutoCloseable):
    def close(self) -> None: ...
    def createContentCaptureSession(self, context: ContentCaptureContext, /) -> ContentCaptureSession: ...
    def destroy(self) -> None: ...
    def flush(self) -> None: ...
    def getContentCaptureContext(self) -> ContentCaptureContext | None: ...
    def getContentCaptureSessionId(self) -> ContentCaptureSessionId: ...
    def newAutofillId(self, hostId: android.view.autofill.AutofillId, virtualChildId: int | java.jlong | java.lang.Long, /) -> android.view.autofill.AutofillId: ...
    def newViewStructure(self, view: android.view.View, /) -> android.view.ViewStructure: ...
    def newVirtualViewStructure(self, parentId: android.view.autofill.AutofillId, virtualId: int | java.jlong | java.lang.Long, /) -> android.view.ViewStructure: ...
    def notifySessionPaused(self) -> None: ...
    def notifySessionResumed(self) -> None: ...
    def notifyViewAppeared(self, node: android.view.ViewStructure, /) -> None: ...
    def notifyViewDisappeared(self, id: android.view.autofill.AutofillId, /) -> None: ...
    def notifyViewInsetsChanged(self, viewInsets: android.graphics.Insets, /) -> None: ...
    def notifyViewTextChanged(self, id: android.view.autofill.AutofillId, text: java.lang.CharSequence, /) -> None: ...
    def notifyViewsAppeared(self, appearedNodes: java.util.List[android.view.ViewStructure], /) -> None: ...
    def notifyViewsDisappeared(self, hostId: android.view.autofill.AutofillId, virtualIds: java.chaquopy.JavaArrayJLong, /) -> None: ...
    def setContentCaptureContext(self, context: ContentCaptureContext, /) -> None: ...
    def toString(self) -> str: ...

class ContentCaptureSessionId(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ContentCaptureSessionId]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class DataRemovalRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DataRemovalRequest]] = ...
    FLAG_IS_PREFIX: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getLocusIdRequests(self) -> java.util.List[DataRemovalRequest.LocusIdRequest]: ...
    def getPackageName(self) -> str: ...
    def isForEverything(self) -> bool: ...
    def writeToParcel(self, parcel: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class LocusIdRequest(java.lang.Object):
        def getFlags(self) -> int: ...
        def getLocusId(self) -> android.content.LocusId: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def addLocusId(self, locusId: android.content.LocusId, flags: int | java.jint | java.lang.Integer, /) -> DataRemovalRequest.Builder: ...
        def build(self) -> DataRemovalRequest: ...
        def forEverything(self) -> DataRemovalRequest.Builder: ...

class DataShareRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DataShareRequest]] = ...
    def __init__(self, locusId: android.content.LocusId, mimeType: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getLocusId(self) -> android.content.LocusId | None: ...
    def getMimeType(self) -> str: ...
    def getPackageName(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class DataShareWriteAdapter(java.lang.Object):
    def onError(self, errorCode: int | java.jint | java.lang.Integer, /) -> None: ...
    def onRejected(self) -> None: ...
    def onWrite(self, arg1: android.os.ParcelFileDescriptor, /) -> None: ...
