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

commonMain.aws.sdk.kotlin.services.ssm.model.DescribeAssociationRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssm.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DescribeAssociationRequest private constructor(builder: Builder) {
    /**
     * The association ID for which you want information.
     */
    public val associationId: kotlin.String? = builder.associationId
    /**
     * Specify the association version to retrieve. To view the latest version, either specify `$LATEST` for this parameter, or omit this parameter. To view a list of all associations for a managed node, use ListAssociations. To get a list of versions for a specific association, use ListAssociationVersions.
     */
    public val associationVersion: kotlin.String? = builder.associationVersion
    /**
     * The managed node ID.
     */
    public val instanceId: kotlin.String? = builder.instanceId
    /**
     * The name of the SSM document.
     */
    public val name: kotlin.String? = builder.name

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeAssociationRequest(")
        append("associationId=$associationId,")
        append("associationVersion=$associationVersion,")
        append("instanceId=$instanceId,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = associationId?.hashCode() ?: 0
        result = 31 * result + (associationVersion?.hashCode() ?: 0)
        result = 31 * result + (instanceId?.hashCode() ?: 0)
        result = 31 * result + (name?.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 DescribeAssociationRequest

        if (associationId != other.associationId) return false
        if (associationVersion != other.associationVersion) return false
        if (instanceId != other.instanceId) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The association ID for which you want information.
         */
        public var associationId: kotlin.String? = null
        /**
         * Specify the association version to retrieve. To view the latest version, either specify `$LATEST` for this parameter, or omit this parameter. To view a list of all associations for a managed node, use ListAssociations. To get a list of versions for a specific association, use ListAssociationVersions.
         */
        public var associationVersion: kotlin.String? = null
        /**
         * The managed node ID.
         */
        public var instanceId: kotlin.String? = null
        /**
         * The name of the SSM document.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.DescribeAssociationRequest) : this() {
            this.associationId = x.associationId
            this.associationVersion = x.associationVersion
            this.instanceId = x.instanceId
            this.name = x.name
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy