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

commonMain.aws.sdk.kotlin.services.iot.model.UpdatePackageRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



public class UpdatePackageRequest private constructor(builder: Builder) {
    /**
     * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * The name of the default package version.
     *
     * **Note:** You cannot name a `defaultVersion` and set `unsetDefaultVersion` equal to `true` at the same time.
     */
    public val defaultVersionName: kotlin.String? = builder.defaultVersionName
    /**
     * The package description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the target software package.
     */
    public val packageName: kotlin.String? = builder.packageName
    /**
     * Indicates whether you want to remove the named default package version from the software package. Set as `true` to remove the default package version.
     *
     * **Note:** You cannot name a `defaultVersion` and set `unsetDefaultVersion` equal to `true` at the same time.
     */
    public val unsetDefaultVersion: kotlin.Boolean? = builder.unsetDefaultVersion

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePackageRequest(")
        append("clientToken=$clientToken,")
        append("defaultVersionName=$defaultVersionName,")
        append("description=*** Sensitive Data Redacted ***,")
        append("packageName=$packageName,")
        append("unsetDefaultVersion=$unsetDefaultVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (defaultVersionName?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (packageName?.hashCode() ?: 0)
        result = 31 * result + (unsetDefaultVersion?.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 UpdatePackageRequest

        if (clientToken != other.clientToken) return false
        if (defaultVersionName != other.defaultVersionName) return false
        if (description != other.description) return false
        if (packageName != other.packageName) return false
        if (unsetDefaultVersion != other.unsetDefaultVersion) return false

        return true
    }

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

    public class Builder {
        /**
         * A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The name of the default package version.
         *
         * **Note:** You cannot name a `defaultVersion` and set `unsetDefaultVersion` equal to `true` at the same time.
         */
        public var defaultVersionName: kotlin.String? = null
        /**
         * The package description.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the target software package.
         */
        public var packageName: kotlin.String? = null
        /**
         * Indicates whether you want to remove the named default package version from the software package. Set as `true` to remove the default package version.
         *
         * **Note:** You cannot name a `defaultVersion` and set `unsetDefaultVersion` equal to `true` at the same time.
         */
        public var unsetDefaultVersion: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdatePackageRequest) : this() {
            this.clientToken = x.clientToken
            this.defaultVersionName = x.defaultVersionName
            this.description = x.description
            this.packageName = x.packageName
            this.unsetDefaultVersion = x.unsetDefaultVersion
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy