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

commonMain.aws.sdk.kotlin.services.greengrass.model.GetResourceDefinitionVersionResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.greengrass.model



public class GetResourceDefinitionVersionResponse private constructor(builder: Builder) {
    /**
     * Arn of the resource definition version.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The time, in milliseconds since the epoch, when the resource definition version was created.
     */
    public val creationTimestamp: kotlin.String? = builder.creationTimestamp
    /**
     * Information about the definition.
     */
    public val definition: aws.sdk.kotlin.services.greengrass.model.ResourceDefinitionVersion? = builder.definition
    /**
     * The ID of the resource definition version.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The version of the resource definition version.
     */
    public val version: kotlin.String? = builder.version

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

    override fun toString(): kotlin.String = buildString {
        append("GetResourceDefinitionVersionResponse(")
        append("arn=$arn,")
        append("creationTimestamp=$creationTimestamp,")
        append("definition=$definition,")
        append("id=$id,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (creationTimestamp?.hashCode() ?: 0)
        result = 31 * result + (definition?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (version?.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 GetResourceDefinitionVersionResponse

        if (arn != other.arn) return false
        if (creationTimestamp != other.creationTimestamp) return false
        if (definition != other.definition) return false
        if (id != other.id) return false
        if (version != other.version) return false

        return true
    }

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

    public class Builder {
        /**
         * Arn of the resource definition version.
         */
        public var arn: kotlin.String? = null
        /**
         * The time, in milliseconds since the epoch, when the resource definition version was created.
         */
        public var creationTimestamp: kotlin.String? = null
        /**
         * Information about the definition.
         */
        public var definition: aws.sdk.kotlin.services.greengrass.model.ResourceDefinitionVersion? = null
        /**
         * The ID of the resource definition version.
         */
        public var id: kotlin.String? = null
        /**
         * The version of the resource definition version.
         */
        public var version: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.greengrass.model.GetResourceDefinitionVersionResponse) : this() {
            this.arn = x.arn
            this.creationTimestamp = x.creationTimestamp
            this.definition = x.definition
            this.id = x.id
            this.version = x.version
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.greengrass.model.ResourceDefinitionVersion] inside the given [block]
         */
        public fun definition(block: aws.sdk.kotlin.services.greengrass.model.ResourceDefinitionVersion.Builder.() -> kotlin.Unit) {
            this.definition = aws.sdk.kotlin.services.greengrass.model.ResourceDefinitionVersion.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy