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

commonMain.aws.sdk.kotlin.services.iot.model.ThingGroupMetadata.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot.model

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

/**
 * Thing group metadata.
 */
public class ThingGroupMetadata private constructor(builder: Builder) {
    /**
     * The UNIX timestamp of when the thing group was created.
     */
    public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
    /**
     * The parent thing group name.
     */
    public val parentGroupName: kotlin.String? = builder.parentGroupName
    /**
     * The root parent thing group.
     */
    public val rootToParentThingGroups: List? = builder.rootToParentThingGroups

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

    override fun toString(): kotlin.String = buildString {
        append("ThingGroupMetadata(")
        append("creationDate=$creationDate,")
        append("parentGroupName=$parentGroupName,")
        append("rootToParentThingGroups=$rootToParentThingGroups")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = creationDate?.hashCode() ?: 0
        result = 31 * result + (parentGroupName?.hashCode() ?: 0)
        result = 31 * result + (rootToParentThingGroups?.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 ThingGroupMetadata

        if (creationDate != other.creationDate) return false
        if (parentGroupName != other.parentGroupName) return false
        if (rootToParentThingGroups != other.rootToParentThingGroups) return false

        return true
    }

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

    public class Builder {
        /**
         * The UNIX timestamp of when the thing group was created.
         */
        public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The parent thing group name.
         */
        public var parentGroupName: kotlin.String? = null
        /**
         * The root parent thing group.
         */
        public var rootToParentThingGroups: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.ThingGroupMetadata) : this() {
            this.creationDate = x.creationDate
            this.parentGroupName = x.parentGroupName
            this.rootToParentThingGroups = x.rootToParentThingGroups
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy