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

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

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

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



public class GetDocumentRequest private constructor(builder: Builder) {
    /**
     * Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.
     */
    public val documentFormat: aws.sdk.kotlin.services.ssm.model.DocumentFormat? = builder.documentFormat
    /**
     * The document version for which you want information.
     */
    public val documentVersion: kotlin.String? = builder.documentVersion
    /**
     * The name of the SSM document.
     */
    public val name: kotlin.String? = builder.name
    /**
     * An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document and can't be changed.
     */
    public val versionName: kotlin.String? = builder.versionName

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

    override fun toString(): kotlin.String = buildString {
        append("GetDocumentRequest(")
        append("documentFormat=$documentFormat,")
        append("documentVersion=$documentVersion,")
        append("name=$name,")
        append("versionName=$versionName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = documentFormat?.hashCode() ?: 0
        result = 31 * result + (documentVersion?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (versionName?.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 GetDocumentRequest

        if (documentFormat != other.documentFormat) return false
        if (documentVersion != other.documentVersion) return false
        if (name != other.name) return false
        if (versionName != other.versionName) return false

        return true
    }

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

    public class Builder {
        /**
         * Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.
         */
        public var documentFormat: aws.sdk.kotlin.services.ssm.model.DocumentFormat? = null
        /**
         * The document version for which you want information.
         */
        public var documentVersion: kotlin.String? = null
        /**
         * The name of the SSM document.
         */
        public var name: kotlin.String? = null
        /**
         * An optional field specifying the version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document and can't be changed.
         */
        public var versionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.GetDocumentRequest) : this() {
            this.documentFormat = x.documentFormat
            this.documentVersion = x.documentVersion
            this.name = x.name
            this.versionName = x.versionName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy