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

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

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

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

/**
 * Returns the status for an organization Config rule in an organization.
 */
class OrganizationConfigRuleStatus private constructor(builder: Builder) {
    /**
     * An error code that is returned when organization Config rule creation or deletion has failed.
     */
    val errorCode: kotlin.String? = builder.errorCode
    /**
     * An error message indicating that organization Config rule creation or deletion failed due to an error.
     */
    val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The timestamp of the last update.
     */
    val lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdateTime
    /**
     * The name that you assign to organization Config rule.
     */
    val organizationConfigRuleName: kotlin.String? = builder.organizationConfigRuleName
    /**
     * Indicates deployment status of an organization Config rule. When master account calls PutOrganizationConfigRule action for the first time, Config rule status is created in all the member accounts. When master 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 master 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.
     */
    val organizationRuleStatus: aws.sdk.kotlin.services.configservice.model.OrganizationRuleStatus? = builder.organizationRuleStatus

    companion object {
        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)")
    }

    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() ?: 0)
        result = 31 * result + (organizationRuleStatus?.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 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
    }

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

    class Builder {
        /**
         * An error code that is returned when organization Config rule creation or deletion has failed.
         */
        var errorCode: kotlin.String? = null
        /**
         * An error message indicating that organization Config rule creation or deletion failed due to an error.
         */
        var errorMessage: kotlin.String? = null
        /**
         * The timestamp of the last update.
         */
        var lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name that you assign to organization Config rule.
         */
        var organizationConfigRuleName: kotlin.String? = null
        /**
         * Indicates deployment status of an organization Config rule. When master account calls PutOrganizationConfigRule action for the first time, Config rule status is created in all the member accounts. When master 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 master 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.
         */
        var organizationRuleStatus: aws.sdk.kotlin.services.configservice.model.OrganizationRuleStatus? = null

        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)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy