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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.GetEnrollmentStatusResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.computeoptimizer.model

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

public class GetEnrollmentStatusResponse private constructor(builder: Builder) {
    /**
     * The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.
     */
    public val lastUpdatedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedTimestamp
    /**
     * Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.
     */
    public val memberAccountsEnrolled: kotlin.Boolean = builder.memberAccountsEnrolled
    /**
     * The count of organization member accounts that are opted in to the service, if your account is an organization management account.
     */
    public val numberOfMemberAccountsOptedIn: kotlin.Int? = builder.numberOfMemberAccountsOptedIn
    /**
     * The enrollment status of the account.
     */
    public val status: aws.sdk.kotlin.services.computeoptimizer.model.Status? = builder.status
    /**
     * The reason for the enrollment status of the account.
     *
     * For example, an account might show a status of `Pending` because member accounts of an organization require more time to be enrolled in the service.
     */
    public val statusReason: kotlin.String? = builder.statusReason

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

    override fun toString(): kotlin.String = buildString {
        append("GetEnrollmentStatusResponse(")
        append("lastUpdatedTimestamp=$lastUpdatedTimestamp,")
        append("memberAccountsEnrolled=$memberAccountsEnrolled,")
        append("numberOfMemberAccountsOptedIn=$numberOfMemberAccountsOptedIn,")
        append("status=$status,")
        append("statusReason=$statusReason")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastUpdatedTimestamp?.hashCode() ?: 0
        result = 31 * result + (memberAccountsEnrolled.hashCode())
        result = 31 * result + (numberOfMemberAccountsOptedIn ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (statusReason?.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 GetEnrollmentStatusResponse

        if (lastUpdatedTimestamp != other.lastUpdatedTimestamp) return false
        if (memberAccountsEnrolled != other.memberAccountsEnrolled) return false
        if (numberOfMemberAccountsOptedIn != other.numberOfMemberAccountsOptedIn) return false
        if (status != other.status) return false
        if (statusReason != other.statusReason) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.
         */
        public var lastUpdatedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.
         */
        public var memberAccountsEnrolled: kotlin.Boolean = false
        /**
         * The count of organization member accounts that are opted in to the service, if your account is an organization management account.
         */
        public var numberOfMemberAccountsOptedIn: kotlin.Int? = null
        /**
         * The enrollment status of the account.
         */
        public var status: aws.sdk.kotlin.services.computeoptimizer.model.Status? = null
        /**
         * The reason for the enrollment status of the account.
         *
         * For example, an account might show a status of `Pending` because member accounts of an organization require more time to be enrolled in the service.
         */
        public var statusReason: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.GetEnrollmentStatusResponse) : this() {
            this.lastUpdatedTimestamp = x.lastUpdatedTimestamp
            this.memberAccountsEnrolled = x.memberAccountsEnrolled
            this.numberOfMemberAccountsOptedIn = x.numberOfMemberAccountsOptedIn
            this.status = x.status
            this.statusReason = x.statusReason
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy