All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iotwireless.model.GetFuotaTaskResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotwireless.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class GetFuotaTaskResponse private constructor(builder: Builder) {
    /**
     * The arn of a FUOTA task.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * Created at timestamp for the resource.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * 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 returned from getting a FUOTA task.
     */
    public val loRaWan: aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTaskGetInfo? = 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
    /**
     * The status of a FUOTA task.
     */
    public val status: aws.sdk.kotlin.services.iotwireless.model.FuotaTaskStatus? = builder.status

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iotwireless.model.GetFuotaTaskResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetFuotaTaskResponse(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        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("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * 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)
        result = 31 * result + (status?.hashCode() ?: 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 GetFuotaTaskResponse

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        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
        if (status != other.status) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iotwireless.model.GetFuotaTaskResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The arn of a FUOTA task.
         */
        public var arn: kotlin.String? = null
        /**
         * Created at timestamp for the resource.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * 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 returned from getting a FUOTA task.
         */
        public var loRaWan: aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTaskGetInfo? = 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
        /**
         * The status of a FUOTA task.
         */
        public var status: aws.sdk.kotlin.services.iotwireless.model.FuotaTaskStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.GetFuotaTaskResponse) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            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
            this.status = x.status
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iotwireless.model.GetFuotaTaskResponse = GetFuotaTaskResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTaskGetInfo] inside the given [block]
         */
        public fun loRaWan(block: aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTaskGetInfo.Builder.() -> kotlin.Unit) {
            this.loRaWan = aws.sdk.kotlin.services.iotwireless.model.LoRaWanFuotaTaskGetInfo.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy