commonMain.aws.sdk.kotlin.services.iotwireless.model.UpdateFuotaTaskRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotwireless-jvm Show documentation
Show all versions of iotwireless-jvm Show documentation
The AWS Kotlin client for IoT Wireless
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iotwireless.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateFuotaTaskRequest private constructor(builder: Builder) {
/**
* The description of the new resource.
*/
public val description: kotlin.String? = builder.description
/**
* The Descriptor specifies some metadata about the File being transferred using FUOTA e.g. the software version. It is sent transparently to the device. It is a binary field encoded in base64
*/
public val descriptor: kotlin.String? = builder.descriptor
/**
* The S3 URI points to a firmware update image that is to be used with a FUOTA task.
*/
public val firmwareUpdateImage: kotlin.String? = builder.firmwareUpdateImage
/**
* The firmware update role that is to be used with a FUOTA task.
*/
public val firmwareUpdateRole: kotlin.String? = builder.firmwareUpdateRole
/**
* The interval for sending fragments in milliseconds, rounded to the nearest second.
*
* This interval only determines the timing for when the Cloud sends down the fragments to yor device. There can be a delay for when your device will receive these fragments. This delay depends on the device's class and the communication delay with the cloud.
*/
public val fragmentIntervalMs: kotlin.Int? = builder.fragmentIntervalMs
/**
* The size of each fragment in bytes. This parameter is supported only for FUOTA tasks with multicast groups.
*/
public val fragmentSizeBytes: kotlin.Int? = builder.fragmentSizeBytes
/**
* The ID of a FUOTA task.
*/
public val id: kotlin.String? = builder.id
/**
* The LoRaWAN information used with a FUOTA task.
*/
public val loRaWan: aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTask? = builder.loRaWan
/**
* The name of a FUOTA task.
*/
public val name: kotlin.String? = builder.name
/**
* The percentage of the added fragments that are redundant. For example, if the size of the firmware image file is 100 bytes and the fragment size is 10 bytes, with `RedundancyPercent` set to 50(%), the final number of encoded fragments is (100 / 10) + (100 / 10 * 50%) = 15.
*/
public val redundancyPercent: kotlin.Int? = builder.redundancyPercent
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotwireless.model.UpdateFuotaTaskRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateFuotaTaskRequest(")
append("description=$description,")
append("descriptor=$descriptor,")
append("firmwareUpdateImage=$firmwareUpdateImage,")
append("firmwareUpdateRole=$firmwareUpdateRole,")
append("fragmentIntervalMs=$fragmentIntervalMs,")
append("fragmentSizeBytes=$fragmentSizeBytes,")
append("id=$id,")
append("loRaWan=$loRaWan,")
append("name=$name,")
append("redundancyPercent=$redundancyPercent")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (descriptor?.hashCode() ?: 0)
result = 31 * result + (firmwareUpdateImage?.hashCode() ?: 0)
result = 31 * result + (firmwareUpdateRole?.hashCode() ?: 0)
result = 31 * result + (fragmentIntervalMs ?: 0)
result = 31 * result + (fragmentSizeBytes ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (loRaWan?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (redundancyPercent ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as UpdateFuotaTaskRequest
if (description != other.description) return false
if (descriptor != other.descriptor) return false
if (firmwareUpdateImage != other.firmwareUpdateImage) return false
if (firmwareUpdateRole != other.firmwareUpdateRole) return false
if (fragmentIntervalMs != other.fragmentIntervalMs) return false
if (fragmentSizeBytes != other.fragmentSizeBytes) return false
if (id != other.id) return false
if (loRaWan != other.loRaWan) return false
if (name != other.name) return false
if (redundancyPercent != other.redundancyPercent) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotwireless.model.UpdateFuotaTaskRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The description of the new resource.
*/
public var description: kotlin.String? = null
/**
* The Descriptor specifies some metadata about the File being transferred using FUOTA e.g. the software version. It is sent transparently to the device. It is a binary field encoded in base64
*/
public var descriptor: kotlin.String? = null
/**
* The S3 URI points to a firmware update image that is to be used with a FUOTA task.
*/
public var firmwareUpdateImage: kotlin.String? = null
/**
* The firmware update role that is to be used with a FUOTA task.
*/
public var firmwareUpdateRole: kotlin.String? = null
/**
* The interval for sending fragments in milliseconds, rounded to the nearest second.
*
* This interval only determines the timing for when the Cloud sends down the fragments to yor device. There can be a delay for when your device will receive these fragments. This delay depends on the device's class and the communication delay with the cloud.
*/
public var fragmentIntervalMs: kotlin.Int? = null
/**
* The size of each fragment in bytes. This parameter is supported only for FUOTA tasks with multicast groups.
*/
public var fragmentSizeBytes: kotlin.Int? = null
/**
* The ID of a FUOTA task.
*/
public var id: kotlin.String? = null
/**
* The LoRaWAN information used with a FUOTA task.
*/
public var loRaWan: aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTask? = null
/**
* The name of a FUOTA task.
*/
public var name: kotlin.String? = null
/**
* The percentage of the added fragments that are redundant. For example, if the size of the firmware image file is 100 bytes and the fragment size is 10 bytes, with `RedundancyPercent` set to 50(%), the final number of encoded fragments is (100 / 10) + (100 / 10 * 50%) = 15.
*/
public var redundancyPercent: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.UpdateFuotaTaskRequest) : this() {
this.description = x.description
this.descriptor = x.descriptor
this.firmwareUpdateImage = x.firmwareUpdateImage
this.firmwareUpdateRole = x.firmwareUpdateRole
this.fragmentIntervalMs = x.fragmentIntervalMs
this.fragmentSizeBytes = x.fragmentSizeBytes
this.id = x.id
this.loRaWan = x.loRaWan
this.name = x.name
this.redundancyPercent = x.redundancyPercent
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iotwireless.model.UpdateFuotaTaskRequest = UpdateFuotaTaskRequest(this)
/**
* construct an [aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTask] inside the given [block]
*/
public fun loRaWan(block: aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTask.Builder.() -> kotlin.Unit) {
this.loRaWan = aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTask.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy