commonMain.aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceDescription.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot1clickdevicesservice.model
import aws.smithy.kotlin.runtime.SdkDsl
public class DeviceDescription private constructor(builder: Builder) {
/**
* The ARN of the device.
*/
public val arn: kotlin.String? = builder.arn
/**
* An array of zero or more elements of DeviceAttribute objects providing user specified device attributes.
*/
public val attributes: Map? = builder.attributes
/**
* The unique identifier of the device.
*/
public val deviceId: kotlin.String? = builder.deviceId
/**
* A Boolean value indicating whether or not the device is enabled.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* A value between 0 and 1 inclusive, representing the fraction of life remaining for the device.
*/
public val remainingLife: kotlin.Double? = builder.remainingLife
/**
* The tags currently associated with the AWS IoT 1-Click device.
*/
public val tags: Map? = builder.tags
/**
* The type of the device, such as "button".
*/
public val type: kotlin.String? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceDescription = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeviceDescription(")
append("arn=$arn,")
append("attributes=$attributes,")
append("deviceId=$deviceId,")
append("enabled=$enabled,")
append("remainingLife=$remainingLife,")
append("tags=$tags,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (attributes?.hashCode() ?: 0)
result = 31 * result + (deviceId?.hashCode() ?: 0)
result = 31 * result + (enabled?.hashCode() ?: 0)
result = 31 * result + (remainingLife?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (type?.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 DeviceDescription
if (arn != other.arn) return false
if (attributes != other.attributes) return false
if (deviceId != other.deviceId) return false
if (enabled != other.enabled) return false
if (!(remainingLife?.equals(other.remainingLife) ?: (other.remainingLife == null))) return false
if (tags != other.tags) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceDescription = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the device.
*/
public var arn: kotlin.String? = null
/**
* An array of zero or more elements of DeviceAttribute objects providing user specified device attributes.
*/
public var attributes: Map? = null
/**
* The unique identifier of the device.
*/
public var deviceId: kotlin.String? = null
/**
* A Boolean value indicating whether or not the device is enabled.
*/
public var enabled: kotlin.Boolean? = null
/**
* A value between 0 and 1 inclusive, representing the fraction of life remaining for the device.
*/
public var remainingLife: kotlin.Double? = null
/**
* The tags currently associated with the AWS IoT 1-Click device.
*/
public var tags: Map? = null
/**
* The type of the device, such as "button".
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceDescription) : this() {
this.arn = x.arn
this.attributes = x.attributes
this.deviceId = x.deviceId
this.enabled = x.enabled
this.remainingLife = x.remainingLife
this.tags = x.tags
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceDescription = DeviceDescription(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy