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

commonMain.aws.sdk.kotlin.services.rolesanywhere.model.TrustAnchorDetail.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rolesanywhere.model

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

/**
 * The state of the trust anchor after a read or write operation.
 */
public class TrustAnchorDetail private constructor(builder: Builder) {
    /**
     * The ISO-8601 timestamp when the trust anchor was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * Indicates whether the trust anchor is enabled.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * The name of the trust anchor.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A list of notification settings to be associated to the trust anchor.
     */
    public val notificationSettings: List? = builder.notificationSettings
    /**
     * The trust anchor type and its related certificate data.
     */
    public val source: aws.sdk.kotlin.services.rolesanywhere.model.Source? = builder.source
    /**
     * The ARN of the trust anchor.
     */
    public val trustAnchorArn: kotlin.String? = builder.trustAnchorArn
    /**
     * The unique identifier of the trust anchor.
     */
    public val trustAnchorId: kotlin.String? = builder.trustAnchorId
    /**
     * The ISO-8601 timestamp when the trust anchor was last updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("TrustAnchorDetail(")
        append("createdAt=$createdAt,")
        append("enabled=$enabled,")
        append("name=$name,")
        append("notificationSettings=$notificationSettings,")
        append("source=$source,")
        append("trustAnchorArn=$trustAnchorArn,")
        append("trustAnchorId=$trustAnchorId,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (enabled?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (notificationSettings?.hashCode() ?: 0)
        result = 31 * result + (source?.hashCode() ?: 0)
        result = 31 * result + (trustAnchorArn?.hashCode() ?: 0)
        result = 31 * result + (trustAnchorId?.hashCode() ?: 0)
        result = 31 * result + (updatedAt?.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 TrustAnchorDetail

        if (createdAt != other.createdAt) return false
        if (enabled != other.enabled) return false
        if (name != other.name) return false
        if (notificationSettings != other.notificationSettings) return false
        if (source != other.source) return false
        if (trustAnchorArn != other.trustAnchorArn) return false
        if (trustAnchorId != other.trustAnchorId) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    public class Builder {
        /**
         * The ISO-8601 timestamp when the trust anchor was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Indicates whether the trust anchor is enabled.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * The name of the trust anchor.
         */
        public var name: kotlin.String? = null
        /**
         * A list of notification settings to be associated to the trust anchor.
         */
        public var notificationSettings: List? = null
        /**
         * The trust anchor type and its related certificate data.
         */
        public var source: aws.sdk.kotlin.services.rolesanywhere.model.Source? = null
        /**
         * The ARN of the trust anchor.
         */
        public var trustAnchorArn: kotlin.String? = null
        /**
         * The unique identifier of the trust anchor.
         */
        public var trustAnchorId: kotlin.String? = null
        /**
         * The ISO-8601 timestamp when the trust anchor was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rolesanywhere.model.TrustAnchorDetail) : this() {
            this.createdAt = x.createdAt
            this.enabled = x.enabled
            this.name = x.name
            this.notificationSettings = x.notificationSettings
            this.source = x.source
            this.trustAnchorArn = x.trustAnchorArn
            this.trustAnchorId = x.trustAnchorId
            this.updatedAt = x.updatedAt
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.rolesanywhere.model.Source] inside the given [block]
         */
        public fun source(block: aws.sdk.kotlin.services.rolesanywhere.model.Source.Builder.() -> kotlin.Unit) {
            this.source = aws.sdk.kotlin.services.rolesanywhere.model.Source.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy