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

commonMain.aws.sdk.kotlin.services.configservice.model.OrganizationConformancePackStatus.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 conformance pack in an organization.
 */
public class OrganizationConformancePackStatus private constructor(builder: Builder) {
    /**
     * An error code that is returned when organization conformance pack creation or deletion has failed in a member account.
     */
    public val errorCode: kotlin.String? = builder.errorCode
    /**
     * An error message indicating that organization conformance pack 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 conformance pack.
     */
    public val organizationConformancePackName: kotlin.String = requireNotNull(builder.organizationConformancePackName) { "A non-null value must be provided for organizationConformancePackName" }
    /**
     * Indicates deployment status of an organization conformance pack. When management account calls PutOrganizationConformancePack for the first time, conformance pack status is created in all the member accounts. When management account calls PutOrganizationConformancePack for the second time, conformance pack status is updated in all the member accounts. Additionally, conformance pack status is updated when one or more member accounts join or leave an organization. Conformance pack status is deleted when the management account deletes OrganizationConformancePack in all the member accounts and disables service access for `config-multiaccountsetup.amazonaws.com`.
     *
     * Config sets the state of the conformance pack to:
     * + `CREATE_SUCCESSFUL` when an organization conformance pack has been successfully created in all the member accounts.
     * + `CREATE_IN_PROGRESS` when an organization conformance pack creation is in progress.
     * + `CREATE_FAILED` when an organization conformance pack creation failed in one or more member accounts within that organization.
     * + `DELETE_FAILED` when an organization conformance pack deletion failed in one or more member accounts within that organization.
     * + `DELETE_IN_PROGRESS` when an organization conformance pack deletion is in progress.
     * + `DELETE_SUCCESSFUL` when an organization conformance pack has been successfully deleted from all the member accounts.
     * + `UPDATE_SUCCESSFUL` when an organization conformance pack has been successfully updated in all the member accounts.
     * + `UPDATE_IN_PROGRESS` when an organization conformance pack update is in progress.
     * + `UPDATE_FAILED` when an organization conformance pack update failed in one or more member accounts within that organization.
     */
    public val status: aws.sdk.kotlin.services.configservice.model.OrganizationResourceStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }

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

    override fun toString(): kotlin.String = buildString {
        append("OrganizationConformancePackStatus(")
        append("errorCode=$errorCode,")
        append("errorMessage=$errorMessage,")
        append("lastUpdateTime=$lastUpdateTime,")
        append("organizationConformancePackName=$organizationConformancePackName,")
        append("status=$status")
        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 + (organizationConformancePackName.hashCode())
        result = 31 * result + (status.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 OrganizationConformancePackStatus

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

        return true
    }

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

    public class Builder {
        /**
         * An error code that is returned when organization conformance pack creation or deletion has failed in a member account.
         */
        public var errorCode: kotlin.String? = null
        /**
         * An error message indicating that organization conformance pack 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 conformance pack.
         */
        public var organizationConformancePackName: kotlin.String? = null
        /**
         * Indicates deployment status of an organization conformance pack. When management account calls PutOrganizationConformancePack for the first time, conformance pack status is created in all the member accounts. When management account calls PutOrganizationConformancePack for the second time, conformance pack status is updated in all the member accounts. Additionally, conformance pack status is updated when one or more member accounts join or leave an organization. Conformance pack status is deleted when the management account deletes OrganizationConformancePack in all the member accounts and disables service access for `config-multiaccountsetup.amazonaws.com`.
         *
         * Config sets the state of the conformance pack to:
         * + `CREATE_SUCCESSFUL` when an organization conformance pack has been successfully created in all the member accounts.
         * + `CREATE_IN_PROGRESS` when an organization conformance pack creation is in progress.
         * + `CREATE_FAILED` when an organization conformance pack creation failed in one or more member accounts within that organization.
         * + `DELETE_FAILED` when an organization conformance pack deletion failed in one or more member accounts within that organization.
         * + `DELETE_IN_PROGRESS` when an organization conformance pack deletion is in progress.
         * + `DELETE_SUCCESSFUL` when an organization conformance pack has been successfully deleted from all the member accounts.
         * + `UPDATE_SUCCESSFUL` when an organization conformance pack has been successfully updated in all the member accounts.
         * + `UPDATE_IN_PROGRESS` when an organization conformance pack update is in progress.
         * + `UPDATE_FAILED` when an organization conformance pack update failed in one or more member accounts within that organization.
         */
        public var status: aws.sdk.kotlin.services.configservice.model.OrganizationResourceStatus? = null

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

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

        internal fun correctErrors(): Builder {
            if (organizationConformancePackName == null) organizationConformancePackName = ""
            if (status == null) status = OrganizationResourceStatus.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy