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

commonMain.aws.sdk.kotlin.services.configservice.model.SsmControls.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.configservice.model



/**
 * Amazon Web Services Systems Manager (SSM) specific remediation controls.
 */
public class SsmControls private constructor(builder: Builder) {
    /**
     * The maximum percentage of remediation actions allowed to run in parallel on the non-compliant resources for that specific rule. You can specify a percentage, such as 10%. The default value is 10.
     */
    public val concurrentExecutionRatePercentage: kotlin.Int? = builder.concurrentExecutionRatePercentage
    /**
     * The percentage of errors that are allowed before SSM stops running automations on non-compliant resources for that specific rule. You can specify a percentage of errors, for example 10%. If you do not specifiy a percentage, the default is 50%. For example, if you set the ErrorPercentage to 40% for 10 non-compliant resources, then SSM stops running the automations when the fifth error is received.
     */
    public val errorPercentage: kotlin.Int? = builder.errorPercentage

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

    override fun toString(): kotlin.String = buildString {
        append("SsmControls(")
        append("concurrentExecutionRatePercentage=$concurrentExecutionRatePercentage,")
        append("errorPercentage=$errorPercentage")
        append(")")
    }

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

        if (concurrentExecutionRatePercentage != other.concurrentExecutionRatePercentage) return false
        if (errorPercentage != other.errorPercentage) return false

        return true
    }

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

    public class Builder {
        /**
         * The maximum percentage of remediation actions allowed to run in parallel on the non-compliant resources for that specific rule. You can specify a percentage, such as 10%. The default value is 10.
         */
        public var concurrentExecutionRatePercentage: kotlin.Int? = null
        /**
         * The percentage of errors that are allowed before SSM stops running automations on non-compliant resources for that specific rule. You can specify a percentage of errors, for example 10%. If you do not specifiy a percentage, the default is 50%. For example, if you set the ErrorPercentage to 40% for 10 non-compliant resources, then SSM stops running the automations when the fifth error is received.
         */
        public var errorPercentage: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.SsmControls) : this() {
            this.concurrentExecutionRatePercentage = x.concurrentExecutionRatePercentage
            this.errorPercentage = x.errorPercentage
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy