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

commonMain.aws.sdk.kotlin.services.iot1clickprojects.model.PlacementDescription.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot1clickprojects.model

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

/**
 * An object describing a project's placement.
 */
public class PlacementDescription private constructor(builder: Builder) {
    /**
     * The user-defined attributes associated with the placement.
     */
    public val attributes: Map = requireNotNull(builder.attributes) { "A non-null value must be provided for attributes" }
    /**
     * The date when the placement was initially created, in UNIX epoch time format.
     */
    public val createdDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdDate) { "A non-null value must be provided for createdDate" }
    /**
     * The name of the placement.
     */
    public val placementName: kotlin.String = requireNotNull(builder.placementName) { "A non-null value must be provided for placementName" }
    /**
     * The name of the project containing the placement.
     */
    public val projectName: kotlin.String = requireNotNull(builder.projectName) { "A non-null value must be provided for projectName" }
    /**
     * The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then `createdDate` and `updatedDate` are the same.
     */
    public val updatedDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedDate) { "A non-null value must be provided for updatedDate" }

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

    override fun toString(): kotlin.String = buildString {
        append("PlacementDescription(")
        append("attributes=$attributes,")
        append("createdDate=$createdDate,")
        append("placementName=$placementName,")
        append("projectName=$projectName,")
        append("updatedDate=$updatedDate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attributes.hashCode()
        result = 31 * result + (createdDate.hashCode())
        result = 31 * result + (placementName.hashCode())
        result = 31 * result + (projectName.hashCode())
        result = 31 * result + (updatedDate.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 PlacementDescription

        if (attributes != other.attributes) return false
        if (createdDate != other.createdDate) return false
        if (placementName != other.placementName) return false
        if (projectName != other.projectName) return false
        if (updatedDate != other.updatedDate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The user-defined attributes associated with the placement.
         */
        public var attributes: Map? = null
        /**
         * The date when the placement was initially created, in UNIX epoch time format.
         */
        public var createdDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the placement.
         */
        public var placementName: kotlin.String? = null
        /**
         * The name of the project containing the placement.
         */
        public var projectName: kotlin.String? = null
        /**
         * The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then `createdDate` and `updatedDate` are the same.
         */
        public var updatedDate: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot1clickprojects.model.PlacementDescription) : this() {
            this.attributes = x.attributes
            this.createdDate = x.createdDate
            this.placementName = x.placementName
            this.projectName = x.projectName
            this.updatedDate = x.updatedDate
        }

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

        internal fun correctErrors(): Builder {
            if (attributes == null) attributes = emptyMap()
            if (createdDate == null) createdDate = Instant.fromEpochSeconds(0)
            if (placementName == null) placementName = ""
            if (projectName == null) projectName = ""
            if (updatedDate == null) updatedDate = Instant.fromEpochSeconds(0)
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy