import typing

import android.app
import android.content
import android.net
import android.os
import java
import java.chaquopy
import java.lang
import java.util

class JobInfo(android.os.Parcelable):
    BACKOFF_POLICY_EXPONENTIAL: typing.ClassVar[int] = ...
    BACKOFF_POLICY_LINEAR: typing.ClassVar[int] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[JobInfo]] = ...
    DEFAULT_INITIAL_BACKOFF_MILLIS: typing.ClassVar[int] = ...
    MAX_BACKOFF_DELAY_MILLIS: typing.ClassVar[int] = ...
    NETWORK_BYTES_UNKNOWN: typing.ClassVar[int] = ...
    NETWORK_TYPE_ANY: typing.ClassVar[int] = ...
    NETWORK_TYPE_CELLULAR: typing.ClassVar[int] = ...
    NETWORK_TYPE_METERED: typing.ClassVar[int] = ...
    NETWORK_TYPE_NONE: typing.ClassVar[int] = ...
    NETWORK_TYPE_NOT_ROAMING: typing.ClassVar[int] = ...
    NETWORK_TYPE_UNMETERED: typing.ClassVar[int] = ...
    PRIORITY_DEFAULT: typing.ClassVar[int] = ...
    PRIORITY_HIGH: typing.ClassVar[int] = ...
    PRIORITY_LOW: typing.ClassVar[int] = ...
    PRIORITY_MAX: typing.ClassVar[int] = ...
    PRIORITY_MIN: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getBackoffPolicy(self) -> int: ...
    def getClipData(self) -> android.content.ClipData | None: ...
    def getClipGrantFlags(self) -> int: ...
    def getDebugTags(self) -> java.util.Set[java.lang.String]: ...
    def getEstimatedNetworkDownloadBytes(self) -> int: ...
    def getEstimatedNetworkUploadBytes(self) -> int: ...
    def getExtras(self) -> android.os.PersistableBundle: ...
    def getFlexMillis(self) -> int: ...
    def getId(self) -> int: ...
    def getInitialBackoffMillis(self) -> int: ...
    def getIntervalMillis(self) -> int: ...
    def getMaxExecutionDelayMillis(self) -> int: ...
    @staticmethod
    def getMinFlexMillis() -> int: ...
    def getMinLatencyMillis(self) -> int: ...
    @staticmethod
    def getMinPeriodMillis() -> int: ...
    def getMinimumNetworkChunkBytes(self) -> int: ...
    def getNetworkType(self) -> int: ...
    def getPriority(self) -> int: ...
    def getRequiredNetwork(self) -> android.net.NetworkRequest | None: ...
    def getService(self) -> android.content.ComponentName: ...
    def getTraceTag(self) -> str | None: ...
    def getTransientExtras(self) -> android.os.Bundle: ...
    def getTriggerContentMaxDelay(self) -> int: ...
    def getTriggerContentUpdateDelay(self) -> int: ...
    def getTriggerContentUris(self) -> java.chaquopy.JavaArray[JobInfo.TriggerContentUri] | None: ...
    def hashCode(self) -> int: ...
    def isExpedited(self) -> bool: ...
    def isImportantWhileForeground(self) -> bool: ...
    def isPeriodic(self) -> bool: ...
    def isPersisted(self) -> bool: ...
    def isPrefetch(self) -> bool: ...
    def isRequireBatteryNotLow(self) -> bool: ...
    def isRequireCharging(self) -> bool: ...
    def isRequireDeviceIdle(self) -> bool: ...
    def isRequireStorageNotLow(self) -> bool: ...
    def isUserInitiated(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class TriggerContentUri(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[JobInfo.TriggerContentUri]] = ...
        FLAG_NOTIFY_FOR_DESCENDANTS: typing.ClassVar[int] = ...
        def __init__(self, uri: android.net.Uri, flags: int | java.jint | java.lang.Integer, /) -> None: ...
        def describeContents(self) -> int: ...
        def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getFlags(self) -> int: ...
        def getUri(self) -> android.net.Uri: ...
        def hashCode(self) -> int: ...
        def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, jobId: int | java.jint | java.lang.Integer, jobService: android.content.ComponentName, /) -> None: ...
        def addDebugTag(self, tag: str | java.lang.String, /) -> JobInfo.Builder: ...
        def addTriggerContentUri(self, uri: JobInfo.TriggerContentUri, /) -> JobInfo.Builder: ...
        def build(self) -> JobInfo: ...
        def removeDebugTag(self, tag: str | java.lang.String, /) -> JobInfo.Builder: ...
        def setBackoffCriteria(self, initialBackoffMillis: int | java.jlong | java.lang.Long, backoffPolicy: int | java.jint | java.lang.Integer, /) -> JobInfo.Builder: ...
        def setClipData(self, clip: android.content.ClipData, grantFlags: int | java.jint | java.lang.Integer, /) -> JobInfo.Builder: ...
        def setEstimatedNetworkBytes(self, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        def setExpedited(self, expedited: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setExtras(self, extras: android.os.PersistableBundle, /) -> JobInfo.Builder: ...
        def setImportantWhileForeground(self, importantWhileForeground: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setMinimumLatency(self, minLatencyMillis: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        def setMinimumNetworkChunkBytes(self, chunkSizeBytes: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        def setOverrideDeadline(self, maxExecutionDelayMillis: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        @typing.overload
        def setPeriodic(self, intervalMillis: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        @typing.overload
        def setPeriodic(self, intervalMillis: int | java.jlong | java.lang.Long, flexMillis: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        def setPersisted(self, isPersisted: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setPrefetch(self, prefetch: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setPriority(self, priority: int | java.jint | java.lang.Integer, /) -> JobInfo.Builder: ...
        def setRequiredNetwork(self, networkRequest: android.net.NetworkRequest, /) -> JobInfo.Builder: ...
        def setRequiredNetworkType(self, networkType: int | java.jint | java.lang.Integer, /) -> JobInfo.Builder: ...
        def setRequiresBatteryNotLow(self, batteryNotLow: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setRequiresCharging(self, requiresCharging: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setRequiresDeviceIdle(self, requiresDeviceIdle: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setRequiresStorageNotLow(self, storageNotLow: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...
        def setTraceTag(self, traceTag: str | java.lang.String, /) -> JobInfo.Builder: ...
        def setTransientExtras(self, extras: android.os.Bundle, /) -> JobInfo.Builder: ...
        def setTriggerContentMaxDelay(self, durationMs: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        def setTriggerContentUpdateDelay(self, durationMs: int | java.jlong | java.lang.Long, /) -> JobInfo.Builder: ...
        def setUserInitiated(self, userInitiated: bool | java.jboolean | java.lang.Boolean, /) -> JobInfo.Builder: ...

class JobParameters(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[JobParameters]] = ...
    STOP_REASON_APP_STANDBY: typing.ClassVar[int] = ...
    STOP_REASON_BACKGROUND_RESTRICTION: typing.ClassVar[int] = ...
    STOP_REASON_CANCELLED_BY_APP: typing.ClassVar[int] = ...
    STOP_REASON_CONSTRAINT_BATTERY_NOT_LOW: typing.ClassVar[int] = ...
    STOP_REASON_CONSTRAINT_CHARGING: typing.ClassVar[int] = ...
    STOP_REASON_CONSTRAINT_CONNECTIVITY: typing.ClassVar[int] = ...
    STOP_REASON_CONSTRAINT_DEVICE_IDLE: typing.ClassVar[int] = ...
    STOP_REASON_CONSTRAINT_STORAGE_NOT_LOW: typing.ClassVar[int] = ...
    STOP_REASON_DEVICE_STATE: typing.ClassVar[int] = ...
    STOP_REASON_ESTIMATED_APP_LAUNCH_TIME_CHANGED: typing.ClassVar[int] = ...
    STOP_REASON_PREEMPT: typing.ClassVar[int] = ...
    STOP_REASON_QUOTA: typing.ClassVar[int] = ...
    STOP_REASON_SYSTEM_PROCESSING: typing.ClassVar[int] = ...
    STOP_REASON_TIMEOUT: typing.ClassVar[int] = ...
    STOP_REASON_TIMEOUT_ABANDONED: typing.ClassVar[int] = ...
    STOP_REASON_UNDEFINED: typing.ClassVar[int] = ...
    STOP_REASON_USER: typing.ClassVar[int] = ...
    def completeWork(self, work: JobWorkItem, /) -> None: ...
    def dequeueWork(self) -> JobWorkItem | None: ...
    def describeContents(self) -> int: ...
    def getClipData(self) -> android.content.ClipData | None: ...
    def getClipGrantFlags(self) -> int: ...
    def getExtras(self) -> android.os.PersistableBundle: ...
    def getJobId(self) -> int: ...
    def getJobNamespace(self) -> str | None: ...
    def getNetwork(self) -> android.net.Network | None: ...
    def getStopReason(self) -> int: ...
    def getTransientExtras(self) -> android.os.Bundle: ...
    def getTriggeredContentAuthorities(self) -> java.chaquopy.JavaArray[java.lang.String] | None: ...
    def getTriggeredContentUris(self) -> java.chaquopy.JavaArray[android.net.Uri] | None: ...
    def isExpeditedJob(self) -> bool: ...
    def isOverrideDeadlineExpired(self) -> bool: ...
    def isUserInitiatedJob(self) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class JobScheduler(java.lang.Object):
    PENDING_JOB_REASON_APP: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_APP_STANDBY: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_BACKGROUND_RESTRICTION: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_BATTERY_NOT_LOW: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_CHARGING: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_CONNECTIVITY: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_CONTENT_TRIGGER: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_DEADLINE: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_DEVICE_IDLE: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_MINIMUM_LATENCY: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_PREFETCH: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_CONSTRAINT_STORAGE_NOT_LOW: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_DEVICE_STATE: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_EXECUTING: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_INVALID_JOB_ID: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_JOB_SCHEDULER_OPTIMIZATION: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_QUOTA: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_UNDEFINED: typing.ClassVar[int] = ...
    PENDING_JOB_REASON_USER: typing.ClassVar[int] = ...
    RESULT_FAILURE: typing.ClassVar[int] = ...
    RESULT_SUCCESS: typing.ClassVar[int] = ...
    def __init__(self) -> None: ...
    def canRunUserInitiatedJobs(self) -> bool: ...
    def cancel(self, arg1: int | java.jint | java.lang.Integer, /) -> None: ...
    def cancelAll(self) -> None: ...
    def cancelInAllNamespaces(self) -> None: ...
    def enqueue(self, arg1: JobInfo, arg2: JobWorkItem, /) -> int: ...
    def forNamespace(self, namespace: str | java.lang.String, /) -> JobScheduler: ...
    def getAllPendingJobs(self) -> java.util.List[JobInfo]: ...
    def getNamespace(self) -> str | None: ...
    def getPendingJob(self, arg1: int | java.jint | java.lang.Integer, /) -> JobInfo | None: ...
    def getPendingJobReason(self, jobId: int | java.jint | java.lang.Integer, /) -> int: ...
    def getPendingJobReasons(self, jobId: int | java.jint | java.lang.Integer, /) -> java.chaquopy.JavaArrayJInt: ...
    def getPendingJobReasonsHistory(self, jobId: int | java.jint | java.lang.Integer, /) -> java.util.List[PendingJobReasonsInfo]: ...
    def getPendingJobsInAllNamespaces(self) -> java.util.Map[java.lang.String, java.util.List[JobInfo]]: ...
    def schedule(self, arg1: JobInfo, /) -> int: ...

class JobService(android.app.Service):
    JOB_END_NOTIFICATION_POLICY_DETACH: typing.ClassVar[int] = ...
    JOB_END_NOTIFICATION_POLICY_REMOVE: typing.ClassVar[int] = ...
    PERMISSION_BIND: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def jobFinished(self, params: JobParameters, wantsReschedule: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onNetworkChanged(self, params: JobParameters, /) -> None: ...
    def onStartJob(self, arg1: JobParameters, /) -> bool: ...
    def onStopJob(self, arg1: JobParameters, /) -> bool: ...
    def setNotification(self, params: JobParameters, notificationId: int | java.jint | java.lang.Integer, notification: android.app.Notification, jobEndNotificationPolicy: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def updateEstimatedNetworkBytes(self, params: JobParameters, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...
    @typing.overload
    def updateEstimatedNetworkBytes(self, params: JobParameters, jobWorkItem: JobWorkItem, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...
    @typing.overload
    def updateTransferredNetworkBytes(self, params: JobParameters, transferredDownloadBytes: int | java.jlong | java.lang.Long, transferredUploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...
    @typing.overload
    def updateTransferredNetworkBytes(self, params: JobParameters, item: JobWorkItem, transferredDownloadBytes: int | java.jlong | java.lang.Long, transferredUploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...

class JobServiceEngine(java.lang.Object):
    def __init__(self, service: android.app.Service, /) -> None: ...
    def getBinder(self) -> android.os.IBinder: ...
    def jobFinished(self, params: JobParameters, needsReschedule: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def onNetworkChanged(self, params: JobParameters, /) -> None: ...
    def onStartJob(self, arg1: JobParameters, /) -> bool: ...
    def onStopJob(self, arg1: JobParameters, /) -> bool: ...
    def setNotification(self, params: JobParameters, notificationId: int | java.jint | java.lang.Integer, notification: android.app.Notification, jobEndNotificationPolicy: int | java.jint | java.lang.Integer, /) -> None: ...
    def updateEstimatedNetworkBytes(self, params: JobParameters, item: JobWorkItem, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...
    def updateTransferredNetworkBytes(self, params: JobParameters, item: JobWorkItem, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...

class JobWorkItem(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[JobWorkItem]] = ...
    @typing.overload
    def __init__(self, intent: android.content.Intent, /) -> None: ...
    @typing.overload
    def __init__(self, intent: android.content.Intent, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> None: ...
    @typing.overload
    def __init__(self, intent: android.content.Intent, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, minimumChunkBytes: int | java.jlong | java.lang.Long, /) -> None: ...
    def describeContents(self) -> int: ...
    def getDeliveryCount(self) -> int: ...
    def getEstimatedNetworkDownloadBytes(self) -> int: ...
    def getEstimatedNetworkUploadBytes(self) -> int: ...
    def getExtras(self) -> android.os.PersistableBundle: ...
    def getIntent(self) -> android.content.Intent: ...
    def getMinimumNetworkChunkBytes(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> JobWorkItem: ...
        def setEstimatedNetworkBytes(self, downloadBytes: int | java.jlong | java.lang.Long, uploadBytes: int | java.jlong | java.lang.Long, /) -> JobWorkItem.Builder: ...
        def setExtras(self, extras: android.os.PersistableBundle, /) -> JobWorkItem.Builder: ...
        def setIntent(self, intent: android.content.Intent, /) -> JobWorkItem.Builder: ...
        def setMinimumNetworkChunkBytes(self, chunkSizeBytes: int | java.jlong | java.lang.Long, /) -> JobWorkItem.Builder: ...

class PendingJobReasonsInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PendingJobReasonsInfo]] = ...
    def __init__(self, timestampMillis: int | java.jlong | java.lang.Long, reasons: java.chaquopy.JavaArrayJInt, /) -> None: ...
    def describeContents(self) -> int: ...
    def getPendingJobReasons(self) -> java.chaquopy.JavaArrayJInt: ...
    def getTimestampMillis(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...
