import typing

import android.app.appsearch.observer
import android.os
import java
import java.chaquopy
import java.io
import java.lang
import java.util
import java.util.concurrent
import java.util.function

_AppSearchBatchResult__KeyType = typing.TypeVar('_AppSearchBatchResult__KeyType')  # <KeyType>
_AppSearchBatchResult__ValueType = typing.TypeVar('_AppSearchBatchResult__ValueType')  # <ValueType>

_AppSearchBatchResult__Builder__KeyType = typing.TypeVar('_AppSearchBatchResult__Builder__KeyType')  # <KeyType>
_AppSearchBatchResult__Builder__ValueType = typing.TypeVar('_AppSearchBatchResult__Builder__ValueType')  # <ValueType>
class AppSearchBatchResult(java.lang.Object, typing.Generic[_AppSearchBatchResult__KeyType, _AppSearchBatchResult__ValueType]):
    def getAll(self) -> java.util.Map[_AppSearchBatchResult__KeyType, AppSearchResult[_AppSearchBatchResult__ValueType]]: ...
    def getFailures(self) -> java.util.Map[_AppSearchBatchResult__KeyType, AppSearchResult[_AppSearchBatchResult__ValueType]]: ...
    def getSuccesses(self) -> java.util.Map[_AppSearchBatchResult__KeyType, _AppSearchBatchResult__ValueType]: ...
    def isSuccess(self) -> bool: ...
    def toString(self) -> str: ...
    class Builder(java.lang.Object, typing.Generic[_AppSearchBatchResult__Builder__KeyType, _AppSearchBatchResult__Builder__ValueType]):
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, appSearchBatchResult: AppSearchBatchResult[_AppSearchBatchResult__Builder__KeyType, _AppSearchBatchResult__Builder__ValueType], /) -> None: ...
        def build(self) -> AppSearchBatchResult[_AppSearchBatchResult__Builder__KeyType, _AppSearchBatchResult__Builder__ValueType]: ...
        def setFailure(self, key: _AppSearchBatchResult__Builder__KeyType, resultCode: int | java.jint | java.lang.Integer, errorMessage: str | java.lang.String, /) -> AppSearchBatchResult.Builder[_AppSearchBatchResult__Builder__KeyType, _AppSearchBatchResult__Builder__ValueType]: ...
        def setResult(self, key: _AppSearchBatchResult__Builder__KeyType, result: AppSearchResult[_AppSearchBatchResult__Builder__ValueType], /) -> AppSearchBatchResult.Builder[_AppSearchBatchResult__Builder__KeyType, _AppSearchBatchResult__Builder__ValueType]: ...
        def setSuccess(self, key: _AppSearchBatchResult__Builder__KeyType, value: _AppSearchBatchResult__Builder__ValueType, /) -> AppSearchBatchResult.Builder[_AppSearchBatchResult__Builder__KeyType, _AppSearchBatchResult__Builder__ValueType]: ...

class AppSearchBlobHandle(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AppSearchBlobHandle]] = ...
    @staticmethod
    def createWithSha256(digest: java.chaquopy.JavaArrayJByte, packageName: str | java.lang.String, databaseName: str | java.lang.String, namespace: str | java.lang.String, /) -> AppSearchBlobHandle: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDatabaseName(self) -> str: ...
    def getNamespace(self) -> str: ...
    def getPackageName(self) -> str: ...
    def getSha256Digest(self) -> java.chaquopy.JavaArrayJByte: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class AppSearchManager(java.lang.Object):
    def createEnterpriseGlobalSearchSession(self, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[EnterpriseGlobalSearchSession]], /) -> None: ...
    def createGlobalSearchSession(self, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[GlobalSearchSession]], /) -> None: ...
    def createSearchSession(self, searchContext: AppSearchManager.SearchContext, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[AppSearchSession]], /) -> None: ...

    class SearchContext(java.lang.Object):
        def getDatabaseName(self) -> str: ...

        class Builder(java.lang.Object):
            def __init__(self, databaseName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchManager.SearchContext: ...

_AppSearchResult__ValueType = typing.TypeVar('_AppSearchResult__ValueType')  # <ValueType>
class AppSearchResult(java.lang.Object, typing.Generic[_AppSearchResult__ValueType]):
    RESULT_ALREADY_EXISTS: typing.ClassVar[int] = ...
    RESULT_DENIED: typing.ClassVar[int] = ...
    RESULT_INTERNAL_ERROR: typing.ClassVar[int] = ...
    RESULT_INVALID_ARGUMENT: typing.ClassVar[int] = ...
    RESULT_INVALID_SCHEMA: typing.ClassVar[int] = ...
    RESULT_IO_ERROR: typing.ClassVar[int] = ...
    RESULT_NOT_FOUND: typing.ClassVar[int] = ...
    RESULT_OK: typing.ClassVar[int] = ...
    RESULT_OUT_OF_SPACE: typing.ClassVar[int] = ...
    RESULT_RATE_LIMITED: typing.ClassVar[int] = ...
    RESULT_SECURITY_ERROR: typing.ClassVar[int] = ...
    RESULT_UNKNOWN_ERROR: typing.ClassVar[int] = ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getErrorMessage(self) -> str | None: ...
    def getResultCode(self) -> int: ...
    def getResultValue(self) -> _AppSearchResult__ValueType | None: ...
    def hashCode(self) -> int: ...
    def isSuccess(self) -> bool: ...
    @staticmethod
    def newFailedResult(resultCode: int | java.jint | java.lang.Integer, errorMessage: str | java.lang.String, /) -> AppSearchResult[java.lang.Object]: ...
    _newSuccessfulResult__ValueType = typing.TypeVar('_newSuccessfulResult__ValueType')  # <ValueType>
    @staticmethod
    def newSuccessfulResult(value: _newSuccessfulResult__ValueType, /) -> AppSearchResult[_newSuccessfulResult__ValueType]: ...
    def toString(self) -> str: ...

class AppSearchSchema(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AppSearchSchema]] = ...
    def describeContents(self) -> int: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getParentTypes(self) -> java.util.List[java.lang.String]: ...
    def getProperties(self) -> java.util.List[AppSearchSchema.PropertyConfig]: ...
    def getSchemaType(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 StringPropertyConfig(AppSearchSchema.PropertyConfig):
        INDEXING_TYPE_EXACT_TERMS: typing.ClassVar[int] = ...
        INDEXING_TYPE_NONE: typing.ClassVar[int] = ...
        INDEXING_TYPE_PREFIXES: typing.ClassVar[int] = ...
        JOINABLE_VALUE_TYPE_NONE: typing.ClassVar[int] = ...
        JOINABLE_VALUE_TYPE_QUALIFIED_ID: typing.ClassVar[int] = ...
        TOKENIZER_TYPE_NONE: typing.ClassVar[int] = ...
        TOKENIZER_TYPE_PLAIN: typing.ClassVar[int] = ...
        TOKENIZER_TYPE_RFC822: typing.ClassVar[int] = ...
        TOKENIZER_TYPE_VERBATIM: typing.ClassVar[int] = ...
        def getIndexingType(self) -> int: ...
        def getJoinableValueType(self) -> int: ...
        def getTokenizerType(self) -> int: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.StringPropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.StringPropertyConfig.Builder: ...
            def setIndexingType(self, indexingType: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.StringPropertyConfig.Builder: ...
            def setJoinableValueType(self, joinableValueType: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.StringPropertyConfig.Builder: ...
            def setTokenizerType(self, tokenizerType: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.StringPropertyConfig.Builder: ...

    class PropertyConfig(java.lang.Object):
        CARDINALITY_OPTIONAL: typing.ClassVar[int] = ...
        CARDINALITY_REPEATED: typing.ClassVar[int] = ...
        CARDINALITY_REQUIRED: typing.ClassVar[int] = ...
        def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getCardinality(self) -> int: ...
        def getName(self) -> str: ...
        def hashCode(self) -> int: ...
        def toString(self) -> str: ...

    class LongPropertyConfig(AppSearchSchema.PropertyConfig):
        INDEXING_TYPE_NONE: typing.ClassVar[int] = ...
        INDEXING_TYPE_RANGE: typing.ClassVar[int] = ...
        def getIndexingType(self) -> int: ...
        def isScoringEnabled(self) -> bool: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.LongPropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.LongPropertyConfig.Builder: ...
            def setIndexingType(self, indexingType: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.LongPropertyConfig.Builder: ...
            def setScoringEnabled(self, scoringEnabled: bool | java.jboolean | java.lang.Boolean, /) -> AppSearchSchema.LongPropertyConfig.Builder: ...

    class EmbeddingPropertyConfig(AppSearchSchema.PropertyConfig):
        INDEXING_TYPE_NONE: typing.ClassVar[int] = ...
        INDEXING_TYPE_SIMILARITY: typing.ClassVar[int] = ...
        QUANTIZATION_TYPE_8_BIT: typing.ClassVar[int] = ...
        QUANTIZATION_TYPE_NONE: typing.ClassVar[int] = ...
        def getIndexingType(self) -> int: ...
        def getQuantizationType(self) -> int: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.EmbeddingPropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.EmbeddingPropertyConfig.Builder: ...
            def setIndexingType(self, indexingType: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.EmbeddingPropertyConfig.Builder: ...
            def setQuantizationType(self, quantizationType: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.EmbeddingPropertyConfig.Builder: ...

    class DoublePropertyConfig(AppSearchSchema.PropertyConfig):
        def isScoringEnabled(self) -> bool: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.DoublePropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.DoublePropertyConfig.Builder: ...
            def setScoringEnabled(self, scoringEnabled: bool | java.jboolean | java.lang.Boolean, /) -> AppSearchSchema.DoublePropertyConfig.Builder: ...

    class DocumentPropertyConfig(AppSearchSchema.PropertyConfig):
        def getIndexableNestedProperties(self) -> java.util.List[java.lang.String]: ...
        def getSchemaType(self) -> str: ...
        def shouldIndexNestedProperties(self) -> bool: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, schemaType: str | java.lang.String, /) -> None: ...
            @typing.overload
            def addIndexableNestedProperties(self, indexableNestedProperties: java.util.Collection[java.lang.String], /) -> AppSearchSchema.DocumentPropertyConfig.Builder: ...
            @typing.overload
            def addIndexableNestedProperties(self, *indexableNestedProperties: java.lang.String) -> AppSearchSchema.DocumentPropertyConfig.Builder: ...
            @typing.overload
            def addIndexableNestedPropertyPaths(self, indexableNestedPropertyPaths: java.util.Collection[PropertyPath], /) -> AppSearchSchema.DocumentPropertyConfig.Builder: ...
            @typing.overload
            def addIndexableNestedPropertyPaths(self, *indexableNestedPropertyPaths: PropertyPath) -> AppSearchSchema.DocumentPropertyConfig.Builder: ...
            def build(self) -> AppSearchSchema.DocumentPropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.DocumentPropertyConfig.Builder: ...
            def setShouldIndexNestedProperties(self, indexNestedProperties: bool | java.jboolean | java.lang.Boolean, /) -> AppSearchSchema.DocumentPropertyConfig.Builder: ...

    class BytesPropertyConfig(AppSearchSchema.PropertyConfig):

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.BytesPropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.BytesPropertyConfig.Builder: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, schema: AppSearchSchema, /) -> None: ...
        @typing.overload
        def __init__(self, schemaType: str | java.lang.String, /) -> None: ...
        def addParentType(self, parentSchemaType: str | java.lang.String, /) -> AppSearchSchema.Builder: ...
        def addProperty(self, propertyConfig: AppSearchSchema.PropertyConfig, /) -> AppSearchSchema.Builder: ...
        def build(self) -> AppSearchSchema: ...
        def clearParentTypes(self) -> AppSearchSchema.Builder: ...
        def clearProperties(self) -> AppSearchSchema.Builder: ...
        def setSchemaType(self, schemaType: str | java.lang.String, /) -> AppSearchSchema.Builder: ...

    class BooleanPropertyConfig(AppSearchSchema.PropertyConfig):
        def isScoringEnabled(self) -> bool: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.BooleanPropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.BooleanPropertyConfig.Builder: ...
            def setScoringEnabled(self, scoringEnabled: bool | java.jboolean | java.lang.Boolean, /) -> AppSearchSchema.BooleanPropertyConfig.Builder: ...

    class BlobHandlePropertyConfig(AppSearchSchema.PropertyConfig):

        class Builder(java.lang.Object):
            def __init__(self, propertyName: str | java.lang.String, /) -> None: ...
            def build(self) -> AppSearchSchema.BlobHandlePropertyConfig: ...
            def setCardinality(self, cardinality: int | java.jint | java.lang.Integer, /) -> AppSearchSchema.BlobHandlePropertyConfig.Builder: ...

class AppSearchSession(java.io.Closeable):
    def close(self) -> None: ...
    def commitBlob(self, handles: java.util.Set[AppSearchBlobHandle], executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[CommitBlobResponse]], /) -> None: ...
    def getByDocumentId(self, request: GetByDocumentIdRequest, executor: java.util.concurrent.Executor, callback: BatchResultCallback[java.lang.String, GenericDocument], /) -> None: ...
    def getNamespaces(self, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.util.Set[java.lang.String]]], /) -> None: ...
    def getSchema(self, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[GetSchemaResponse]], /) -> None: ...
    def getStorageInfo(self, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[StorageInfo]], /) -> None: ...
    def openBlobForRead(self, handles: java.util.Set[AppSearchBlobHandle], executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[OpenBlobForReadResponse]], /) -> None: ...
    def openBlobForWrite(self, handles: java.util.Set[AppSearchBlobHandle], executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[OpenBlobForWriteResponse]], /) -> None: ...
    def put(self, request: PutDocumentsRequest, executor: java.util.concurrent.Executor, callback: BatchResultCallback[java.lang.String, java.lang.Void], /) -> None: ...
    @typing.overload
    def remove(self, request: RemoveByDocumentIdRequest, executor: java.util.concurrent.Executor, callback: BatchResultCallback[java.lang.String, java.lang.Void], /) -> None: ...
    @typing.overload
    def remove(self, queryExpression: str | java.lang.String, searchSpec: SearchSpec, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.lang.Void]], /) -> None: ...
    def removeBlob(self, handles: java.util.Set[AppSearchBlobHandle], executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[RemoveBlobResponse]], /) -> None: ...
    def reportUsage(self, request: ReportUsageRequest, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.lang.Void]], /) -> None: ...
    def search(self, queryExpression: str | java.lang.String, searchSpec: SearchSpec, /) -> SearchResults: ...
    def searchSuggestion(self, suggestionQueryExpression: str | java.lang.String, searchSuggestionSpec: SearchSuggestionSpec, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.util.List[SearchSuggestionResult]]], /) -> None: ...
    def setBlobVisibility(self, request: SetBlobVisibilityRequest, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.lang.Void]], /) -> None: ...
    def setSchema(self, request: SetSchemaRequest, workExecutor: java.util.concurrent.Executor, callbackExecutor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[SetSchemaResponse]], /) -> None: ...

_BatchResultCallback__KeyType = typing.TypeVar('_BatchResultCallback__KeyType')  # <KeyType>
_BatchResultCallback__ValueType = typing.TypeVar('_BatchResultCallback__ValueType')  # <ValueType>
class BatchResultCallback(java.lang.Object, typing.Generic[_BatchResultCallback__KeyType, _BatchResultCallback__ValueType]):
    def onResult(self, arg1: AppSearchBatchResult[_BatchResultCallback__KeyType, _BatchResultCallback__ValueType], /) -> None: ...
    def onSystemError(self, throwable: java.lang.Throwable, /) -> None: ...

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

class EmbeddingVector(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[EmbeddingVector]] = ...
    def __init__(self, values: java.chaquopy.JavaArrayJFloat, modelSignature: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getModelSignature(self) -> str: ...
    def getValues(self) -> java.chaquopy.JavaArrayJFloat: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class EnterpriseGlobalSearchSession(java.lang.Object):
    def getByDocumentId(self, packageName: str | java.lang.String, databaseName: str | java.lang.String, request: GetByDocumentIdRequest, executor: java.util.concurrent.Executor, callback: BatchResultCallback[java.lang.String, GenericDocument], /) -> None: ...
    def getSchema(self, packageName: str | java.lang.String, databaseName: str | java.lang.String, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[GetSchemaResponse]], /) -> None: ...
    def openBlobForRead(self, handles: java.util.Set[AppSearchBlobHandle], executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[OpenBlobForReadResponse]], /) -> None: ...
    def search(self, queryExpression: str | java.lang.String, searchSpec: SearchSpec, /) -> SearchResults: ...


_GenericDocument__Builder__BuilderType = typing.TypeVar('_GenericDocument__Builder__BuilderType', bound=GenericDocument.Builder)  # <BuilderType>
class GenericDocument(java.lang.Object):
    def __init__(self, document: GenericDocument, /) -> None: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCreationTimestampMillis(self) -> int: ...
    def getId(self) -> str: ...
    @staticmethod
    def getMaxIndexedProperties() -> int: ...
    def getNamespace(self) -> str: ...
    def getProperty(self, path: str | java.lang.String, /) -> java.lang.Object | None: ...
    def getPropertyBlobHandle(self, path: str | java.lang.String, /) -> AppSearchBlobHandle: ...
    def getPropertyBlobHandleArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArray[AppSearchBlobHandle]: ...
    def getPropertyBoolean(self, path: str | java.lang.String, /) -> bool: ...
    def getPropertyBooleanArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArrayJBoolean | None: ...
    def getPropertyBytes(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArrayJByte | None: ...
    def getPropertyBytesArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArray[java.chaquopy.JavaArrayJByte] | None: ...
    def getPropertyDocument(self, path: str | java.lang.String, /) -> GenericDocument | None: ...
    def getPropertyDocumentArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArray[GenericDocument] | None: ...
    def getPropertyDouble(self, path: str | java.lang.String, /) -> float: ...
    def getPropertyDoubleArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArrayJDouble | None: ...
    def getPropertyEmbedding(self, path: str | java.lang.String, /) -> EmbeddingVector: ...
    def getPropertyEmbeddingArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArray[EmbeddingVector]: ...
    def getPropertyLong(self, path: str | java.lang.String, /) -> int: ...
    def getPropertyLongArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArrayJLong | None: ...
    def getPropertyNames(self) -> java.util.Set[java.lang.String]: ...
    def getPropertyString(self, path: str | java.lang.String, /) -> str | None: ...
    def getPropertyStringArray(self, path: str | java.lang.String, /) -> java.chaquopy.JavaArray[java.lang.String] | None: ...
    def getSchemaType(self) -> str: ...
    def getScore(self) -> int: ...
    def getTtlMillis(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    class Builder(java.lang.Object, typing.Generic[_GenericDocument__Builder__BuilderType]):
        @typing.overload
        def __init__(self, document: GenericDocument, /) -> None: ...
        @typing.overload
        def __init__(self, namespace: str | java.lang.String, id: str | java.lang.String, schemaType: str | java.lang.String, /) -> None: ...
        def build(self) -> GenericDocument: ...
        def clearProperty(self, name: str | java.lang.String, /) -> _GenericDocument__Builder__BuilderType: ...
        def setCreationTimestampMillis(self, creationTimestampMillis: int | java.jlong | java.lang.Long, /) -> _GenericDocument__Builder__BuilderType: ...
        def setId(self, id: str | java.lang.String, /) -> _GenericDocument__Builder__BuilderType: ...
        def setNamespace(self, namespace: str | java.lang.String, /) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyBlobHandle(self, name: str | java.lang.String, /, *values: AppSearchBlobHandle) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyBoolean(self, name: str | java.lang.String, /, *values: java.jboolean) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyBytes(self, name: str | java.lang.String, /, *values: java.chaquopy.JavaArrayJByte) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyDocument(self, name: str | java.lang.String, /, *values: GenericDocument) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyDouble(self, name: str | java.lang.String, /, *values: java.jdouble) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyEmbedding(self, name: str | java.lang.String, /, *values: EmbeddingVector) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyLong(self, name: str | java.lang.String, /, *values: java.jlong) -> _GenericDocument__Builder__BuilderType: ...
        def setPropertyString(self, name: str | java.lang.String, /, *values: java.lang.String) -> _GenericDocument__Builder__BuilderType: ...
        def setSchemaType(self, schemaType: str | java.lang.String, /) -> _GenericDocument__Builder__BuilderType: ...
        def setScore(self, score: int | java.jint | java.lang.Integer, /) -> _GenericDocument__Builder__BuilderType: ...
        def setTtlMillis(self, ttlMillis: int | java.jlong | java.lang.Long, /) -> _GenericDocument__Builder__BuilderType: ...

class GetByDocumentIdRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetByDocumentIdRequest]] = ...
    PROJECTION_SCHEMA_TYPE_WILDCARD: typing.ClassVar[str] = ...
    def describeContents(self) -> int: ...
    def getIds(self) -> java.util.Set[java.lang.String]: ...
    def getNamespace(self) -> str: ...
    def getProjectionPaths(self) -> java.util.Map[java.lang.String, java.util.List[PropertyPath]]: ...
    def getProjections(self) -> java.util.Map[java.lang.String, java.util.List[java.lang.String]]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, namespace: str | java.lang.String, /) -> None: ...
        @typing.overload
        def addIds(self, ids: java.util.Collection[java.lang.String], /) -> GetByDocumentIdRequest.Builder: ...
        @typing.overload
        def addIds(self, *ids: java.lang.String) -> GetByDocumentIdRequest.Builder: ...
        def addProjection(self, schemaType: str | java.lang.String, propertyPaths: java.util.Collection[java.lang.String], /) -> GetByDocumentIdRequest.Builder: ...
        def addProjectionPaths(self, schemaType: str | java.lang.String, propertyPaths: java.util.Collection[PropertyPath], /) -> GetByDocumentIdRequest.Builder: ...
        def build(self) -> GetByDocumentIdRequest: ...

class GetSchemaResponse(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetSchemaResponse]] = ...
    def describeContents(self) -> int: ...
    def getPubliclyVisibleSchemas(self) -> java.util.Map[java.lang.String, PackageIdentifier]: ...
    def getRequiredPermissionsForSchemaTypeVisibility(self) -> java.util.Map[java.lang.String, java.util.Set[java.util.Set[java.lang.Integer]]]: ...
    def getSchemaTypesNotDisplayedBySystem(self) -> java.util.Set[java.lang.String]: ...
    def getSchemaTypesVisibleToConfigs(self) -> java.util.Map[java.lang.String, java.util.Set[SchemaVisibilityConfig]]: ...
    def getSchemaTypesVisibleToPackages(self) -> java.util.Map[java.lang.String, java.util.Set[PackageIdentifier]]: ...
    def getSchemas(self) -> java.util.Set[AppSearchSchema]: ...
    def getVersion(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, getSchemaResponse: GetSchemaResponse, /) -> None: ...
        def addSchema(self, schema: AppSearchSchema, /) -> GetSchemaResponse.Builder: ...
        def addSchemaTypeNotDisplayedBySystem(self, schemaType: str | java.lang.String, /) -> GetSchemaResponse.Builder: ...
        def build(self) -> GetSchemaResponse: ...
        def clearPubliclyVisibleSchema(self, schemaType: str | java.lang.String, /) -> GetSchemaResponse.Builder: ...
        def clearRequiredPermissionsForSchemaTypeVisibility(self, schemaType: str | java.lang.String, /) -> GetSchemaResponse.Builder: ...
        def clearSchemaTypeNotDisplayedBySystem(self, schemaType: str | java.lang.String, /) -> GetSchemaResponse.Builder: ...
        def clearSchemaTypeVisibleToConfigs(self, schemaType: str | java.lang.String, /) -> GetSchemaResponse.Builder: ...
        def clearSchemaTypeVisibleToPackages(self, schemaType: str | java.lang.String, /) -> GetSchemaResponse.Builder: ...
        def clearSchemas(self) -> GetSchemaResponse.Builder: ...
        def setPubliclyVisibleSchema(self, schemaType: str | java.lang.String, packageIdentifier: PackageIdentifier, /) -> GetSchemaResponse.Builder: ...
        def setRequiredPermissionsForSchemaTypeVisibility(self, schemaType: str | java.lang.String, visibleToPermissionSets: java.util.Set[java.util.Set[java.lang.Integer]], /) -> GetSchemaResponse.Builder: ...
        def setSchemaTypeVisibleToConfigs(self, schemaType: str | java.lang.String, visibleToConfigs: java.util.Set[SchemaVisibilityConfig], /) -> GetSchemaResponse.Builder: ...
        def setSchemaTypeVisibleToPackages(self, schemaType: str | java.lang.String, packageIdentifiers: java.util.Set[PackageIdentifier], /) -> GetSchemaResponse.Builder: ...
        def setVersion(self, version: int | java.jint | java.lang.Integer, /) -> GetSchemaResponse.Builder: ...

class GlobalSearchSession(java.io.Closeable):
    def close(self) -> None: ...
    def getByDocumentId(self, packageName: str | java.lang.String, databaseName: str | java.lang.String, request: GetByDocumentIdRequest, executor: java.util.concurrent.Executor, callback: BatchResultCallback[java.lang.String, GenericDocument], /) -> None: ...
    def getSchema(self, packageName: str | java.lang.String, databaseName: str | java.lang.String, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[GetSchemaResponse]], /) -> None: ...
    def openBlobForRead(self, handles: java.util.Set[AppSearchBlobHandle], executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[OpenBlobForReadResponse]], /) -> None: ...
    def registerObserverCallback(self, targetPackageName: str | java.lang.String, spec: android.app.appsearch.observer.ObserverSpec, executor: java.util.concurrent.Executor, observer: android.app.appsearch.observer.ObserverCallback, /) -> None: ...
    def reportSystemUsage(self, request: ReportSystemUsageRequest, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.lang.Void]], /) -> None: ...
    def search(self, queryExpression: str | java.lang.String, searchSpec: SearchSpec, /) -> SearchResults: ...
    def unregisterObserverCallback(self, targetPackageName: str | java.lang.String, observer: android.app.appsearch.observer.ObserverCallback, /) -> None: ...

class JoinSpec(android.os.Parcelable):
    AGGREGATION_SCORING_AVG_RANKING_SIGNAL: typing.ClassVar[int] = ...
    AGGREGATION_SCORING_MAX_RANKING_SIGNAL: typing.ClassVar[int] = ...
    AGGREGATION_SCORING_MIN_RANKING_SIGNAL: typing.ClassVar[int] = ...
    AGGREGATION_SCORING_OUTER_RESULT_RANKING_SIGNAL: typing.ClassVar[int] = ...
    AGGREGATION_SCORING_RESULT_COUNT: typing.ClassVar[int] = ...
    AGGREGATION_SCORING_SUM_RANKING_SIGNAL: typing.ClassVar[int] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[JoinSpec]] = ...
    def describeContents(self) -> int: ...
    def getAggregationScoringStrategy(self) -> int: ...
    def getChildPropertyExpression(self) -> str: ...
    def getMaxJoinedResultCount(self) -> int: ...
    def getNestedQuery(self) -> str: ...
    def getNestedSearchSpec(self) -> SearchSpec: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, joinSpec: JoinSpec, /) -> None: ...
        @typing.overload
        def __init__(self, childPropertyExpression: str | java.lang.String, /) -> None: ...
        def build(self) -> JoinSpec: ...
        def setAggregationScoringStrategy(self, aggregationScoringStrategy: int | java.jint | java.lang.Integer, /) -> JoinSpec.Builder: ...
        def setChildPropertyExpression(self, childPropertyExpression: str | java.lang.String, /) -> JoinSpec.Builder: ...
        def setMaxJoinedResultCount(self, maxJoinedResultCount: int | java.jint | java.lang.Integer, /) -> JoinSpec.Builder: ...
        def setNestedSearch(self, nestedQuery: str | java.lang.String, nestedSearchSpec: SearchSpec, /) -> JoinSpec.Builder: ...

class Migrator(java.lang.Object):
    def __init__(self) -> None: ...
    def onDowngrade(self, arg1: int | java.jint | java.lang.Integer, arg2: int | java.jint | java.lang.Integer, arg3: GenericDocument, /) -> GenericDocument: ...
    def onUpgrade(self, arg1: int | java.jint | java.lang.Integer, arg2: int | java.jint | java.lang.Integer, arg3: GenericDocument, /) -> GenericDocument: ...
    def shouldMigrate(self, arg1: int | java.jint | java.lang.Integer, arg2: int | java.jint | java.lang.Integer, /) -> bool: ...

class OpenBlobForReadResponse(android.os.Parcelable, java.io.Closeable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[OpenBlobForReadResponse]] = ...
    def __init__(self, result: AppSearchBatchResult[AppSearchBlobHandle, android.os.ParcelFileDescriptor], /) -> None: ...
    def close(self) -> None: ...
    def describeContents(self) -> int: ...
    def getResult(self) -> AppSearchBatchResult[AppSearchBlobHandle, android.os.ParcelFileDescriptor]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class OpenBlobForWriteResponse(android.os.Parcelable, java.io.Closeable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[OpenBlobForWriteResponse]] = ...
    def __init__(self, result: AppSearchBatchResult[AppSearchBlobHandle, android.os.ParcelFileDescriptor], /) -> None: ...
    def close(self) -> None: ...
    def describeContents(self) -> int: ...
    def getResult(self) -> AppSearchBatchResult[AppSearchBlobHandle, android.os.ParcelFileDescriptor]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PackageIdentifier(java.lang.Object):
    def __init__(self, packageName: str | java.lang.String, sha256Certificate: java.chaquopy.JavaArrayJByte, /) -> None: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getPackageName(self) -> str: ...
    def getSha256Certificate(self) -> java.chaquopy.JavaArrayJByte: ...
    def hashCode(self) -> int: ...

class PropertyPath(java.lang.Iterable[PropertyPath.PathSegment]):
    @typing.overload
    def __init__(self, path: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, pathList: java.util.List[PropertyPath.PathSegment], /) -> None: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def get(self, index: int | java.jint | java.lang.Integer, /) -> PropertyPath.PathSegment: ...
    def hashCode(self) -> int: ...
    def iterator(self) -> java.util.Iterator[PropertyPath.PathSegment]: ...
    def size(self) -> int: ...
    def toString(self) -> str: ...

    class PathSegment(java.lang.Object):
        NON_REPEATED_CARDINALITY: typing.ClassVar[int] = ...
        @typing.overload
        @staticmethod
        def create(propertyName: str | java.lang.String, /) -> PropertyPath.PathSegment: ...
        @typing.overload
        @staticmethod
        def create(propertyName: str | java.lang.String, propertyIndex: int | java.jint | java.lang.Integer, /) -> PropertyPath.PathSegment: ...
        def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getPropertyIndex(self) -> int: ...
        def getPropertyName(self) -> str: ...
        def hashCode(self) -> int: ...
        def toString(self) -> str: ...

class PutDocumentsRequest(java.lang.Object):
    def getGenericDocuments(self) -> java.util.List[GenericDocument]: ...
    def getTakenActionGenericDocuments(self) -> java.util.List[GenericDocument]: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        @typing.overload
        def addGenericDocuments(self, documents: java.util.Collection[GenericDocument], /) -> PutDocumentsRequest.Builder: ...
        @typing.overload
        def addGenericDocuments(self, *documents: GenericDocument) -> PutDocumentsRequest.Builder: ...
        @typing.overload
        def addTakenActionGenericDocuments(self, takenActionGenericDocuments: java.util.Collection[GenericDocument], /) -> PutDocumentsRequest.Builder: ...
        @typing.overload
        def addTakenActionGenericDocuments(self, *takenActionGenericDocuments: GenericDocument) -> PutDocumentsRequest.Builder: ...
        def build(self) -> PutDocumentsRequest: ...

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

class RemoveByDocumentIdRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[RemoveByDocumentIdRequest]] = ...
    def describeContents(self) -> int: ...
    def getIds(self) -> java.util.Set[java.lang.String]: ...
    def getNamespace(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, namespace: str | java.lang.String, /) -> None: ...
        @typing.overload
        def addIds(self, ids: java.util.Collection[java.lang.String], /) -> RemoveByDocumentIdRequest.Builder: ...
        @typing.overload
        def addIds(self, *ids: java.lang.String) -> RemoveByDocumentIdRequest.Builder: ...
        def build(self) -> RemoveByDocumentIdRequest: ...

class ReportSystemUsageRequest(java.lang.Object):
    def getDatabaseName(self) -> str: ...
    def getDocumentId(self) -> str: ...
    def getNamespace(self) -> str: ...
    def getPackageName(self) -> str: ...
    def getUsageTimestampMillis(self) -> int: ...

    class Builder(java.lang.Object):
        def __init__(self, packageName: str | java.lang.String, databaseName: str | java.lang.String, namespace: str | java.lang.String, documentId: str | java.lang.String, /) -> None: ...
        def build(self) -> ReportSystemUsageRequest: ...
        def setUsageTimestampMillis(self, usageTimestampMillis: int | java.jlong | java.lang.Long, /) -> ReportSystemUsageRequest.Builder: ...

class ReportUsageRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ReportUsageRequest]] = ...
    def describeContents(self) -> int: ...
    def getDocumentId(self) -> str: ...
    def getNamespace(self) -> str: ...
    def getUsageTimestampMillis(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, namespace: str | java.lang.String, documentId: str | java.lang.String, /) -> None: ...
        def build(self) -> ReportUsageRequest: ...
        def setUsageTimestampMillis(self, usageTimestampMillis: int | java.jlong | java.lang.Long, /) -> ReportUsageRequest.Builder: ...

class SchemaVisibilityConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SchemaVisibilityConfig]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAllowedPackages(self) -> java.util.List[PackageIdentifier]: ...
    def getPubliclyVisibleTargetPackage(self) -> PackageIdentifier | None: ...
    def getRequiredPermissions(self) -> java.util.Set[java.util.Set[java.lang.Integer]]: ...
    def hashCode(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 addAllowedPackage(self, packageIdentifier: PackageIdentifier, /) -> SchemaVisibilityConfig.Builder: ...
        def addRequiredPermissions(self, visibleToPermissions: java.util.Set[java.lang.Integer], /) -> SchemaVisibilityConfig.Builder: ...
        def build(self) -> SchemaVisibilityConfig: ...
        def clearAllowedPackages(self) -> SchemaVisibilityConfig.Builder: ...
        def clearRequiredPermissions(self) -> SchemaVisibilityConfig.Builder: ...
        def setPubliclyVisibleTargetPackage(self, packageIdentifier: PackageIdentifier, /) -> SchemaVisibilityConfig.Builder: ...

class SearchResult(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SearchResult]] = ...
    def describeContents(self) -> int: ...
    def getDatabaseName(self) -> str: ...
    def getGenericDocument(self) -> GenericDocument: ...
    def getInformationalRankingSignals(self) -> java.util.List[java.lang.Double]: ...
    def getJoinedResults(self) -> java.util.List[SearchResult]: ...
    def getMatchInfos(self) -> java.util.List[SearchResult.MatchInfo]: ...
    def getPackageName(self) -> str: ...
    def getParentTypeMap(self) -> java.util.Map[java.lang.String, java.util.List[java.lang.String]]: ...
    def getRankingSignal(self) -> float: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class MatchRange(java.lang.Object):
        def __init__(self, start: int | java.jint | java.lang.Integer, end: int | java.jint | java.lang.Integer, /) -> None: ...
        def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getEnd(self) -> int: ...
        def getStart(self) -> int: ...
        def hashCode(self) -> int: ...
        def toString(self) -> str: ...

    class MatchInfo(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SearchResult.MatchInfo]] = ...
        def describeContents(self) -> int: ...
        def getExactMatch(self) -> java.lang.CharSequence: ...
        def getExactMatchRange(self) -> SearchResult.MatchRange: ...
        def getFullText(self) -> str: ...
        def getPropertyPath(self) -> str: ...
        def getPropertyPathObject(self) -> PropertyPath: ...
        def getSnippet(self) -> java.lang.CharSequence: ...
        def getSnippetRange(self) -> SearchResult.MatchRange: ...
        def getSubmatch(self) -> java.lang.CharSequence: ...
        def getSubmatchRange(self) -> SearchResult.MatchRange: ...
        def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

        class Builder(java.lang.Object):
            def __init__(self, propertyPath: str | java.lang.String, /) -> None: ...
            def build(self) -> SearchResult.MatchInfo: ...
            def setExactMatchRange(self, matchRange: SearchResult.MatchRange, /) -> SearchResult.MatchInfo.Builder: ...
            def setSnippetRange(self, matchRange: SearchResult.MatchRange, /) -> SearchResult.MatchInfo.Builder: ...
            def setSubmatchRange(self, matchRange: SearchResult.MatchRange, /) -> SearchResult.MatchInfo.Builder: ...

    class Builder(java.lang.Object):
        def __init__(self, packageName: str | java.lang.String, databaseName: str | java.lang.String, /) -> None: ...
        def addInformationalRankingSignal(self, rankingSignal: float | java.jdouble | java.lang.Double, /) -> SearchResult.Builder: ...
        def addJoinedResult(self, joinedResult: SearchResult, /) -> SearchResult.Builder: ...
        def addMatchInfo(self, matchInfo: SearchResult.MatchInfo, /) -> SearchResult.Builder: ...
        def build(self) -> SearchResult: ...
        def setGenericDocument(self, document: GenericDocument, /) -> SearchResult.Builder: ...
        def setParentTypeMap(self, parentTypeMap: java.util.Map[java.lang.String, java.util.List[java.lang.String]], /) -> SearchResult.Builder: ...
        def setRankingSignal(self, rankingSignal: float | java.jdouble | java.lang.Double, /) -> SearchResult.Builder: ...

class SearchResults(java.io.Closeable):
    def close(self) -> None: ...
    def getNextPage(self, executor: java.util.concurrent.Executor, callback: java.util.function.Consumer[AppSearchResult[java.util.List[SearchResult]]], /) -> None: ...

class SearchSpec(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SearchSpec]] = ...
    EMBEDDING_SEARCH_METRIC_TYPE_COSINE: typing.ClassVar[int] = ...
    EMBEDDING_SEARCH_METRIC_TYPE_DEFAULT: typing.ClassVar[int] = ...
    EMBEDDING_SEARCH_METRIC_TYPE_DOT_PRODUCT: typing.ClassVar[int] = ...
    EMBEDDING_SEARCH_METRIC_TYPE_EUCLIDEAN: typing.ClassVar[int] = ...
    GROUPING_TYPE_PER_NAMESPACE: typing.ClassVar[int] = ...
    GROUPING_TYPE_PER_PACKAGE: typing.ClassVar[int] = ...
    GROUPING_TYPE_PER_SCHEMA: typing.ClassVar[int] = ...
    ORDER_ASCENDING: typing.ClassVar[int] = ...
    ORDER_DESCENDING: typing.ClassVar[int] = ...
    PROJECTION_SCHEMA_TYPE_WILDCARD: typing.ClassVar[str] = ...
    RANKING_STRATEGY_ADVANCED_RANKING_EXPRESSION: typing.ClassVar[int] = ...
    RANKING_STRATEGY_CREATION_TIMESTAMP: typing.ClassVar[int] = ...
    RANKING_STRATEGY_DOCUMENT_SCORE: typing.ClassVar[int] = ...
    RANKING_STRATEGY_JOIN_AGGREGATE_SCORE: typing.ClassVar[int] = ...
    RANKING_STRATEGY_NONE: typing.ClassVar[int] = ...
    RANKING_STRATEGY_RELEVANCE_SCORE: typing.ClassVar[int] = ...
    RANKING_STRATEGY_SYSTEM_USAGE_COUNT: typing.ClassVar[int] = ...
    RANKING_STRATEGY_SYSTEM_USAGE_LAST_USED_TIMESTAMP: typing.ClassVar[int] = ...
    RANKING_STRATEGY_USAGE_COUNT: typing.ClassVar[int] = ...
    RANKING_STRATEGY_USAGE_LAST_USED_TIMESTAMP: typing.ClassVar[int] = ...
    SCHEMA_TYPE_WILDCARD: typing.ClassVar[str] = ...
    TERM_MATCH_EXACT_ONLY: typing.ClassVar[int] = ...
    TERM_MATCH_PREFIX: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getAdvancedRankingExpression(self) -> str: ...
    def getDefaultEmbeddingSearchMetricType(self) -> int: ...
    def getEmbeddingParameters(self) -> java.util.List[EmbeddingVector]: ...
    def getFilterDocumentIds(self) -> java.util.List[java.lang.String]: ...
    def getFilterNamespaces(self) -> java.util.List[java.lang.String]: ...
    def getFilterPackageNames(self) -> java.util.List[java.lang.String]: ...
    def getFilterProperties(self) -> java.util.Map[java.lang.String, java.util.List[java.lang.String]]: ...
    def getFilterSchemas(self) -> java.util.List[java.lang.String]: ...
    def getInformationalRankingExpressions(self) -> java.util.List[java.lang.String]: ...
    def getJoinSpec(self) -> JoinSpec | None: ...
    def getMaxSnippetSize(self) -> int: ...
    def getOrder(self) -> int: ...
    def getProjectionPaths(self) -> java.util.Map[java.lang.String, java.util.List[PropertyPath]]: ...
    def getProjections(self) -> java.util.Map[java.lang.String, java.util.List[java.lang.String]]: ...
    def getPropertyWeightPaths(self) -> java.util.Map[java.lang.String, java.util.Map[PropertyPath, java.lang.Double]]: ...
    def getPropertyWeights(self) -> java.util.Map[java.lang.String, java.util.Map[java.lang.String, java.lang.Double]]: ...
    def getRankingStrategy(self) -> int: ...
    def getResultCountPerPage(self) -> int: ...
    def getResultGroupingLimit(self) -> int: ...
    def getResultGroupingTypeFlags(self) -> int: ...
    def getSearchSourceLogTag(self) -> str | None: ...
    def getSearchStringParameters(self) -> java.util.List[java.lang.String]: ...
    def getSnippetCount(self) -> int: ...
    def getSnippetCountPerProperty(self) -> int: ...
    def getTermMatch(self) -> int: ...
    def isListFilterHasPropertyFunctionEnabled(self) -> bool: ...
    def isListFilterMatchScoreExpressionFunctionEnabled(self) -> bool: ...
    def isListFilterQueryLanguageEnabled(self) -> bool: ...
    def isNumericSearchEnabled(self) -> bool: ...
    def isScorablePropertyRankingEnabled(self) -> bool: ...
    def isVerbatimSearchEnabled(self) -> bool: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, searchSpec: SearchSpec, /) -> None: ...
        @typing.overload
        def addEmbeddingParameters(self, searchEmbeddings: java.util.Collection[EmbeddingVector], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addEmbeddingParameters(self, *searchEmbeddings: EmbeddingVector) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterDocumentIds(self, documentIds: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterDocumentIds(self, *documentIds: java.lang.String) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterNamespaces(self, namespaces: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterNamespaces(self, *namespaces: java.lang.String) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterPackageNames(self, packageNames: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterPackageNames(self, *packageNames: java.lang.String) -> SearchSpec.Builder: ...
        def addFilterProperties(self, schema: str | java.lang.String, propertyPaths: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        def addFilterPropertyPaths(self, schema: str | java.lang.String, propertyPaths: java.util.Collection[PropertyPath], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterSchemas(self, schemas: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addFilterSchemas(self, *schemas: java.lang.String) -> SearchSpec.Builder: ...
        @typing.overload
        def addInformationalRankingExpressions(self, informationalRankingExpressions: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addInformationalRankingExpressions(self, *informationalRankingExpressions: java.lang.String) -> SearchSpec.Builder: ...
        def addProjection(self, schema: str | java.lang.String, propertyPaths: java.util.Collection[java.lang.String], /) -> SearchSpec.Builder: ...
        def addProjectionPaths(self, schema: str | java.lang.String, propertyPaths: java.util.Collection[PropertyPath], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addSearchStringParameters(self, searchStringParameters: java.util.List[java.lang.String], /) -> SearchSpec.Builder: ...
        @typing.overload
        def addSearchStringParameters(self, *searchStringParameters: java.lang.String) -> SearchSpec.Builder: ...
        def build(self) -> SearchSpec: ...
        def clearEmbeddingParameters(self) -> SearchSpec.Builder: ...
        def clearFilterDocumentIds(self) -> SearchSpec.Builder: ...
        def clearFilterNamespaces(self) -> SearchSpec.Builder: ...
        def clearFilterPackageNames(self) -> SearchSpec.Builder: ...
        def clearFilterProperties(self) -> SearchSpec.Builder: ...
        def clearFilterSchemas(self) -> SearchSpec.Builder: ...
        def clearInformationalRankingExpressions(self) -> SearchSpec.Builder: ...
        def clearJoinSpec(self) -> SearchSpec.Builder: ...
        def clearProjections(self) -> SearchSpec.Builder: ...
        def clearPropertyWeights(self) -> SearchSpec.Builder: ...
        def clearResultGrouping(self) -> SearchSpec.Builder: ...
        def clearSearchSourceLogTag(self) -> SearchSpec.Builder: ...
        def clearSearchStringParameters(self) -> SearchSpec.Builder: ...
        def setDefaultEmbeddingSearchMetricType(self, defaultEmbeddingSearchMetricType: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setJoinSpec(self, joinSpec: JoinSpec, /) -> SearchSpec.Builder: ...
        def setListFilterHasPropertyFunctionEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SearchSpec.Builder: ...
        def setListFilterMatchScoreExpressionFunctionEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SearchSpec.Builder: ...
        def setListFilterQueryLanguageEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SearchSpec.Builder: ...
        def setMaxSnippetSize(self, maxSnippetSize: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setNumericSearchEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SearchSpec.Builder: ...
        def setOrder(self, order: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setPropertyWeightPaths(self, schemaType: str | java.lang.String, propertyPathWeights: java.util.Map[PropertyPath, java.lang.Double], /) -> SearchSpec.Builder: ...
        def setPropertyWeights(self, schemaType: str | java.lang.String, propertyPathWeights: java.util.Map[java.lang.String, java.lang.Double], /) -> SearchSpec.Builder: ...
        @typing.overload
        def setRankingStrategy(self, rankingStrategy: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        @typing.overload
        def setRankingStrategy(self, advancedRankingExpression: str | java.lang.String, /) -> SearchSpec.Builder: ...
        def setResultCountPerPage(self, resultCountPerPage: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setResultGrouping(self, groupingTypeFlags: int | java.jint | java.lang.Integer, limit: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setScorablePropertyRankingEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SearchSpec.Builder: ...
        def setSearchSourceLogTag(self, searchSourceLogTag: str | java.lang.String, /) -> SearchSpec.Builder: ...
        def setSnippetCount(self, snippetCount: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setSnippetCountPerProperty(self, snippetCountPerProperty: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setTermMatch(self, termMatchType: int | java.jint | java.lang.Integer, /) -> SearchSpec.Builder: ...
        def setVerbatimSearchEnabled(self, enabled: bool | java.jboolean | java.lang.Boolean, /) -> SearchSpec.Builder: ...

class SearchSuggestionResult(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SearchSuggestionResult]] = ...
    def describeContents(self) -> int: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getSuggestedResult(self) -> str: ...
    def hashCode(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) -> SearchSuggestionResult: ...
        def setSuggestedResult(self, suggestedResult: str | java.lang.String, /) -> SearchSuggestionResult.Builder: ...

class SearchSuggestionSpec(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SearchSuggestionSpec]] = ...
    SUGGESTION_RANKING_STRATEGY_DOCUMENT_COUNT: typing.ClassVar[int] = ...
    SUGGESTION_RANKING_STRATEGY_NONE: typing.ClassVar[int] = ...
    SUGGESTION_RANKING_STRATEGY_TERM_FREQUENCY: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def getFilterDocumentIds(self) -> java.util.Map[java.lang.String, java.util.List[java.lang.String]]: ...
    def getFilterNamespaces(self) -> java.util.List[java.lang.String]: ...
    def getFilterProperties(self) -> java.util.Map[java.lang.String, java.util.List[java.lang.String]]: ...
    def getFilterSchemas(self) -> java.util.List[java.lang.String]: ...
    def getMaximumResultCount(self) -> int: ...
    def getRankingStrategy(self) -> int: ...
    def getSearchStringParameters(self) -> java.util.List[java.lang.String]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self, maximumResultCount: int | java.jint | java.lang.Integer, /) -> None: ...
        @typing.overload
        def addFilterDocumentIds(self, namespace: str | java.lang.String, documentIds: java.util.Collection[java.lang.String], /) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addFilterDocumentIds(self, namespace: str | java.lang.String, /, *documentIds: java.lang.String) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addFilterNamespaces(self, namespaces: java.util.Collection[java.lang.String], /) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addFilterNamespaces(self, *namespaces: java.lang.String) -> SearchSuggestionSpec.Builder: ...
        def addFilterProperties(self, schema: str | java.lang.String, propertyPaths: java.util.Collection[java.lang.String], /) -> SearchSuggestionSpec.Builder: ...
        def addFilterPropertyPaths(self, schema: str | java.lang.String, propertyPaths: java.util.Collection[PropertyPath], /) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addFilterSchemas(self, schemaTypes: java.util.Collection[java.lang.String], /) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addFilterSchemas(self, *schemaTypes: java.lang.String) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addSearchStringParameters(self, searchStringParameters: java.util.List[java.lang.String], /) -> SearchSuggestionSpec.Builder: ...
        @typing.overload
        def addSearchStringParameters(self, *searchStringParameters: java.lang.String) -> SearchSuggestionSpec.Builder: ...
        def build(self) -> SearchSuggestionSpec: ...
        def setRankingStrategy(self, rankingStrategy: int | java.jint | java.lang.Integer, /) -> SearchSuggestionSpec.Builder: ...

class SetBlobVisibilityRequest(java.lang.Object):
    def getNamespacesNotDisplayedBySystem(self) -> java.util.Set[java.lang.String]: ...
    def getNamespacesVisibleToConfigs(self) -> java.util.Map[java.lang.String, java.util.Set[SchemaVisibilityConfig]]: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def addNamespaceVisibleToConfig(self, namespace: str | java.lang.String, visibilityConfig: SchemaVisibilityConfig, /) -> SetBlobVisibilityRequest.Builder: ...
        def build(self) -> SetBlobVisibilityRequest: ...
        def clearNamespaceVisibleToConfigs(self, namespace: str | java.lang.String, /) -> SetBlobVisibilityRequest.Builder: ...
        def setNamespaceDisplayedBySystem(self, namespace: str | java.lang.String, displayed: bool | java.jboolean | java.lang.Boolean, /) -> SetBlobVisibilityRequest.Builder: ...

class SetSchemaRequest(java.lang.Object):
    READ_ASSISTANT_APP_SEARCH_DATA: typing.ClassVar[int] = ...
    READ_CALENDAR: typing.ClassVar[int] = ...
    READ_CONTACTS: typing.ClassVar[int] = ...
    READ_EXTERNAL_STORAGE: typing.ClassVar[int] = ...
    READ_HOME_APP_SEARCH_DATA: typing.ClassVar[int] = ...
    READ_SMS: typing.ClassVar[int] = ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getMigrators(self) -> java.util.Map[java.lang.String, Migrator]: ...
    def getPubliclyVisibleSchemas(self) -> java.util.Map[java.lang.String, PackageIdentifier]: ...
    def getRequiredPermissionsForSchemaTypeVisibility(self) -> java.util.Map[java.lang.String, java.util.Set[java.util.Set[java.lang.Integer]]]: ...
    def getSchemas(self) -> java.util.Set[AppSearchSchema]: ...
    def getSchemasNotDisplayedBySystem(self) -> java.util.Set[java.lang.String]: ...
    def getSchemasVisibleToConfigs(self) -> java.util.Map[java.lang.String, java.util.Set[SchemaVisibilityConfig]]: ...
    def getSchemasVisibleToPackages(self) -> java.util.Map[java.lang.String, java.util.Set[PackageIdentifier]]: ...
    def getVersion(self) -> int: ...
    def hashCode(self) -> int: ...
    def isForceOverride(self) -> bool: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, request: SetSchemaRequest, /) -> None: ...
        def addRequiredPermissionsForSchemaTypeVisibility(self, schemaType: str | java.lang.String, permissions: java.util.Set[java.lang.Integer], /) -> SetSchemaRequest.Builder: ...
        def addSchemaTypeVisibleToConfig(self, schemaType: str | java.lang.String, schemaVisibilityConfig: SchemaVisibilityConfig, /) -> SetSchemaRequest.Builder: ...
        @typing.overload
        def addSchemas(self, schemas: java.util.Collection[AppSearchSchema], /) -> SetSchemaRequest.Builder: ...
        @typing.overload
        def addSchemas(self, *schemas: AppSearchSchema) -> SetSchemaRequest.Builder: ...
        def build(self) -> SetSchemaRequest: ...
        def clearMigrators(self) -> SetSchemaRequest.Builder: ...
        def clearRequiredPermissionsForSchemaTypeVisibility(self, schemaType: str | java.lang.String, /) -> SetSchemaRequest.Builder: ...
        def clearSchemaTypeVisibleToConfigs(self, schemaType: str | java.lang.String, /) -> SetSchemaRequest.Builder: ...
        def clearSchemas(self) -> SetSchemaRequest.Builder: ...
        def setForceOverride(self, forceOverride: bool | java.jboolean | java.lang.Boolean, /) -> SetSchemaRequest.Builder: ...
        def setMigrator(self, schemaType: str | java.lang.String, migrator: Migrator, /) -> SetSchemaRequest.Builder: ...
        def setMigrators(self, migrators: java.util.Map[java.lang.String, Migrator], /) -> SetSchemaRequest.Builder: ...
        def setPubliclyVisibleSchema(self, schema: str | java.lang.String, packageIdentifier: PackageIdentifier, /) -> SetSchemaRequest.Builder: ...
        def setSchemaTypeDisplayedBySystem(self, schemaType: str | java.lang.String, displayed: bool | java.jboolean | java.lang.Boolean, /) -> SetSchemaRequest.Builder: ...
        def setSchemaTypeVisibilityForPackage(self, schemaType: str | java.lang.String, visible: bool | java.jboolean | java.lang.Boolean, packageIdentifier: PackageIdentifier, /) -> SetSchemaRequest.Builder: ...
        def setVersion(self, version: int | java.jint | java.lang.Integer, /) -> SetSchemaRequest.Builder: ...

class SetSchemaResponse(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SetSchemaResponse]] = ...
    def describeContents(self) -> int: ...
    def getDeletedTypes(self) -> java.util.Set[java.lang.String]: ...
    def getIncompatibleTypes(self) -> java.util.Set[java.lang.String]: ...
    def getMigratedTypes(self) -> java.util.Set[java.lang.String]: ...
    def getMigrationFailures(self) -> java.util.List[SetSchemaResponse.MigrationFailure]: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class MigrationFailure(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SetSchemaResponse.MigrationFailure]] = ...
        def __init__(self, namespace: str | java.lang.String, documentId: str | java.lang.String, schemaType: str | java.lang.String, failedResult: AppSearchResult[java.lang.Object], /) -> None: ...
        def describeContents(self) -> int: ...
        def getAppSearchResult(self) -> AppSearchResult[java.lang.Void]: ...
        def getDocumentId(self) -> str: ...
        def getNamespace(self) -> str: ...
        def getSchemaType(self) -> str: ...
        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) -> None: ...
        def addDeletedType(self, deletedType: str | java.lang.String, /) -> SetSchemaResponse.Builder: ...
        def addDeletedTypes(self, deletedTypes: java.util.Collection[java.lang.String], /) -> SetSchemaResponse.Builder: ...
        def addIncompatibleType(self, incompatibleType: str | java.lang.String, /) -> SetSchemaResponse.Builder: ...
        def addIncompatibleTypes(self, incompatibleTypes: java.util.Collection[java.lang.String], /) -> SetSchemaResponse.Builder: ...
        def addMigratedType(self, migratedType: str | java.lang.String, /) -> SetSchemaResponse.Builder: ...
        def addMigratedTypes(self, migratedTypes: java.util.Collection[java.lang.String], /) -> SetSchemaResponse.Builder: ...
        def addMigrationFailure(self, migrationFailure: SetSchemaResponse.MigrationFailure, /) -> SetSchemaResponse.Builder: ...
        def addMigrationFailures(self, migrationFailures: java.util.Collection[SetSchemaResponse.MigrationFailure], /) -> SetSchemaResponse.Builder: ...
        def build(self) -> SetSchemaResponse: ...

class StorageInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[StorageInfo]] = ...
    def describeContents(self) -> int: ...
    def getAliveDocumentsCount(self) -> int: ...
    def getAliveNamespacesCount(self) -> int: ...
    def getBlobsCount(self) -> int: ...
    def getBlobsSizeBytes(self) -> int: ...
    def getSizeBytes(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) -> StorageInfo: ...
        def setAliveDocumentsCount(self, aliveDocumentsCount: int | java.jint | java.lang.Integer, /) -> StorageInfo.Builder: ...
        def setAliveNamespacesCount(self, aliveNamespacesCount: int | java.jint | java.lang.Integer, /) -> StorageInfo.Builder: ...
        def setBlobsCount(self, blobsCount: int | java.jint | java.lang.Integer, /) -> StorageInfo.Builder: ...
        def setBlobsSizeBytes(self, blobsSizeBytes: int | java.jlong | java.lang.Long, /) -> StorageInfo.Builder: ...
        def setSizeBytes(self, sizeBytes: int | java.jlong | java.lang.Long, /) -> StorageInfo.Builder: ...
