# ChangeLogsResponse.DeletedLog

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# DeletedLog

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/health/connect/changelog/ChangeLogsResponse.DeletedLog "View this page in Java")  

```
class DeletedLog
```

|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                   ||
| ↳ | [android.health.connect.changelog.ChangeLogsResponse.DeletedLog](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#) |

A change log holds the[Metadata.getId()](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/Metadata.html#getId())of a deleted Record. For privacy, only unique identifiers of deleted records 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[DeletedLog](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#)in[ChangeLogsResponse](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse), use the identifiers to delete copy of the data.

## Summary

|                                                                                                                                                                                        Public constructors                                                                                                                                                                                        ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [DeletedLog](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#DeletedLog(kotlin.String,%20java.time.Instant))`(`deletedRecordId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `deletedTime:` `[Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html#)`)` <br /> |
| [DeletedLog](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#DeletedLog(kotlin.String,%20kotlin.Long))`(`deletedRecordId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `deletedTime:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` <br />            |

|                                                                                                                                                         Public methods                                                                                                                                                          ||
|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br /> |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [getDeletedRecordId](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#getDeletedRecordId())`()` Returns record id of the record deleted.                                       |
| [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html#)  | [getDeletedTime](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#getDeletedTime())`()` Returns timestamp when the record was deleted.                                         |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#hashCode())`()` <br />                                                                                             |

## Public constructors

### DeletedLog

Added in[API level 36.1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
DeletedLog(
    deletedRecordId: String, 
    deletedTime: Instant)
```

|                                                            Parameters                                                            ||
|-------------------|---------------------------------------------------------------------------------------------------------------|
| `deletedRecordId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`.  |
| `deletedTime`     | [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html#):This value cannot be`null`. |

### DeletedLog

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
DeletedLog(
    deletedRecordId: String, 
    deletedTime: Long)
```

**Deprecated:** *Use[DeletedLog(java.lang.String,java.time.Instant)](https://developer.android.com/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse.DeletedLog#DeletedLog(kotlin.String,%20java.time.Instant)).*

|                                                           Parameters                                                            ||
|-------------------|--------------------------------------------------------------------------------------------------------------|
| `deletedRecordId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`. |

## Public methods

### equals

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun equals(other: Any?): Boolean
```

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### getDeletedRecordId

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getDeletedRecordId(): String
```

Returns record id of the record deleted.

|                                                    Return                                                     ||
|----------------------------------------------------------------------------------|-----------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be`null`. |

### getDeletedTime

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getDeletedTime(): Instant
```

Returns timestamp when the record was deleted.

|                                                     Return                                                     ||
|-----------------------------------------------------------------------------------|-----------------------------|
| [Instant](https://developer.android.com/reference/kotlin/java/time/Instant.html#) | This value cannot be`null`. |

### hashCode

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |