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

commonMain.aws.sdk.kotlin.services.iotfleetwise.model.GetDecoderManifestResponse.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 GetDecoderManifestResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the decoder manifest.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The time the decoder manifest 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 decoder manifest.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The time the decoder manifest 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 detailed message for the decoder manifest. When a decoder manifest is in an `INVALID` status, the message contains detailed reason and help information.
     */
    public val message: kotlin.String? = builder.message
    /**
     * The ARN of a vehicle model (model manifest) associated with the decoder manifest.
     */
    public val modelManifestArn: kotlin.String? = builder.modelManifestArn
    /**
     * The name of the decoder manifest.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The state of the decoder manifest. If the status is `ACTIVE`, the decoder manifest can't be edited. If the status is marked `DRAFT`, you can edit the decoder manifest.
     */
    public val status: aws.sdk.kotlin.services.iotfleetwise.model.ManifestStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("GetDecoderManifestResponse(")
        append("arn=$arn,")
        append("creationTime=$creationTime,")
        append("description=$description,")
        append("lastModificationTime=$lastModificationTime,")
        append("message=$message,")
        append("modelManifestArn=$modelManifestArn,")
        append("name=$name,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (creationTime.hashCode())
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (lastModificationTime.hashCode())
        result = 31 * result + (message?.hashCode() ?: 0)
        result = 31 * result + (modelManifestArn?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (status?.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 GetDecoderManifestResponse

        if (arn != other.arn) return false
        if (creationTime != other.creationTime) return false
        if (description != other.description) return false
        if (lastModificationTime != other.lastModificationTime) return false
        if (message != other.message) return false
        if (modelManifestArn != other.modelManifestArn) return false
        if (name != other.name) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the decoder manifest.
         */
        public var arn: kotlin.String? = null
        /**
         * The time the decoder manifest 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 decoder manifest.
         */
        public var description: kotlin.String? = null
        /**
         * The time the decoder manifest 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 detailed message for the decoder manifest. When a decoder manifest is in an `INVALID` status, the message contains detailed reason and help information.
         */
        public var message: kotlin.String? = null
        /**
         * The ARN of a vehicle model (model manifest) associated with the decoder manifest.
         */
        public var modelManifestArn: kotlin.String? = null
        /**
         * The name of the decoder manifest.
         */
        public var name: kotlin.String? = null
        /**
         * The state of the decoder manifest. If the status is `ACTIVE`, the decoder manifest can't be edited. If the status is marked `DRAFT`, you can edit the decoder manifest.
         */
        public var status: aws.sdk.kotlin.services.iotfleetwise.model.ManifestStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotfleetwise.model.GetDecoderManifestResponse) : this() {
            this.arn = x.arn
            this.creationTime = x.creationTime
            this.description = x.description
            this.lastModificationTime = x.lastModificationTime
            this.message = x.message
            this.modelManifestArn = x.modelManifestArn
            this.name = x.name
            this.status = x.status
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy