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

commonMain.aws.sdk.kotlin.services.configservice.model.OrganizationConformancePackDetailedStatus.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

/**
 * Organization conformance pack creation or deletion status in each member account. This includes the name of the conformance pack, the status, error code and error message when the conformance pack creation or deletion failed.
 */
class OrganizationConformancePackDetailedStatus private constructor(builder: Builder) {
    /**
     * The 12-digit account ID of a member account.
     */
    val accountId: kotlin.String? = builder.accountId
    /**
     * The name of conformance pack deployed in the member account.
     */
    val conformancePackName: kotlin.String? = builder.conformancePackName
    /**
     * An error code that is returned when conformance pack creation or deletion failed in the member account.
     */
    val errorCode: kotlin.String? = builder.errorCode
    /**
     * An error message indicating that conformance pack account creation or deletion has failed due to an error in the member account.
     */
    val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The timestamp of the last status update.
     */
    val lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdateTime
    /**
     * Indicates deployment status for conformance pack in a member account. When master account calls `PutOrganizationConformancePack` action for the first time, conformance pack status is created in the member account. When master account calls `PutOrganizationConformancePack` action for the second time, conformance pack status is updated in the member account. Conformance pack status is deleted when the master account deletes `OrganizationConformancePack` and disables service access for `config-multiaccountsetup.amazonaws.com`.
     *
     *  Config sets the state of the conformance pack to:
     * + `CREATE_SUCCESSFUL` when conformance pack has been created in the member account.
     * + `CREATE_IN_PROGRESS` when conformance pack is being created in the member account.
     * + `CREATE_FAILED` when conformance pack creation has failed in the member account.
     * + `DELETE_FAILED` when conformance pack deletion has failed in the member account.
     * + `DELETE_IN_PROGRESS` when conformance pack is being deleted in the member account.
     * + `DELETE_SUCCESSFUL` when conformance pack has been deleted in the member account.
     * + `UPDATE_SUCCESSFUL` when conformance pack has been updated in the member account.
     * + `UPDATE_IN_PROGRESS` when conformance pack is being updated in the member account.
     * + `UPDATE_FAILED` when conformance pack deletion has failed in the member account.
     */
    val status: aws.sdk.kotlin.services.configservice.model.OrganizationResourceDetailedStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("OrganizationConformancePackDetailedStatus(")
        append("accountId=$accountId,")
        append("conformancePackName=$conformancePackName,")
        append("errorCode=$errorCode,")
        append("errorMessage=$errorMessage,")
        append("lastUpdateTime=$lastUpdateTime,")
        append("status=$status)")
    }

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

        if (accountId != other.accountId) return false
        if (conformancePackName != other.conformancePackName) return false
        if (errorCode != other.errorCode) return false
        if (errorMessage != other.errorMessage) return false
        if (lastUpdateTime != other.lastUpdateTime) return false
        if (status != other.status) return false

        return true
    }

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

    class Builder {
        /**
         * The 12-digit account ID of a member account.
         */
        var accountId: kotlin.String? = null
        /**
         * The name of conformance pack deployed in the member account.
         */
        var conformancePackName: kotlin.String? = null
        /**
         * An error code that is returned when conformance pack creation or deletion failed in the member account.
         */
        var errorCode: kotlin.String? = null
        /**
         * An error message indicating that conformance pack account creation or deletion has failed due to an error in the member account.
         */
        var errorMessage: kotlin.String? = null
        /**
         * The timestamp of the last status update.
         */
        var lastUpdateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Indicates deployment status for conformance pack in a member account. When master account calls `PutOrganizationConformancePack` action for the first time, conformance pack status is created in the member account. When master account calls `PutOrganizationConformancePack` action for the second time, conformance pack status is updated in the member account. Conformance pack status is deleted when the master account deletes `OrganizationConformancePack` and disables service access for `config-multiaccountsetup.amazonaws.com`.
         *
         *  Config sets the state of the conformance pack to:
         * + `CREATE_SUCCESSFUL` when conformance pack has been created in the member account.
         * + `CREATE_IN_PROGRESS` when conformance pack is being created in the member account.
         * + `CREATE_FAILED` when conformance pack creation has failed in the member account.
         * + `DELETE_FAILED` when conformance pack deletion has failed in the member account.
         * + `DELETE_IN_PROGRESS` when conformance pack is being deleted in the member account.
         * + `DELETE_SUCCESSFUL` when conformance pack has been deleted in the member account.
         * + `UPDATE_SUCCESSFUL` when conformance pack has been updated in the member account.
         * + `UPDATE_IN_PROGRESS` when conformance pack is being updated in the member account.
         * + `UPDATE_FAILED` when conformance pack deletion has failed in the member account.
         */
        var status: aws.sdk.kotlin.services.configservice.model.OrganizationResourceDetailedStatus? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.OrganizationConformancePackDetailedStatus) : this() {
            this.accountId = x.accountId
            this.conformancePackName = x.conformancePackName
            this.errorCode = x.errorCode
            this.errorMessage = x.errorMessage
            this.lastUpdateTime = x.lastUpdateTime
            this.status = x.status
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy