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

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

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

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



public class UpdatePackageVersionRequest private constructor(builder: Builder) {
    /**
     * The status that the package version should be assigned. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle).
     */
    public val action: aws.sdk.kotlin.services.iot.model.PackageVersionAction? = builder.action
    /**
     * Metadata that can be used to define a package version’s configuration. For example, the Amazon S3 file location, configuration options that are being sent to the device or fleet.
     *
     * **Note:** Attributes can be updated only when the package version is in a draft state.
     *
     * The combined size of all the attributes on a package version is limited to 3KB.
     */
    public val attributes: Map? = builder.attributes
    /**
     * 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 package version description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The name of the associated software package.
     */
    public val packageName: kotlin.String? = builder.packageName
    /**
     * The name of the target package version.
     */
    public val versionName: kotlin.String? = builder.versionName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePackageVersionRequest(")
        append("action=$action,")
        append("attributes=*** Sensitive Data Redacted ***,")
        append("clientToken=$clientToken,")
        append("description=*** Sensitive Data Redacted ***,")
        append("packageName=$packageName,")
        append("versionName=$versionName")
        append(")")
    }

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

        if (action != other.action) return false
        if (attributes != other.attributes) return false
        if (clientToken != other.clientToken) return false
        if (description != other.description) return false
        if (packageName != other.packageName) return false
        if (versionName != other.versionName) return false

        return true
    }

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

    public class Builder {
        /**
         * The status that the package version should be assigned. For more information, see [Package version lifecycle](https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle).
         */
        public var action: aws.sdk.kotlin.services.iot.model.PackageVersionAction? = null
        /**
         * Metadata that can be used to define a package version’s configuration. For example, the Amazon S3 file location, configuration options that are being sent to the device or fleet.
         *
         * **Note:** Attributes can be updated only when the package version is in a draft state.
         *
         * The combined size of all the attributes on a package version is limited to 3KB.
         */
        public var attributes: Map? = null
        /**
         * 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 package version description.
         */
        public var description: kotlin.String? = null
        /**
         * The name of the associated software package.
         */
        public var packageName: kotlin.String? = null
        /**
         * The name of the target package version.
         */
        public var versionName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.UpdatePackageVersionRequest) : this() {
            this.action = x.action
            this.attributes = x.attributes
            this.clientToken = x.clientToken
            this.description = x.description
            this.packageName = x.packageName
            this.versionName = x.versionName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy