import typing

import android.app
import android.content
import android.os
import java
import java.lang
import java.util
import java.util.concurrent

class GetValueRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetValueRequest]] = ...
    def describeContents(self) -> int: ...
    def getPreferenceKey(self) -> str: ...
    def getScreenKey(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, screenKey: str | java.lang.String, preferenceKey: str | java.lang.String, /) -> None: ...
        def build(self) -> GetValueRequest: ...

class GetValueResult(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetValueResult]] = ...
    RESULT_DISALLOW: typing.ClassVar[int] = ...
    RESULT_INTERNAL_ERROR: typing.ClassVar[int] = ...
    RESULT_INVALID_REQUEST: typing.ClassVar[int] = ...
    RESULT_OK: typing.ClassVar[int] = ...
    RESULT_REQUIRE_APP_PERMISSION: typing.ClassVar[int] = ...
    RESULT_UNAVAILABLE: typing.ClassVar[int] = ...
    RESULT_UNSUPPORTED: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getMetadata(self) -> SettingsPreferenceMetadata: ...
    def getResultCode(self) -> int: ...
    def getValue(self) -> SettingsPreferenceValue: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, resultCode: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> GetValueResult: ...
        def setMetadata(self, metadata: SettingsPreferenceMetadata, /) -> GetValueResult.Builder: ...
        def setValue(self, value: SettingsPreferenceValue, /) -> GetValueResult.Builder: ...

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

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> MetadataRequest: ...

class MetadataResult(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[MetadataResult]] = ...
    RESULT_INTERNAL_ERROR: typing.ClassVar[int] = ...
    RESULT_OK: typing.ClassVar[int] = ...
    RESULT_UNSUPPORTED: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getMetadataList(self) -> java.util.List[SettingsPreferenceMetadata]: ...
    def getResultCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, resultCode: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> MetadataResult: ...
        def setMetadataList(self, metadataList: java.util.List[SettingsPreferenceMetadata], /) -> MetadataResult.Builder: ...

class SetValueRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SetValueRequest]] = ...
    def describeContents(self) -> int: ...
    def getPreferenceKey(self) -> str: ...
    def getPreferenceValue(self) -> SettingsPreferenceValue: ...
    def getScreenKey(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, screenKey: str | java.lang.String, preferenceKey: str | java.lang.String, value: SettingsPreferenceValue, /) -> None: ...
        def build(self) -> SetValueRequest: ...

class SetValueResult(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SetValueResult]] = ...
    RESULT_DISABLED: typing.ClassVar[int] = ...
    RESULT_DISALLOW: typing.ClassVar[int] = ...
    RESULT_INTERNAL_ERROR: typing.ClassVar[int] = ...
    RESULT_INVALID_REQUEST: typing.ClassVar[int] = ...
    RESULT_OK: typing.ClassVar[int] = ...
    RESULT_REQUIRE_APP_PERMISSION: typing.ClassVar[int] = ...
    RESULT_REQUIRE_USER_CONSENT: typing.ClassVar[int] = ...
    RESULT_RESTRICTED: typing.ClassVar[int] = ...
    RESULT_UNAVAILABLE: typing.ClassVar[int] = ...
    RESULT_UNSUPPORTED: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getResultCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, resultCode: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> SetValueResult: ...

class SettingsPreferenceMetadata(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SettingsPreferenceMetadata]] = ...
    DEEPLINK_ONLY: typing.ClassVar[int] = ...
    EXPECT_POST_CONFIRMATION: typing.ClassVar[int] = ...
    NO_DIRECT_ACCESS: typing.ClassVar[int] = ...
    NO_SENSITIVITY: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getExtras(self) -> android.os.Bundle: ...
    def getKey(self) -> str: ...
    def getLaunchIntent(self) -> android.content.Intent: ...
    def getReadPermissions(self) -> java.util.List[java.lang.String]: ...
    def getScreenKey(self) -> str: ...
    def getSummary(self) -> str: ...
    def getTitle(self) -> str: ...
    def getWritePermissions(self) -> java.util.List[java.lang.String]: ...
    def getWriteSensitivity(self) -> int: ...
    def isAvailable(self) -> bool: ...
    def isEnabled(self) -> bool: ...
    def isRestricted(self) -> bool: ...
    def isWritable(self) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, screenKey: str | java.lang.String, key: str | java.lang.String, /) -> None: ...
        def build(self) -> SettingsPreferenceMetadata: ...
        def setAvailable(self, available: bool | java.jboolean | java.lang.Boolean, /) -> SettingsPreferenceMetadata.Builder: ...
        def setEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SettingsPreferenceMetadata.Builder: ...
        def setExtras(self, extras: android.os.Bundle, /) -> SettingsPreferenceMetadata.Builder: ...
        def setLaunchIntent(self, launchIntent: android.content.Intent, /) -> SettingsPreferenceMetadata.Builder: ...
        def setReadPermissions(self, readPermissions: java.util.List[java.lang.String], /) -> SettingsPreferenceMetadata.Builder: ...
        def setRestricted(self, restricted: bool | java.jboolean | java.lang.Boolean, /) -> SettingsPreferenceMetadata.Builder: ...
        def setSummary(self, summary: str | java.lang.String, /) -> SettingsPreferenceMetadata.Builder: ...
        def setTitle(self, title: str | java.lang.String, /) -> SettingsPreferenceMetadata.Builder: ...
        def setWritable(self, writable: bool | java.jboolean | java.lang.Boolean, /) -> SettingsPreferenceMetadata.Builder: ...
        def setWritePermissions(self, writePermissions: java.util.List[java.lang.String], /) -> SettingsPreferenceMetadata.Builder: ...
        def setWriteSensitivity(self, sensitivity: int | java.jint | java.lang.Integer, /) -> SettingsPreferenceMetadata.Builder: ...

class SettingsPreferenceService(android.app.Service):
    ACTION_PREFERENCE_SERVICE: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onGetAllPreferenceMetadata(self, arg1: MetadataRequest, arg2: android.os.OutcomeReceiver[MetadataResult, java.lang.Exception], /) -> None: ...
    def onGetPreferenceValue(self, arg1: GetValueRequest, arg2: android.os.OutcomeReceiver[GetValueResult, java.lang.Exception], /) -> None: ...
    def onSetPreferenceValue(self, arg1: SetValueRequest, arg2: android.os.OutcomeReceiver[SetValueResult, java.lang.Exception], /) -> None: ...

class SettingsPreferenceServiceClient(java.lang.AutoCloseable):
    def __init__(self, context: android.content.Context, packageName: str | java.lang.String, callbackExecutor: java.util.concurrent.Executor, clientReadyCallback: android.os.OutcomeReceiver[SettingsPreferenceServiceClient, java.lang.Exception], /) -> None: ...
    def close(self) -> None: ...
    def getAllPreferenceMetadata(self, request: MetadataRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[MetadataResult, java.lang.Exception], /) -> None: ...
    def getPreferenceValue(self, request: GetValueRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[GetValueResult, java.lang.Exception], /) -> None: ...
    def setPreferenceValue(self, request: SetValueRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[SetValueResult, java.lang.Exception], /) -> None: ...

class SettingsPreferenceValue(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SettingsPreferenceValue]] = ...
    TYPE_BOOLEAN: typing.ClassVar[int] = ...
    TYPE_DOUBLE: typing.ClassVar[int] = ...
    TYPE_INT: typing.ClassVar[int] = ...
    TYPE_LONG: typing.ClassVar[int] = ...
    TYPE_STRING: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getBooleanValue(self) -> bool: ...
    def getDoubleValue(self) -> float: ...
    def getIntValue(self) -> int: ...
    def getLongValue(self) -> int: ...
    def getStringValue(self) -> str: ...
    def getType(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, type: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> SettingsPreferenceValue: ...
        def setBooleanValue(self, booleanValue: bool | java.jboolean | java.lang.Boolean, /) -> SettingsPreferenceValue.Builder: ...
        def setDoubleValue(self, doubleValue: float | java.jdouble | java.lang.Double, /) -> SettingsPreferenceValue.Builder: ...
        def setIntValue(self, intValue: int | java.jint | java.lang.Integer, /) -> SettingsPreferenceValue.Builder: ...
        def setLongValue(self, longValue: int | java.jlong | java.lang.Long, /) -> SettingsPreferenceValue.Builder: ...
        def setStringValue(self, stringValue: str | java.lang.String, /) -> SettingsPreferenceValue.Builder: ...
