
commonMain.aws.sdk.kotlin.services.iot.model.OtaUpdateFile.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Describes a file to be associated with an OTA update.
*/
public class OtaUpdateFile private constructor(builder: Builder) {
/**
* A list of name-attribute pairs. They won't be sent to devices as a part of the Job document.
*/
public val attributes: Map? = builder.attributes
/**
* The code signing method of the file.
*/
public val codeSigning: aws.sdk.kotlin.services.iot.model.CodeSigning? = builder.codeSigning
/**
* The location of the updated firmware.
*/
public val fileLocation: aws.sdk.kotlin.services.iot.model.FileLocation? = builder.fileLocation
/**
* The name of the file.
*/
public val fileName: kotlin.String? = builder.fileName
/**
* An integer value you can include in the job document to allow your devices to identify the type of file received from the cloud.
*/
public val fileType: kotlin.Int? = builder.fileType
/**
* The file version.
*/
public val fileVersion: kotlin.String? = builder.fileVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.OtaUpdateFile = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OtaUpdateFile(")
append("attributes=$attributes,")
append("codeSigning=$codeSigning,")
append("fileLocation=$fileLocation,")
append("fileName=$fileName,")
append("fileType=$fileType,")
append("fileVersion=$fileVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributes?.hashCode() ?: 0
result = 31 * result + (codeSigning?.hashCode() ?: 0)
result = 31 * result + (fileLocation?.hashCode() ?: 0)
result = 31 * result + (fileName?.hashCode() ?: 0)
result = 31 * result + (fileType ?: 0)
result = 31 * result + (fileVersion?.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 OtaUpdateFile
if (attributes != other.attributes) return false
if (codeSigning != other.codeSigning) return false
if (fileLocation != other.fileLocation) return false
if (fileName != other.fileName) return false
if (fileType != other.fileType) return false
if (fileVersion != other.fileVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.OtaUpdateFile = Builder(this).apply(block).build()
public class Builder {
/**
* A list of name-attribute pairs. They won't be sent to devices as a part of the Job document.
*/
public var attributes: Map? = null
/**
* The code signing method of the file.
*/
public var codeSigning: aws.sdk.kotlin.services.iot.model.CodeSigning? = null
/**
* The location of the updated firmware.
*/
public var fileLocation: aws.sdk.kotlin.services.iot.model.FileLocation? = null
/**
* The name of the file.
*/
public var fileName: kotlin.String? = null
/**
* An integer value you can include in the job document to allow your devices to identify the type of file received from the cloud.
*/
public var fileType: kotlin.Int? = null
/**
* The file version.
*/
public var fileVersion: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.OtaUpdateFile) : this() {
this.attributes = x.attributes
this.codeSigning = x.codeSigning
this.fileLocation = x.fileLocation
this.fileName = x.fileName
this.fileType = x.fileType
this.fileVersion = x.fileVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.OtaUpdateFile = OtaUpdateFile(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.CodeSigning] inside the given [block]
*/
public fun codeSigning(block: aws.sdk.kotlin.services.iot.model.CodeSigning.Builder.() -> kotlin.Unit) {
this.codeSigning = aws.sdk.kotlin.services.iot.model.CodeSigning.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iot.model.FileLocation] inside the given [block]
*/
public fun fileLocation(block: aws.sdk.kotlin.services.iot.model.FileLocation.Builder.() -> kotlin.Unit) {
this.fileLocation = aws.sdk.kotlin.services.iot.model.FileLocation.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy