# UpdateInfo

Artifact: [androidx.security:security-state](https://developer.android.com/jetpack/androidx/releases/security) [View Source](https://cs.android.com/search?q=file:androidx/security/state/UpdateInfo.kt+class:androidx.security.state.UpdateInfo) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

*** ** * ** ***


```
class UpdateInfo : Parcelable
```

<br />

*** ** * ** ***

Represents information about an available update for a component.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo.Builder` Builder class for creating an instance of UpdateInfo. |

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/android/os/Parcelable.Creator.html<https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo>` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#CREATOR()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#UpdateInfo(kotlin.String,androidx.security.state.SecurityPatchState.SecurityPatchLevel,kotlin.Long,kotlin.Long)( component: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, securityPatchLevel: https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState.SecurityPatchLevel, publishedDateMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, lastCheckTimeMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#describeContents()()` |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Compares this UpdateInfo with another object for equality. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#hashCode()()` Provides a hash code for an UpdateInfo object. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#toString()()` Returns a string representation of the update information. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#writeToParcel(android.os.Parcel,kotlin.Int)(parcel: https://developer.android.com/reference/android/os/Parcel.html, flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#component()` Component for which the update information is provided. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#lastCheckTimeMillis()` The timestamp when this specific update was checked or discovered, in milliseconds since the epoch. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#publishedDateMillis()` Timestamp when the available update was published, in milliseconds since the epoch. |
| `https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState.SecurityPatchLevel` | `https://developer.android.com/reference/kotlin/androidx/security/state/UpdateInfo#securityPatchLevel()` Security patch level of the available update ready to be applied by the reporting client. |

## Public companion properties

### CREATOR

```
val CREATOR: Parcelable.Creator<UpdateInfo>
```

## Public constructors

### UpdateInfo

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
UpdateInfo(
    component: String,
    securityPatchLevel: SecurityPatchState.SecurityPatchLevel,
    publishedDateMillis: Long,
    lastCheckTimeMillis: Long
)
```

## Public functions

### describeContents

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
open fun describeContents(): Int
```

### equals

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

Compares this UpdateInfo with another object for equality.

| Parameters |
|---|---|
| `other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The object to compare with this instance. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | true if the other object is an instance of UpdateInfo and all properties match, false otherwise. |

### hashCode

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

Provides a hash code for an UpdateInfo object.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | A hash code produced by the properties of the update info. |

### toString

```
open fun toString(): String
```

Returns a string representation of the update information.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | A string that describes the update details. |

### writeToParcel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
open fun writeToParcel(parcel: Parcel, flags: Int): Unit
```

## Public properties

### component

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
val component: String
```

Component for which the update information is provided.

The value should be one of the constants allowed by `https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState.Component`, such as `https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState#COMPONENT_SYSTEM()`.

### lastCheckTimeMillis

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
val lastCheckTimeMillis: Long
```

The timestamp when this specific update was checked or discovered, in milliseconds since the epoch.

This timestamp allows the system to track the freshness of individual update records, which is useful when different components are checked on different schedules.

### publishedDateMillis

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
val publishedDateMillis: Long
```

Timestamp when the available update was published, in milliseconds since the epoch.

### securityPatchLevel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/security#1.1.0)

```
val securityPatchLevel: SecurityPatchState.SecurityPatchLevel
```

Security patch level of the available update ready to be applied by the reporting client.

This is represented as a `https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState.SecurityPatchLevel` object (e.g., `https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState.DateBasedSecurityPatchLevel` or `https://developer.android.com/reference/kotlin/androidx/security/state/SecurityPatchState.VersionedSecurityPatchLevel`) appropriate for the component.