
commonMain.aws.sdk.kotlin.services.iot.model.DescribeThingResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* The output from the DescribeThing operation.
*/
public class DescribeThingResponse private constructor(builder: Builder) {
/**
* The thing attributes.
*/
public val attributes: Map? = builder.attributes
/**
* The name of the billing group the thing belongs to.
*/
public val billingGroupName: kotlin.String? = builder.billingGroupName
/**
* The default MQTT client ID. For a typical device, the thing name is also used as the default MQTT client ID. Although we don’t require a mapping between a thing's registry name and its use of MQTT client IDs, certificates, or shadow state, we recommend that you choose a thing name and use it as the MQTT client ID for the registry and the Device Shadow service.
*
* This lets you better organize your IoT fleet without removing the flexibility of the underlying device certificate model or shadows.
*/
public val defaultClientId: kotlin.String? = builder.defaultClientId
/**
* The ARN of the thing to describe.
*/
public val thingArn: kotlin.String? = builder.thingArn
/**
* The ID of the thing to describe.
*/
public val thingId: kotlin.String? = builder.thingId
/**
* The name of the thing.
*/
public val thingName: kotlin.String? = builder.thingName
/**
* The thing type name.
*/
public val thingTypeName: kotlin.String? = builder.thingTypeName
/**
* The current version of the thing record in the registry.
*
* To avoid unintentional changes to the information in the registry, you can pass the version information in the `expectedVersion` parameter of the `UpdateThing` and `DeleteThing` calls.
*/
public val version: kotlin.Long = builder.version
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.DescribeThingResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DescribeThingResponse(")
append("attributes=$attributes,")
append("billingGroupName=$billingGroupName,")
append("defaultClientId=$defaultClientId,")
append("thingArn=$thingArn,")
append("thingId=$thingId,")
append("thingName=$thingName,")
append("thingTypeName=$thingTypeName,")
append("version=$version")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributes?.hashCode() ?: 0
result = 31 * result + (billingGroupName?.hashCode() ?: 0)
result = 31 * result + (defaultClientId?.hashCode() ?: 0)
result = 31 * result + (thingArn?.hashCode() ?: 0)
result = 31 * result + (thingId?.hashCode() ?: 0)
result = 31 * result + (thingName?.hashCode() ?: 0)
result = 31 * result + (thingTypeName?.hashCode() ?: 0)
result = 31 * result + (version.hashCode())
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 DescribeThingResponse
if (attributes != other.attributes) return false
if (billingGroupName != other.billingGroupName) return false
if (defaultClientId != other.defaultClientId) return false
if (thingArn != other.thingArn) return false
if (thingId != other.thingId) return false
if (thingName != other.thingName) return false
if (thingTypeName != other.thingTypeName) return false
if (version != other.version) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.DescribeThingResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The thing attributes.
*/
public var attributes: Map? = null
/**
* The name of the billing group the thing belongs to.
*/
public var billingGroupName: kotlin.String? = null
/**
* The default MQTT client ID. For a typical device, the thing name is also used as the default MQTT client ID. Although we don’t require a mapping between a thing's registry name and its use of MQTT client IDs, certificates, or shadow state, we recommend that you choose a thing name and use it as the MQTT client ID for the registry and the Device Shadow service.
*
* This lets you better organize your IoT fleet without removing the flexibility of the underlying device certificate model or shadows.
*/
public var defaultClientId: kotlin.String? = null
/**
* The ARN of the thing to describe.
*/
public var thingArn: kotlin.String? = null
/**
* The ID of the thing to describe.
*/
public var thingId: kotlin.String? = null
/**
* The name of the thing.
*/
public var thingName: kotlin.String? = null
/**
* The thing type name.
*/
public var thingTypeName: kotlin.String? = null
/**
* The current version of the thing record in the registry.
*
* To avoid unintentional changes to the information in the registry, you can pass the version information in the `expectedVersion` parameter of the `UpdateThing` and `DeleteThing` calls.
*/
public var version: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.DescribeThingResponse) : this() {
this.attributes = x.attributes
this.billingGroupName = x.billingGroupName
this.defaultClientId = x.defaultClientId
this.thingArn = x.thingArn
this.thingId = x.thingId
this.thingName = x.thingName
this.thingTypeName = x.thingTypeName
this.version = x.version
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.DescribeThingResponse = DescribeThingResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy