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

commonMain.aws.sdk.kotlin.services.appconfig.model.UpdateAccountSettingsResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.appconfig.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateAccountSettingsResponse private constructor(builder: Builder) {
    /**
     * A parameter to configure deletion protection. If enabled, deletion protection prevents a user from deleting a configuration profile or an environment if AppConfig has called either [GetLatestConfiguration](https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html) or for the configuration profile or from the environment during the specified interval. Deletion protection is disabled by default. The default interval for `ProtectionPeriodInMinutes` is 60.
     */
    public val deletionProtection: aws.sdk.kotlin.services.appconfig.model.DeletionProtectionSettings? = builder.deletionProtection

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateAccountSettingsResponse(")
        append("deletionProtection=$deletionProtection")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deletionProtection?.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 UpdateAccountSettingsResponse

        if (deletionProtection != other.deletionProtection) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A parameter to configure deletion protection. If enabled, deletion protection prevents a user from deleting a configuration profile or an environment if AppConfig has called either [GetLatestConfiguration](https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html) or for the configuration profile or from the environment during the specified interval. Deletion protection is disabled by default. The default interval for `ProtectionPeriodInMinutes` is 60.
         */
        public var deletionProtection: aws.sdk.kotlin.services.appconfig.model.DeletionProtectionSettings? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appconfig.model.UpdateAccountSettingsResponse) : this() {
            this.deletionProtection = x.deletionProtection
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.appconfig.model.DeletionProtectionSettings] inside the given [block]
         */
        public fun deletionProtection(block: aws.sdk.kotlin.services.appconfig.model.DeletionProtectionSettings.Builder.() -> kotlin.Unit) {
            this.deletionProtection = aws.sdk.kotlin.services.appconfig.model.DeletionProtectionSettings.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy