import typing

import android.health.connect.changelog
import android.health.connect.datatypes
import android.net
import android.os
import java
import java.lang
import java.time
import java.util
import java.util.concurrent

_AggregateRecordsGroupedByDurationResponse__T = typing.TypeVar('_AggregateRecordsGroupedByDurationResponse__T')  # <T>
class AggregateRecordsGroupedByDurationResponse(java.lang.Object, typing.Generic[_AggregateRecordsGroupedByDurationResponse__T]):
    def get(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsGroupedByDurationResponse__T], /) -> _AggregateRecordsGroupedByDurationResponse__T | None: ...
    def getDataOrigins(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsGroupedByDurationResponse__T], /) -> java.util.Set[android.health.connect.datatypes.DataOrigin]: ...
    def getEndTime(self) -> java.time.Instant: ...
    def getStartTime(self) -> java.time.Instant: ...
    def getZoneOffset(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsGroupedByDurationResponse__T], /) -> java.time.ZoneOffset | None: ...

_AggregateRecordsGroupedByPeriodResponse__T = typing.TypeVar('_AggregateRecordsGroupedByPeriodResponse__T')  # <T>
class AggregateRecordsGroupedByPeriodResponse(java.lang.Object, typing.Generic[_AggregateRecordsGroupedByPeriodResponse__T]):
    def get(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsGroupedByPeriodResponse__T], /) -> _AggregateRecordsGroupedByPeriodResponse__T | None: ...
    def getDataOrigins(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsGroupedByPeriodResponse__T], /) -> java.util.Set[android.health.connect.datatypes.DataOrigin]: ...
    def getEndTime(self) -> java.time.LocalDateTime: ...
    def getStartTime(self) -> java.time.LocalDateTime: ...
    def getZoneOffset(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsGroupedByPeriodResponse__T], /) -> java.time.ZoneOffset | None: ...

_AggregateRecordsRequest__T = typing.TypeVar('_AggregateRecordsRequest__T')  # <T>

_AggregateRecordsRequest__Builder__T = typing.TypeVar('_AggregateRecordsRequest__Builder__T')  # <T>
class AggregateRecordsRequest(java.lang.Object, typing.Generic[_AggregateRecordsRequest__T]):
    def getAggregationTypes(self) -> java.util.Set[android.health.connect.datatypes.AggregationType[_AggregateRecordsRequest__T]]: ...
    def getDataOriginsFilters(self) -> java.util.Set[android.health.connect.datatypes.DataOrigin]: ...
    def getTimeRangeFilter(self) -> TimeRangeFilter: ...
    class Builder(java.lang.Object, typing.Generic[_AggregateRecordsRequest__Builder__T]):
        def __init__(self, timeRangeFilter: TimeRangeFilter, /) -> None: ...
        def addAggregationType(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsRequest__Builder__T], /) -> AggregateRecordsRequest.Builder[_AggregateRecordsRequest__Builder__T]: ...
        def addDataOriginsFilter(self, dataOriginsFilter: android.health.connect.datatypes.DataOrigin, /) -> AggregateRecordsRequest.Builder[_AggregateRecordsRequest__Builder__T]: ...
        def build(self) -> AggregateRecordsRequest[_AggregateRecordsRequest__Builder__T]: ...

_AggregateRecordsResponse__T = typing.TypeVar('_AggregateRecordsResponse__T')  # <T>
class AggregateRecordsResponse(java.lang.Object, typing.Generic[_AggregateRecordsResponse__T]):
    def get(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsResponse__T], /) -> _AggregateRecordsResponse__T | None: ...
    def getDataOrigins(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsResponse__T], /) -> java.util.Set[android.health.connect.datatypes.DataOrigin]: ...
    def getZoneOffset(self, aggregationType: android.health.connect.datatypes.AggregationType[_AggregateRecordsResponse__T], /) -> java.time.ZoneOffset | None: ...

class CreateMedicalDataSourceRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CreateMedicalDataSourceRequest]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDisplayName(self) -> str: ...
    def getFhirBaseUri(self) -> android.net.Uri: ...
    def getFhirVersion(self) -> android.health.connect.datatypes.FhirVersion: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    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, other: CreateMedicalDataSourceRequest.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, other: CreateMedicalDataSourceRequest, /) -> None: ...
        @typing.overload
        def __init__(self, fhirBaseUri: android.net.Uri, displayName: str | java.lang.String, fhirVersion: android.health.connect.datatypes.FhirVersion, /) -> None: ...
        def build(self) -> CreateMedicalDataSourceRequest: ...
        def setDisplayName(self, displayName: str | java.lang.String, /) -> CreateMedicalDataSourceRequest.Builder: ...
        def setFhirBaseUri(self, fhirBaseUri: android.net.Uri, /) -> CreateMedicalDataSourceRequest.Builder: ...
        def setFhirVersion(self, fhirVersion: android.health.connect.datatypes.FhirVersion, /) -> CreateMedicalDataSourceRequest.Builder: ...

class DeleteMedicalResourcesRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DeleteMedicalResourcesRequest]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDataSourceIds(self) -> java.util.Set[java.lang.String]: ...
    def getMedicalResourceTypes(self) -> java.util.Set[java.lang.Integer]: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    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, other: DeleteMedicalResourcesRequest.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, other: DeleteMedicalResourcesRequest, /) -> None: ...
        def addDataSourceId(self, dataSourceId: str | java.lang.String, /) -> DeleteMedicalResourcesRequest.Builder: ...
        def addMedicalResourceType(self, resourceType: int | java.jint | java.lang.Integer, /) -> DeleteMedicalResourcesRequest.Builder: ...
        def build(self) -> DeleteMedicalResourcesRequest: ...
        def clearDataSourceIds(self) -> DeleteMedicalResourcesRequest.Builder: ...
        def clearMedicalResourceTypes(self) -> DeleteMedicalResourcesRequest.Builder: ...

class GetMedicalDataSourcesRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[GetMedicalDataSourcesRequest]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getPackageNames(self) -> java.util.Set[java.lang.String]: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    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, other: GetMedicalDataSourcesRequest.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, other: GetMedicalDataSourcesRequest, /) -> None: ...
        def addPackageName(self, packageName: str | java.lang.String, /) -> GetMedicalDataSourcesRequest.Builder: ...
        def build(self) -> GetMedicalDataSourcesRequest: ...
        def clearPackageNames(self) -> GetMedicalDataSourcesRequest.Builder: ...

class HealthConnectException(java.lang.RuntimeException):
    ERROR_DATA_SYNC_IN_PROGRESS: typing.ClassVar[int] = ...
    ERROR_INTERNAL: typing.ClassVar[int] = ...
    ERROR_INVALID_ARGUMENT: typing.ClassVar[int] = ...
    ERROR_IO: typing.ClassVar[int] = ...
    ERROR_RATE_LIMIT_EXCEEDED: typing.ClassVar[int] = ...
    ERROR_REMOTE: typing.ClassVar[int] = ...
    ERROR_SECURITY: typing.ClassVar[int] = ...
    ERROR_UNKNOWN: typing.ClassVar[int] = ...
    ERROR_UNSUPPORTED_OPERATION: typing.ClassVar[int] = ...
    def getErrorCode(self) -> int: ...

class HealthConnectManager(java.lang.Object):
    ACTION_MANAGE_HEALTH_PERMISSIONS: typing.ClassVar[str] = ...
    ACTION_REQUEST_EXERCISE_ROUTE: typing.ClassVar[str] = ...
    CATEGORY_HEALTH_PERMISSIONS: typing.ClassVar[str] = ...
    EXTRA_EXERCISE_ROUTE: typing.ClassVar[str] = ...
    EXTRA_SESSION_ID: typing.ClassVar[str] = ...
    _aggregate__T = typing.TypeVar('_aggregate__T')  # <T>
    def aggregate(self, request: AggregateRecordsRequest[_aggregate__T], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[AggregateRecordsResponse[_aggregate__T], HealthConnectException], /) -> None: ...
    _aggregateGroupByDuration__T = typing.TypeVar('_aggregateGroupByDuration__T')  # <T>
    def aggregateGroupByDuration(self, request: AggregateRecordsRequest[_aggregateGroupByDuration__T], duration: java.time.Duration, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.util.List[AggregateRecordsGroupedByDurationResponse[_aggregateGroupByDuration__T]], HealthConnectException], /) -> None: ...
    _aggregateGroupByPeriod__T = typing.TypeVar('_aggregateGroupByPeriod__T')  # <T>
    def aggregateGroupByPeriod(self, request: AggregateRecordsRequest[_aggregateGroupByPeriod__T], period: java.time.Period, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.util.List[AggregateRecordsGroupedByPeriodResponse[_aggregateGroupByPeriod__T]], HealthConnectException], /) -> None: ...
    def createMedicalDataSource(self, request: CreateMedicalDataSourceRequest, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[android.health.connect.datatypes.MedicalDataSource, HealthConnectException], /) -> None: ...
    def deleteMedicalDataSourceWithData(self, id: str | java.lang.String, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, HealthConnectException], /) -> None: ...
    @typing.overload
    def deleteMedicalResources(self, request: DeleteMedicalResourcesRequest, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, HealthConnectException], /) -> None: ...
    @typing.overload
    def deleteMedicalResources(self, ids: java.util.List[MedicalResourceId], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, HealthConnectException], /) -> None: ...
    @typing.overload
    def deleteRecords(self, recordIds: java.util.List[RecordIdFilter], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, HealthConnectException], /) -> None: ...
    @typing.overload
    def deleteRecords(self, recordType: typing.Type[android.health.connect.datatypes.Record], timeRangeFilter: TimeRangeFilter, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, HealthConnectException], /) -> None: ...
    def getChangeLogToken(self, request: android.health.connect.changelog.ChangeLogTokenRequest, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[android.health.connect.changelog.ChangeLogTokenResponse, HealthConnectException], /) -> None: ...
    def getChangeLogs(self, changeLogsRequest: android.health.connect.changelog.ChangeLogsRequest, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[android.health.connect.changelog.ChangeLogsResponse, HealthConnectException], /) -> None: ...
    @typing.overload
    def getMedicalDataSources(self, request: GetMedicalDataSourcesRequest, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.util.List[android.health.connect.datatypes.MedicalDataSource], HealthConnectException], /) -> None: ...
    @typing.overload
    def getMedicalDataSources(self, ids: java.util.List[java.lang.String], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.util.List[android.health.connect.datatypes.MedicalDataSource], HealthConnectException], /) -> None: ...
    def insertRecords(self, records: java.util.List[android.health.connect.datatypes.Record], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[InsertRecordsResponse, HealthConnectException], /) -> None: ...
    @typing.overload
    def readMedicalResources(self, request: ReadMedicalResourcesRequest, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[ReadMedicalResourcesResponse, HealthConnectException], /) -> None: ...
    @typing.overload
    def readMedicalResources(self, ids: java.util.List[MedicalResourceId], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.util.List[android.health.connect.datatypes.MedicalResource], HealthConnectException], /) -> None: ...
    _readRecords__T = typing.TypeVar('_readRecords__T', bound=android.health.connect.datatypes.Record)  # <T>
    def readRecords(self, request: ReadRecordsRequest[_readRecords__T], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[ReadRecordsResponse[_readRecords__T], HealthConnectException], /) -> None: ...
    def updateRecords(self, records: java.util.List[android.health.connect.datatypes.Record], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.lang.Void, HealthConnectException], /) -> None: ...
    def upsertMedicalResources(self, requests: java.util.List[UpsertMedicalResourceRequest], executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[java.util.List[android.health.connect.datatypes.MedicalResource], HealthConnectException], /) -> None: ...

class HealthPermissions(java.lang.Object):
    READ_ACTIVE_CALORIES_BURNED: typing.ClassVar[str] = ...
    READ_ACTIVITY_INTENSITY: typing.ClassVar[str] = ...
    READ_BASAL_BODY_TEMPERATURE: typing.ClassVar[str] = ...
    READ_BASAL_METABOLIC_RATE: typing.ClassVar[str] = ...
    READ_BLOOD_GLUCOSE: typing.ClassVar[str] = ...
    READ_BLOOD_PRESSURE: typing.ClassVar[str] = ...
    READ_BODY_FAT: typing.ClassVar[str] = ...
    READ_BODY_TEMPERATURE: typing.ClassVar[str] = ...
    READ_BODY_WATER_MASS: typing.ClassVar[str] = ...
    READ_BONE_MASS: typing.ClassVar[str] = ...
    READ_CERVICAL_MUCUS: typing.ClassVar[str] = ...
    READ_DISTANCE: typing.ClassVar[str] = ...
    READ_ELEVATION_GAINED: typing.ClassVar[str] = ...
    READ_EXERCISE: typing.ClassVar[str] = ...
    READ_EXERCISE_ROUTES: typing.ClassVar[str] = ...
    READ_FLOORS_CLIMBED: typing.ClassVar[str] = ...
    READ_HEALTH_DATA_HISTORY: typing.ClassVar[str] = ...
    READ_HEALTH_DATA_IN_BACKGROUND: typing.ClassVar[str] = ...
    READ_HEART_RATE: typing.ClassVar[str] = ...
    READ_HEART_RATE_VARIABILITY: typing.ClassVar[str] = ...
    READ_HEIGHT: typing.ClassVar[str] = ...
    READ_HYDRATION: typing.ClassVar[str] = ...
    READ_INTERMENSTRUAL_BLEEDING: typing.ClassVar[str] = ...
    READ_LEAN_BODY_MASS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_ALLERGIES_INTOLERANCES: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_CONDITIONS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_LABORATORY_RESULTS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_MEDICATIONS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_PERSONAL_DETAILS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_PRACTITIONER_DETAILS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_PREGNANCY: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_PROCEDURES: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_SOCIAL_HISTORY: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_VACCINES: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_VISITS: typing.ClassVar[str] = ...
    READ_MEDICAL_DATA_VITAL_SIGNS: typing.ClassVar[str] = ...
    READ_MENSTRUATION: typing.ClassVar[str] = ...
    READ_MINDFULNESS: typing.ClassVar[str] = ...
    READ_NUTRITION: typing.ClassVar[str] = ...
    READ_OVULATION_TEST: typing.ClassVar[str] = ...
    READ_OXYGEN_SATURATION: typing.ClassVar[str] = ...
    READ_PLANNED_EXERCISE: typing.ClassVar[str] = ...
    READ_POWER: typing.ClassVar[str] = ...
    READ_RESPIRATORY_RATE: typing.ClassVar[str] = ...
    READ_RESTING_HEART_RATE: typing.ClassVar[str] = ...
    READ_SEXUAL_ACTIVITY: typing.ClassVar[str] = ...
    READ_SKIN_TEMPERATURE: typing.ClassVar[str] = ...
    READ_SLEEP: typing.ClassVar[str] = ...
    READ_SPEED: typing.ClassVar[str] = ...
    READ_STEPS: typing.ClassVar[str] = ...
    READ_TOTAL_CALORIES_BURNED: typing.ClassVar[str] = ...
    READ_VO2_MAX: typing.ClassVar[str] = ...
    READ_WEIGHT: typing.ClassVar[str] = ...
    READ_WHEELCHAIR_PUSHES: typing.ClassVar[str] = ...
    WRITE_ACTIVE_CALORIES_BURNED: typing.ClassVar[str] = ...
    WRITE_ACTIVITY_INTENSITY: typing.ClassVar[str] = ...
    WRITE_BASAL_BODY_TEMPERATURE: typing.ClassVar[str] = ...
    WRITE_BASAL_METABOLIC_RATE: typing.ClassVar[str] = ...
    WRITE_BLOOD_GLUCOSE: typing.ClassVar[str] = ...
    WRITE_BLOOD_PRESSURE: typing.ClassVar[str] = ...
    WRITE_BODY_FAT: typing.ClassVar[str] = ...
    WRITE_BODY_TEMPERATURE: typing.ClassVar[str] = ...
    WRITE_BODY_WATER_MASS: typing.ClassVar[str] = ...
    WRITE_BONE_MASS: typing.ClassVar[str] = ...
    WRITE_CERVICAL_MUCUS: typing.ClassVar[str] = ...
    WRITE_DISTANCE: typing.ClassVar[str] = ...
    WRITE_ELEVATION_GAINED: typing.ClassVar[str] = ...
    WRITE_EXERCISE: typing.ClassVar[str] = ...
    WRITE_EXERCISE_ROUTE: typing.ClassVar[str] = ...
    WRITE_FLOORS_CLIMBED: typing.ClassVar[str] = ...
    WRITE_HEART_RATE: typing.ClassVar[str] = ...
    WRITE_HEART_RATE_VARIABILITY: typing.ClassVar[str] = ...
    WRITE_HEIGHT: typing.ClassVar[str] = ...
    WRITE_HYDRATION: typing.ClassVar[str] = ...
    WRITE_INTERMENSTRUAL_BLEEDING: typing.ClassVar[str] = ...
    WRITE_LEAN_BODY_MASS: typing.ClassVar[str] = ...
    WRITE_MEDICAL_DATA: typing.ClassVar[str] = ...
    WRITE_MENSTRUATION: typing.ClassVar[str] = ...
    WRITE_MINDFULNESS: typing.ClassVar[str] = ...
    WRITE_NUTRITION: typing.ClassVar[str] = ...
    WRITE_OVULATION_TEST: typing.ClassVar[str] = ...
    WRITE_OXYGEN_SATURATION: typing.ClassVar[str] = ...
    WRITE_PLANNED_EXERCISE: typing.ClassVar[str] = ...
    WRITE_POWER: typing.ClassVar[str] = ...
    WRITE_RESPIRATORY_RATE: typing.ClassVar[str] = ...
    WRITE_RESTING_HEART_RATE: typing.ClassVar[str] = ...
    WRITE_SEXUAL_ACTIVITY: typing.ClassVar[str] = ...
    WRITE_SKIN_TEMPERATURE: typing.ClassVar[str] = ...
    WRITE_SLEEP: typing.ClassVar[str] = ...
    WRITE_SPEED: typing.ClassVar[str] = ...
    WRITE_STEPS: typing.ClassVar[str] = ...
    WRITE_TOTAL_CALORIES_BURNED: typing.ClassVar[str] = ...
    WRITE_VO2_MAX: typing.ClassVar[str] = ...
    WRITE_WEIGHT: typing.ClassVar[str] = ...
    WRITE_WHEELCHAIR_PUSHES: typing.ClassVar[str] = ...

class InsertRecordsResponse(java.lang.Object):
    def getRecords(self) -> java.util.List[android.health.connect.datatypes.Record]: ...

class LocalTimeRangeFilter(TimeRangeFilter):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getEndTime(self) -> java.time.LocalDateTime | None: ...
    def getStartTime(self) -> java.time.LocalDateTime | None: ...
    def hashCode(self) -> int: ...
    def isBounded(self) -> bool: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> LocalTimeRangeFilter: ...
        def setEndTime(self, localEndTime: java.time.LocalDateTime, /) -> LocalTimeRangeFilter.Builder: ...
        def setStartTime(self, localStartTime: java.time.LocalDateTime, /) -> LocalTimeRangeFilter.Builder: ...

class MedicalResourceId(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[MedicalResourceId]] = ...
    def __init__(self, dataSourceId: str | java.lang.String, fhirResourceType: int | java.jint | java.lang.Integer, fhirResourceId: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    @staticmethod
    def fromFhirReference(dataSourceId: str | java.lang.String, fhirReference: str | java.lang.String, /) -> MedicalResourceId: ...
    def getDataSourceId(self) -> str: ...
    def getFhirResourceId(self) -> str: ...
    def getFhirResourceType(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class ReadMedicalResourcesInitialRequest(ReadMedicalResourcesRequest):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDataSourceIds(self) -> java.util.Set[java.lang.String]: ...
    def getMedicalResourceType(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, medicalResourceType: int | java.jint | java.lang.Integer, /) -> None: ...
        @typing.overload
        def __init__(self, other: ReadMedicalResourcesInitialRequest.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, other: ReadMedicalResourcesInitialRequest, /) -> None: ...
        def addDataSourceId(self, dataSourceId: str | java.lang.String, /) -> ReadMedicalResourcesInitialRequest.Builder: ...
        def addDataSourceIds(self, dataSourceIds: java.util.Set[java.lang.String], /) -> ReadMedicalResourcesInitialRequest.Builder: ...
        def build(self) -> ReadMedicalResourcesInitialRequest: ...
        def clearDataSourceIds(self) -> ReadMedicalResourcesInitialRequest.Builder: ...
        def setMedicalResourceType(self, medicalResourceType: int | java.jint | java.lang.Integer, /) -> ReadMedicalResourcesInitialRequest.Builder: ...
        def setPageSize(self, pageSize: int | java.jint | java.lang.Integer, /) -> ReadMedicalResourcesInitialRequest.Builder: ...

class ReadMedicalResourcesPageRequest(ReadMedicalResourcesRequest):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getPageToken(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, other: ReadMedicalResourcesPageRequest.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, other: ReadMedicalResourcesPageRequest, /) -> None: ...
        @typing.overload
        def __init__(self, pageToken: str | java.lang.String, /) -> None: ...
        def build(self) -> ReadMedicalResourcesPageRequest: ...
        def setPageSize(self, pageSize: int | java.jint | java.lang.Integer, /) -> ReadMedicalResourcesPageRequest.Builder: ...
        def setPageToken(self, pageToken: str | java.lang.String, /) -> ReadMedicalResourcesPageRequest.Builder: ...

class ReadMedicalResourcesRequest(java.lang.Object):
    def getPageSize(self) -> int: ...

class ReadMedicalResourcesResponse(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ReadMedicalResourcesResponse]] = ...
    def __init__(self, medicalResources: java.util.List[android.health.connect.datatypes.MedicalResource], nextPageToken: str | java.lang.String, remainingCount: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getMedicalResources(self) -> java.util.List[android.health.connect.datatypes.MedicalResource]: ...
    def getNextPageToken(self) -> str: ...
    def getRemainingCount(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

_ReadRecordsRequest__T = typing.TypeVar('_ReadRecordsRequest__T', bound=android.health.connect.datatypes.Record)  # <T>
class ReadRecordsRequest(java.lang.Object, typing.Generic[_ReadRecordsRequest__T]):
    def getRecordType(self) -> typing.Type[_ReadRecordsRequest__T]: ...

_ReadRecordsRequestUsingFilters__T = typing.TypeVar('_ReadRecordsRequestUsingFilters__T', bound=android.health.connect.datatypes.Record)  # <T>

_ReadRecordsRequestUsingFilters__Builder__T = typing.TypeVar('_ReadRecordsRequestUsingFilters__Builder__T', bound=android.health.connect.datatypes.Record)  # <T>
class ReadRecordsRequestUsingFilters(ReadRecordsRequest[_ReadRecordsRequestUsingFilters__T], typing.Generic[_ReadRecordsRequestUsingFilters__T]):
    def getDataOrigins(self) -> java.util.Set[android.health.connect.datatypes.DataOrigin]: ...
    def getPageSize(self) -> int: ...
    def getPageToken(self) -> int: ...
    def getTimeRangeFilter(self) -> TimeRangeFilter | None: ...
    def isAscending(self) -> bool: ...
    class Builder(java.lang.Object, typing.Generic[_ReadRecordsRequestUsingFilters__Builder__T]):
        def __init__(self, recordType: typing.Type[_ReadRecordsRequestUsingFilters__Builder__T], /) -> None: ...
        def addDataOrigins(self, dataOrigin: android.health.connect.datatypes.DataOrigin, /) -> ReadRecordsRequestUsingFilters.Builder[_ReadRecordsRequestUsingFilters__Builder__T]: ...
        def build(self) -> ReadRecordsRequestUsingFilters[_ReadRecordsRequestUsingFilters__Builder__T]: ...
        def setAscending(self, ascending: bool | java.jboolean | java.lang.Boolean, /) -> ReadRecordsRequestUsingFilters.Builder[_ReadRecordsRequestUsingFilters__Builder__T]: ...
        def setPageSize(self, pageSize: int | java.jint | java.lang.Integer, /) -> ReadRecordsRequestUsingFilters.Builder[_ReadRecordsRequestUsingFilters__Builder__T]: ...
        def setPageToken(self, pageToken: int | java.jlong | java.lang.Long, /) -> ReadRecordsRequestUsingFilters.Builder[_ReadRecordsRequestUsingFilters__Builder__T]: ...
        def setTimeRangeFilter(self, timeRangeFilter: TimeRangeFilter, /) -> ReadRecordsRequestUsingFilters.Builder[_ReadRecordsRequestUsingFilters__Builder__T]: ...

_ReadRecordsRequestUsingIds__T = typing.TypeVar('_ReadRecordsRequestUsingIds__T', bound=android.health.connect.datatypes.Record)  # <T>

_ReadRecordsRequestUsingIds__Builder__T = typing.TypeVar('_ReadRecordsRequestUsingIds__Builder__T', bound=android.health.connect.datatypes.Record)  # <T>
class ReadRecordsRequestUsingIds(ReadRecordsRequest[_ReadRecordsRequestUsingIds__T], typing.Generic[_ReadRecordsRequestUsingIds__T]):
    def getRecordIdFilters(self) -> java.util.List[RecordIdFilter]: ...
    class Builder(java.lang.Object, typing.Generic[_ReadRecordsRequestUsingIds__Builder__T]):
        def __init__(self, recordType: typing.Type[_ReadRecordsRequestUsingIds__Builder__T], /) -> None: ...
        def addClientRecordId(self, clientRecordId: str | java.lang.String, /) -> ReadRecordsRequestUsingIds.Builder[_ReadRecordsRequestUsingIds__Builder__T]: ...
        def addId(self, id: str | java.lang.String, /) -> ReadRecordsRequestUsingIds.Builder[_ReadRecordsRequestUsingIds__Builder__T]: ...
        def build(self) -> ReadRecordsRequestUsingIds[_ReadRecordsRequestUsingIds__Builder__T]: ...

_ReadRecordsResponse__T = typing.TypeVar('_ReadRecordsResponse__T', bound=android.health.connect.datatypes.Record)  # <T>
class ReadRecordsResponse(java.lang.Object, typing.Generic[_ReadRecordsResponse__T]):
    def getNextPageToken(self) -> int: ...
    def getRecords(self) -> java.util.List[_ReadRecordsResponse__T]: ...

class RecordIdFilter(java.lang.Object):
    @staticmethod
    def fromClientRecordId(recordType: typing.Type[android.health.connect.datatypes.Record], clientRecordId: str | java.lang.String, /) -> RecordIdFilter: ...
    @staticmethod
    def fromId(recordType: typing.Type[android.health.connect.datatypes.Record], id: str | java.lang.String, /) -> RecordIdFilter: ...
    def getClientRecordId(self) -> str | None: ...
    def getId(self) -> str | None: ...
    def getRecordType(self) -> typing.Type[android.health.connect.datatypes.Record]: ...

class TimeInstantRangeFilter(TimeRangeFilter):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getEndTime(self) -> java.time.Instant | None: ...
    def getStartTime(self) -> java.time.Instant | None: ...
    def hashCode(self) -> int: ...
    def isBounded(self) -> bool: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> TimeInstantRangeFilter: ...
        def setEndTime(self, endTime: java.time.Instant, /) -> TimeInstantRangeFilter.Builder: ...
        def setStartTime(self, startTime: java.time.Instant, /) -> TimeInstantRangeFilter.Builder: ...

class TimeRangeFilter(java.lang.Object): ...

class UpsertMedicalResourceRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[UpsertMedicalResourceRequest]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getData(self) -> str: ...
    def getDataSourceId(self) -> str: ...
    def getFhirVersion(self) -> android.health.connect.datatypes.FhirVersion: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    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, other: UpsertMedicalResourceRequest.Builder, /) -> None: ...
        @typing.overload
        def __init__(self, other: UpsertMedicalResourceRequest, /) -> None: ...
        @typing.overload
        def __init__(self, dataSourceId: str | java.lang.String, fhirVersion: android.health.connect.datatypes.FhirVersion, data: str | java.lang.String, /) -> None: ...
        def build(self) -> UpsertMedicalResourceRequest: ...
        def setData(self, data: str | java.lang.String, /) -> UpsertMedicalResourceRequest.Builder: ...
        def setDataSourceId(self, dataSourceId: str | java.lang.String, /) -> UpsertMedicalResourceRequest.Builder: ...
        def setFhirVersion(self, fhirVersion: android.health.connect.datatypes.FhirVersion, /) -> UpsertMedicalResourceRequest.Builder: ...
