UpdateInfo.Builder


class UpdateInfo.Builder


Builder class for creating an instance of UpdateInfo.

Summary

Public constructors

Public functions

UpdateInfo

Builds and returns an UpdateInfo object.

UpdateInfo.Builder
setComponent(component: String)

Sets the component associated with the update.

UpdateInfo.Builder
setLastCheckTimeMillis(lastCheckTimeMillis: Long)

Sets the timestamp when this update was checked or discovered.

UpdateInfo.Builder
setPublishedDateMillis(publishedDateMillis: Long)

Sets the publication date of the update.

UpdateInfo.Builder

Sets the security patch level of the update.

Public constructors

Builder

Added in 1.1.0
Builder()

Public functions

build

Added in 1.1.0
fun build(): UpdateInfo

Builds and returns an UpdateInfo object.

Returns
UpdateInfo

The constructed UpdateInfo.

setComponent

Added in 1.1.0
fun setComponent(component: String): UpdateInfo.Builder

Sets the component associated with the update.

Parameters
component: String

The component to set.

Returns
UpdateInfo.Builder

The builder instance for chaining.

setLastCheckTimeMillis

Added in 1.1.0
fun setLastCheckTimeMillis(lastCheckTimeMillis: Long): UpdateInfo.Builder

Sets the timestamp when this update was checked or discovered.

Parameters
lastCheckTimeMillis: Long

The timestamp in milliseconds since the epoch.

Returns
UpdateInfo.Builder

The builder instance for chaining.

setPublishedDateMillis

Added in 1.1.0
fun setPublishedDateMillis(publishedDateMillis: Long): UpdateInfo.Builder

Sets the publication date of the update.

Parameters
publishedDateMillis: Long

The timestamp in milliseconds since the epoch.

Returns
UpdateInfo.Builder

The builder instance for chaining.

setSecurityPatchLevel

Added in 1.1.0
fun setSecurityPatchLevel(
    securityPatchLevel: SecurityPatchState.SecurityPatchLevel
): UpdateInfo.Builder

Sets the security patch level of the update.

Parameters
securityPatchLevel: SecurityPatchState.SecurityPatchLevel

The SecurityPatchState.SecurityPatchLevel to set. Depending on the component, this should be a concrete subclass such as SecurityPatchState.DateBasedSecurityPatchLevel (for SYSTEM and VENDOR) or SecurityPatchState.VersionedSecurityPatchLevel (for KERNEL).

Returns
UpdateInfo.Builder

The builder instance for chaining.