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

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

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

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



/**
 * Configuration to manage IoT Job's package version reporting. If configured, Jobs updates the thing's reserved named shadow with the package version information up on successful job completion.
 *
 * **Note:** For each job, the destinationPackageVersions attribute has to be set with the correct data for Jobs to report to the thing shadow.
 */
public class VersionUpdateByJobsConfig private constructor(builder: Builder) {
    /**
     * Indicates whether the Job is enabled or not.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * The Amazon Resource Name (ARN) of the role that grants permission to the IoT jobs service to update the reserved named shadow when the job successfully completes.
     */
    public val roleArn: kotlin.String? = builder.roleArn

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

    override fun toString(): kotlin.String = buildString {
        append("VersionUpdateByJobsConfig(")
        append("enabled=$enabled,")
        append("roleArn=$roleArn")
        append(")")
    }

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

        if (enabled != other.enabled) return false
        if (roleArn != other.roleArn) return false

        return true
    }

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

    public class Builder {
        /**
         * Indicates whether the Job is enabled or not.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * The Amazon Resource Name (ARN) of the role that grants permission to the IoT jobs service to update the reserved named shadow when the job successfully completes.
         */
        public var roleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.VersionUpdateByJobsConfig) : this() {
            this.enabled = x.enabled
            this.roleArn = x.roleArn
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy