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

commonMain.aws.sdk.kotlin.services.auditmanager.model.DelegationMetadata.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.auditmanager.model

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

/**
 * The metadata that's associated with the delegation.
 */
public class DelegationMetadata private constructor(builder: Builder) {
    /**
     * The unique identifier for the assessment.
     */
    public val assessmentId: kotlin.String? = builder.assessmentId
    /**
     * The name of the associated assessment.
     */
    public val assessmentName: kotlin.String? = builder.assessmentName
    /**
     * Specifies the name of the control set that was delegated for review.
     */
    public val controlSetName: kotlin.String? = builder.controlSetName
    /**
     * Specifies when the delegation was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The unique identifier for the delegation.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The Amazon Resource Name (ARN) of the IAM role.
     */
    public val roleArn: kotlin.String? = builder.roleArn
    /**
     * The current status of the delegation.
     */
    public val status: aws.sdk.kotlin.services.auditmanager.model.DelegationStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("DelegationMetadata(")
        append("assessmentId=$assessmentId,")
        append("assessmentName=*** Sensitive Data Redacted ***,")
        append("controlSetName=$controlSetName,")
        append("creationTime=$creationTime,")
        append("id=$id,")
        append("roleArn=$roleArn,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assessmentId?.hashCode() ?: 0
        result = 31 * result + (assessmentName?.hashCode() ?: 0)
        result = 31 * result + (controlSetName?.hashCode() ?: 0)
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (roleArn?.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 DelegationMetadata

        if (assessmentId != other.assessmentId) return false
        if (assessmentName != other.assessmentName) return false
        if (controlSetName != other.controlSetName) return false
        if (creationTime != other.creationTime) return false
        if (id != other.id) return false
        if (roleArn != other.roleArn) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique identifier for the assessment.
         */
        public var assessmentId: kotlin.String? = null
        /**
         * The name of the associated assessment.
         */
        public var assessmentName: kotlin.String? = null
        /**
         * Specifies the name of the control set that was delegated for review.
         */
        public var controlSetName: kotlin.String? = null
        /**
         * Specifies when the delegation was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The unique identifier for the delegation.
         */
        public var id: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the IAM role.
         */
        public var roleArn: kotlin.String? = null
        /**
         * The current status of the delegation.
         */
        public var status: aws.sdk.kotlin.services.auditmanager.model.DelegationStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.auditmanager.model.DelegationMetadata) : this() {
            this.assessmentId = x.assessmentId
            this.assessmentName = x.assessmentName
            this.controlSetName = x.controlSetName
            this.creationTime = x.creationTime
            this.id = x.id
            this.roleArn = x.roleArn
            this.status = x.status
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy