SystemUpdate.Builder

abstract class SystemUpdate.Builder


Builder for SystemUpdate.

Summary

Public functions

abstract SystemUpdate!
SystemUpdate.Builder!

Clears instruction.

SystemUpdate.Builder!

Clears systemUpdateState.

abstract SystemUpdate.Builder!
setApiLevel(value: Int!)

Required.

abstract SystemUpdate.Builder!

Required.

SystemUpdate.Builder!

Output-only.

abstract SystemUpdate.Builder!
setName(value: String!)

Required.

abstract SystemUpdate.Builder!

Required.

abstract SystemUpdate.Builder!

Required.

abstract SystemUpdate.Builder!
setSizeBytes(value: Long!)

The estimated download size of the update package in bytes.

SystemUpdate.Builder!

Output-only.

Public functions

build

abstract fun build(): SystemUpdate!

clearInstruction

fun clearInstruction(): SystemUpdate.Builder!

Clears instruction.

clearSystemUpdateState

fun clearSystemUpdateState(): SystemUpdate.Builder!

Clears systemUpdateState.

setApiLevel

abstract fun setApiLevel(value: Int!): SystemUpdate.Builder!

Required. The target Android API level after this update is applied. For example, this would be 35 if the update upgrades the device to Android 15.

setApiLevelChange

abstract fun setApiLevelChange(value: SystemUpdate.ApiLevelChange!): SystemUpdate.Builder!

Required. Whether this system update changes the Android API level.

setInstruction

fun setInstruction(value: Instruction!): SystemUpdate.Builder!

Output-only. Instructions on how the update should be handled by the device. These instructions are determined and set by the Android Management API based on enterprise policy, not by the OEM. The OTA client receives these instructions that determine how to proceed with the update stages (e.g., download, apply). This field is not updatable by the OTA client.

setName

abstract fun setName(value: String!): SystemUpdate.Builder!

Required. The unique identifier for this specific system update. This name is generated and owned by the OEM's OTA client and must not be an empty string.

The name must be stable and unique for the content of the update. This means the same update content must always have the same name. This is crucial to prevent race conditions and ensure idempotency in API calls. Using a content hash (e.g., SHA-256) of the update package or a unique version string is recommended.

This name is used to deduplicate update notifications and track the status of the update. It has a maximum length of 128 characters.

setReceivedTime

abstract fun setReceivedTime(value: Instant!): SystemUpdate.Builder!

Required. The timestamp indicating when the device first became aware of this SystemUpdate. This time is used to evaluate policies based on the update's pending duration on the device.

setSecurityPatchLevel

abstract fun setSecurityPatchLevel(value: String!): SystemUpdate.Builder!

Required. The security patch level date of this update. The date must be represented as a string in 'YYYY-MM-DD' format. Example: "2025-07-05".

setSizeBytes

abstract fun setSizeBytes(value: Long!): SystemUpdate.Builder!

The estimated download size of the update package in bytes.

setSystemUpdateState

fun setSystemUpdateState(value: SystemUpdate.SystemUpdateState!): SystemUpdate.Builder!

Output-only. The current state of the system update.