
commonMain.aws.sdk.kotlin.services.iot.model.ThingDocument.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The thing search index document.
*/
public class ThingDocument private constructor(builder: Builder) {
/**
* The attributes.
*/
public val attributes: Map? = builder.attributes
/**
* Indicates whether the thing is connected to the Amazon Web Services IoT Core service.
*/
public val connectivity: aws.sdk.kotlin.services.iot.model.ThingConnectivity? = builder.connectivity
/**
* Contains Device Defender data.
*
* For more information about Device Defender, see [Device Defender](https://docs.aws.amazon.com/iot/latest/developerguide/device-defender.html).
*/
public val deviceDefender: kotlin.String? = builder.deviceDefender
/**
* The unnamed shadow and named shadow.
*
* For more information about shadows, see [IoT Device Shadow service.](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
*/
public val shadow: kotlin.String? = builder.shadow
/**
* Thing group names.
*/
public val thingGroupNames: List? = builder.thingGroupNames
/**
* The thing ID.
*/
public val thingId: kotlin.String? = builder.thingId
/**
* The thing name.
*/
public val thingName: kotlin.String? = builder.thingName
/**
* The thing type name.
*/
public val thingTypeName: kotlin.String? = builder.thingTypeName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.ThingDocument = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ThingDocument(")
append("attributes=$attributes,")
append("connectivity=$connectivity,")
append("deviceDefender=$deviceDefender,")
append("shadow=$shadow,")
append("thingGroupNames=$thingGroupNames,")
append("thingId=$thingId,")
append("thingName=$thingName,")
append("thingTypeName=$thingTypeName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributes?.hashCode() ?: 0
result = 31 * result + (connectivity?.hashCode() ?: 0)
result = 31 * result + (deviceDefender?.hashCode() ?: 0)
result = 31 * result + (shadow?.hashCode() ?: 0)
result = 31 * result + (thingGroupNames?.hashCode() ?: 0)
result = 31 * result + (thingId?.hashCode() ?: 0)
result = 31 * result + (thingName?.hashCode() ?: 0)
result = 31 * result + (thingTypeName?.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 ThingDocument
if (attributes != other.attributes) return false
if (connectivity != other.connectivity) return false
if (deviceDefender != other.deviceDefender) return false
if (shadow != other.shadow) return false
if (thingGroupNames != other.thingGroupNames) return false
if (thingId != other.thingId) return false
if (thingName != other.thingName) return false
if (thingTypeName != other.thingTypeName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.ThingDocument = Builder(this).apply(block).build()
public class Builder {
/**
* The attributes.
*/
public var attributes: Map? = null
/**
* Indicates whether the thing is connected to the Amazon Web Services IoT Core service.
*/
public var connectivity: aws.sdk.kotlin.services.iot.model.ThingConnectivity? = null
/**
* Contains Device Defender data.
*
* For more information about Device Defender, see [Device Defender](https://docs.aws.amazon.com/iot/latest/developerguide/device-defender.html).
*/
public var deviceDefender: kotlin.String? = null
/**
* The unnamed shadow and named shadow.
*
* For more information about shadows, see [IoT Device Shadow service.](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
*/
public var shadow: kotlin.String? = null
/**
* Thing group names.
*/
public var thingGroupNames: List? = null
/**
* The thing ID.
*/
public var thingId: kotlin.String? = null
/**
* The thing name.
*/
public var thingName: kotlin.String? = null
/**
* The thing type name.
*/
public var thingTypeName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.ThingDocument) : this() {
this.attributes = x.attributes
this.connectivity = x.connectivity
this.deviceDefender = x.deviceDefender
this.shadow = x.shadow
this.thingGroupNames = x.thingGroupNames
this.thingId = x.thingId
this.thingName = x.thingName
this.thingTypeName = x.thingTypeName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.ThingDocument = ThingDocument(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.ThingConnectivity] inside the given [block]
*/
public fun connectivity(block: aws.sdk.kotlin.services.iot.model.ThingConnectivity.Builder.() -> kotlin.Unit) {
this.connectivity = aws.sdk.kotlin.services.iot.model.ThingConnectivity.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy