Stay organized with collections
Save and categorize content based on your preferences.
DeletedMedicalResource
class DeletedMedicalResource
A change log holds the MedicalResourceId
of a deleted medical resource. For privacy, only unique identifiers of deleted medical resources are returned.
Clients holding copies of data from Health Connect should keep a copy of these unique identifiers along with their contents. When receiving a DeletedMedicalResource
in ChangeLogsResponse
, use the identifiers to delete copy of the data.
Summary
Public constructors
DeletedMedicalResource
DeletedMedicalResource(
deletedMedicalResourceId: MedicalResourceId,
deletedTime: Instant)
Creates a DeletedMedicalResource
.
Exceptions |
java.lang.NullPointerException |
if deletedMedicalResourceId or deletedTime is null. |
Public methods
getDataSourceId
fun getDataSourceId(): String
Returns data source id of the deleted resource.
Return |
String |
This value cannot be null . |
getDeletedTime
fun getDeletedTime(): Instant
Returns timestamp when the medical resource was deleted.
Return |
Instant |
This value cannot be null . |
hashCode
fun hashCode(): Int
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# ChangeLogsResponse.DeletedMedicalResource\n\nAdded in [U Extensions 19](https://developer.android.com/sdkExtensions)\n\nDeletedMedicalResource\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/changelog/ChangeLogsResponse.DeletedMedicalResource \"View this page in Java\") \n\n```\nclass DeletedMedicalResource\n```\n\n|---|---------------------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.health.connect.changelog.ChangeLogsResponse.DeletedMedicalResource](#) |\n\nA change log holds the [MedicalResourceId](../MedicalResourceId.html#) of a deleted medical resource. For privacy, only unique identifiers of deleted medical resources are returned.\n\nClients holding copies of data from Health Connect should keep a copy of these unique identifiers along with their contents. When receiving a [DeletedMedicalResource](#) in [ChangeLogsResponse](/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse), use the identifiers to delete copy of the data.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeletedMedicalResource](#DeletedMedicalResource(android.health.connect.MedicalResourceId,%20java.time.Instant))`(`deletedMedicalResourceId:` `[MedicalResourceId](../MedicalResourceId.html#)`, `deletedTime:` `[Instant](../../../../java/time/Instant.html#)`)` Creates a [DeletedMedicalResource](#). |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getDataSourceId](#getDataSourceId())`()` Returns data source id of the deleted resource. |\n| [MedicalResourceId](../MedicalResourceId.html#) | [getDeletedMedicalResourceId](#getDeletedMedicalResourceId())`()` Returns [MedicalResourceId](../MedicalResourceId.html#) of the deleted resource. |\n| [Instant](../../../../java/time/Instant.html#) | [getDeletedTime](#getDeletedTime())`()` Returns timestamp when the medical resource was deleted. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### DeletedMedicalResource\n\nAdded in [U Extensions 19](https://developer.android.com/sdkExtensions) \n\n```\nDeletedMedicalResource(\n deletedMedicalResourceId: MedicalResourceId, \n deletedTime: Instant)\n```\n\nCreates a [DeletedMedicalResource](#).\n\n| Parameters ||\n|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deletedMedicalResourceId` | [MedicalResourceId](../MedicalResourceId.html#): the [MedicalResourceId](../MedicalResourceId.html#) of the deleted medical resource. This value cannot be `null`. |\n| `deletedTime` | [Instant](../../../../java/time/Instant.html#): the [Instant](../../../../java/time/Instant.html#) when the medical resource was deleted. This value cannot be `null`. |\n\n| Exceptions ||\n|----------------------------------|---------------------------------------------------------|\n| `java.lang.NullPointerException` | if `deletedMedicalResourceId` or `deletedTime` is null. |\n\nPublic methods\n--------------\n\n### equals\n\n```\nfun equals(other: Any?): Boolean\n``` \n\n### getDataSourceId\n\nAdded in [U Extensions 19](https://developer.android.com/sdkExtensions) \n\n```\nfun getDataSourceId(): String\n```\n\nReturns data source id of the deleted resource.\n\n| Return ||\n|----------------------------------------------------------------------------------|------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be `null`. |\n\n### getDeletedMedicalResourceId\n\nAdded in [U Extensions 19](https://developer.android.com/sdkExtensions) \n\n```\nfun getDeletedMedicalResourceId(): MedicalResourceId\n```\n\nReturns [MedicalResourceId](../MedicalResourceId.html#) of the deleted resource.\n\n| Return ||\n|-------------------------------------------------|------------------------------|\n| [MedicalResourceId](../MedicalResourceId.html#) | This value cannot be `null`. |\n\n### getDeletedTime\n\nAdded in [U Extensions 19](https://developer.android.com/sdkExtensions) \n\n```\nfun getDeletedTime(): Instant\n```\n\nReturns timestamp when the medical resource was deleted.\n\n| Return ||\n|------------------------------------------------|------------------------------|\n| [Instant](../../../../java/time/Instant.html#) | This value cannot be `null`. |\n\n### hashCode\n\n```\nfun hashCode(): Int\n```"]]