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

commonMain.aws.sdk.kotlin.services.cloudcontrol.model.GetResourceResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudcontrol.model



public class GetResourceResponse private constructor(builder: Builder) {
    /**
     * Represents information about a provisioned resource.
     */
    public val resourceDescription: aws.sdk.kotlin.services.cloudcontrol.model.ResourceDescription? = builder.resourceDescription
    /**
     * The name of the resource type.
     */
    public val typeName: kotlin.String? = builder.typeName

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

    override fun toString(): kotlin.String = buildString {
        append("GetResourceResponse(")
        append("resourceDescription=$resourceDescription,")
        append("typeName=$typeName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = resourceDescription?.hashCode() ?: 0
        result = 31 * result + (typeName?.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 GetResourceResponse

        if (resourceDescription != other.resourceDescription) return false
        if (typeName != other.typeName) return false

        return true
    }

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

    public class Builder {
        /**
         * Represents information about a provisioned resource.
         */
        public var resourceDescription: aws.sdk.kotlin.services.cloudcontrol.model.ResourceDescription? = null
        /**
         * The name of the resource type.
         */
        public var typeName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudcontrol.model.GetResourceResponse) : this() {
            this.resourceDescription = x.resourceDescription
            this.typeName = x.typeName
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy