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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.GetFleetResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iotfleetwise.model

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

public class GetFleetResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the fleet.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time the fleet was created in seconds since epoch (January 1, 1970 at midnight UTC time).
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationTime) { "A non-null value must be provided for creationTime" }
    /**
     * A brief description of the fleet.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The ID of the fleet.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The time the fleet was last updated, in seconds since epoch (January 1, 1970 at midnight UTC time).
     */
    public val lastModificationTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastModificationTime) { "A non-null value must be provided for lastModificationTime" }
    /**
     * The ARN of a signal catalog associated with the fleet.
     */
    public val signalCatalogArn: kotlin.String = requireNotNull(builder.signalCatalogArn) { "A non-null value must be provided for signalCatalogArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetFleetResponse(")
        append("arn=$arn,")
        append("creationTime=$creationTime,")
        append("description=$description,")
        append("id=$id,")
        append("lastModificationTime=$lastModificationTime,")
        append("signalCatalogArn=$signalCatalogArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (creationTime.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (id.hashCode())
        result = 31 * result + (lastModificationTime.hashCode())
        result = 31 * result + (signalCatalogArn.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 GetFleetResponse

        if (arn != other.arn) return false
        if (creationTime != other.creationTime) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (lastModificationTime != other.lastModificationTime) return false
        if (signalCatalogArn != other.signalCatalogArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the fleet.
         */
        public var arn: kotlin.String? = null
        /**
         * The time the fleet was created in seconds since epoch (January 1, 1970 at midnight UTC time).
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A brief description of the fleet.
         */
        public var description: kotlin.String? = null
        /**
         * The ID of the fleet.
         */
        public var id: kotlin.String? = null
        /**
         * The time the fleet was last updated, in seconds since epoch (January 1, 1970 at midnight UTC time).
         */
        public var lastModificationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ARN of a signal catalog associated with the fleet.
         */
        public var signalCatalogArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.GetFleetResponse) : this() {
            this.arn = x.arn
            this.creationTime = x.creationTime
            this.description = x.description
            this.id = x.id
            this.lastModificationTime = x.lastModificationTime
            this.signalCatalogArn = x.signalCatalogArn
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (creationTime == null) creationTime = Instant.fromEpochSeconds(0)
            if (id == null) id = ""
            if (lastModificationTime == null) lastModificationTime = Instant.fromEpochSeconds(0)
            if (signalCatalogArn == null) signalCatalogArn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy