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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Returns the status for an organization Config rule in an organization.
 */
public class OrganizationConfigRuleStatus private constructor(builder: Builder) {
    /**
     * An error code that is returned when organization Config rule creation or deletion has failed.
     */
    public val errorCode: kotlin.String? = builder.errorCode
    /**
     * An error message indicating that organization Config rule creation or deletion failed due to an error.
     */
    public val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The timestamp of the last update.
     */
    public val lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdateTime
    /**
     * The name that you assign to organization Config rule.
     */
    public val organizationConfigRuleName: kotlin.String = requireNotNull(builder.organizationConfigRuleName) { "A non-null value must be provided for organizationConfigRuleName" }
    /**
     * Indicates deployment status of an organization Config rule. When management account calls PutOrganizationConfigRule action for the first time, Config rule status is created in all the member accounts. When management account calls PutOrganizationConfigRule action for the second time, Config rule status is updated in all the member accounts. Additionally, Config rule status is updated when one or more member accounts join or leave an organization. Config rule status is deleted when the management account deletes OrganizationConfigRule in all the member accounts and disables service access for `config-multiaccountsetup.amazonaws.com`.
     *
     * Config sets the state of the rule to:
     * + `CREATE_SUCCESSFUL` when an organization Config rule has been successfully created in all the member accounts.
     * + `CREATE_IN_PROGRESS` when an organization Config rule creation is in progress.
     * + `CREATE_FAILED` when an organization Config rule creation failed in one or more member accounts within that organization.
     * + `DELETE_FAILED` when an organization Config rule deletion failed in one or more member accounts within that organization.
     * + `DELETE_IN_PROGRESS` when an organization Config rule deletion is in progress.
     * + `DELETE_SUCCESSFUL` when an organization Config rule has been successfully deleted from all the member accounts.
     * + `UPDATE_SUCCESSFUL` when an organization Config rule has been successfully updated in all the member accounts.
     * + `UPDATE_IN_PROGRESS` when an organization Config rule update is in progress.
     * + `UPDATE_FAILED` when an organization Config rule update failed in one or more member accounts within that organization.
     */
    public val organizationRuleStatus: aws.sdk.kotlin.services.configservice.model.OrganizationRuleStatus = requireNotNull(builder.organizationRuleStatus) { "A non-null value must be provided for organizationRuleStatus" }

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

    override fun toString(): kotlin.String = buildString {
        append("OrganizationConfigRuleStatus(")
        append("errorCode=$errorCode,")
        append("errorMessage=$errorMessage,")
        append("lastUpdateTime=$lastUpdateTime,")
        append("organizationConfigRuleName=$organizationConfigRuleName,")
        append("organizationRuleStatus=$organizationRuleStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = errorCode?.hashCode() ?: 0
        result = 31 * result + (errorMessage?.hashCode() ?: 0)
        result = 31 * result + (lastUpdateTime?.hashCode() ?: 0)
        result = 31 * result + (organizationConfigRuleName.hashCode())
        result = 31 * result + (organizationRuleStatus.hashCode())
        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 OrganizationConfigRuleStatus

        if (errorCode != other.errorCode) return false
        if (errorMessage != other.errorMessage) return false
        if (lastUpdateTime != other.lastUpdateTime) return false
        if (organizationConfigRuleName != other.organizationConfigRuleName) return false
        if (organizationRuleStatus != other.organizationRuleStatus) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An error code that is returned when organization Config rule creation or deletion has failed.
         */
        public var errorCode: kotlin.String? = null
        /**
         * An error message indicating that organization Config rule creation or deletion failed due to an error.
         */
        public var errorMessage: kotlin.String? = null
        /**
         * The timestamp of the last update.
         */
        public var lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name that you assign to organization Config rule.
         */
        public var organizationConfigRuleName: kotlin.String? = null
        /**
         * Indicates deployment status of an organization Config rule. When management account calls PutOrganizationConfigRule action for the first time, Config rule status is created in all the member accounts. When management account calls PutOrganizationConfigRule action for the second time, Config rule status is updated in all the member accounts. Additionally, Config rule status is updated when one or more member accounts join or leave an organization. Config rule status is deleted when the management account deletes OrganizationConfigRule in all the member accounts and disables service access for `config-multiaccountsetup.amazonaws.com`.
         *
         * Config sets the state of the rule to:
         * + `CREATE_SUCCESSFUL` when an organization Config rule has been successfully created in all the member accounts.
         * + `CREATE_IN_PROGRESS` when an organization Config rule creation is in progress.
         * + `CREATE_FAILED` when an organization Config rule creation failed in one or more member accounts within that organization.
         * + `DELETE_FAILED` when an organization Config rule deletion failed in one or more member accounts within that organization.
         * + `DELETE_IN_PROGRESS` when an organization Config rule deletion is in progress.
         * + `DELETE_SUCCESSFUL` when an organization Config rule has been successfully deleted from all the member accounts.
         * + `UPDATE_SUCCESSFUL` when an organization Config rule has been successfully updated in all the member accounts.
         * + `UPDATE_IN_PROGRESS` when an organization Config rule update is in progress.
         * + `UPDATE_FAILED` when an organization Config rule update failed in one or more member accounts within that organization.
         */
        public var organizationRuleStatus: aws.sdk.kotlin.services.configservice.model.OrganizationRuleStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.OrganizationConfigRuleStatus) : this() {
            this.errorCode = x.errorCode
            this.errorMessage = x.errorMessage
            this.lastUpdateTime = x.lastUpdateTime
            this.organizationConfigRuleName = x.organizationConfigRuleName
            this.organizationRuleStatus = x.organizationRuleStatus
        }

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

        internal fun correctErrors(): Builder {
            if (organizationConfigRuleName == null) organizationConfigRuleName = ""
            if (organizationRuleStatus == null) organizationRuleStatus = OrganizationRuleStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy