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

commonMain.aws.sdk.kotlin.services.auditmanager.model.CreateAssessmentRequest.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

public class CreateAssessmentRequest private constructor(builder: Builder) {
    /**
     * The assessment report storage destination for the assessment that's being created.
     */
    public val assessmentReportsDestination: aws.sdk.kotlin.services.auditmanager.model.AssessmentReportsDestination? = builder.assessmentReportsDestination
    /**
     * The optional description of the assessment to be created.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The identifier for the framework that the assessment will be created from.
     */
    public val frameworkId: kotlin.String? = builder.frameworkId
    /**
     * The name of the assessment to be created.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The list of roles for the assessment.
     */
    public val roles: List? = builder.roles
    /**
     * The wrapper that contains the Amazon Web Services accounts that are in scope for the assessment.
     *
     * You no longer need to specify which Amazon Web Services are in scope when you create or update an assessment. Audit Manager infers the services in scope by examining your assessment controls and their data sources, and then mapping this information to the relevant Amazon Web Services.
     *
     * If an underlying data source changes for your assessment, we automatically update the services scope as needed to reflect the correct Amazon Web Services. This ensures that your assessment collects accurate and comprehensive evidence about all of the relevant services in your AWS environment.
     */
    public val scope: aws.sdk.kotlin.services.auditmanager.model.Scope? = builder.scope
    /**
     * The tags that are associated with the assessment.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateAssessmentRequest(")
        append("assessmentReportsDestination=*** Sensitive Data Redacted ***,")
        append("description=*** Sensitive Data Redacted ***,")
        append("frameworkId=$frameworkId,")
        append("name=*** Sensitive Data Redacted ***,")
        append("roles=*** Sensitive Data Redacted ***,")
        append("scope=*** Sensitive Data Redacted ***,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = assessmentReportsDestination?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (frameworkId?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (roles?.hashCode() ?: 0)
        result = 31 * result + (scope?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateAssessmentRequest

        if (assessmentReportsDestination != other.assessmentReportsDestination) return false
        if (description != other.description) return false
        if (frameworkId != other.frameworkId) return false
        if (name != other.name) return false
        if (roles != other.roles) return false
        if (scope != other.scope) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The assessment report storage destination for the assessment that's being created.
         */
        public var assessmentReportsDestination: aws.sdk.kotlin.services.auditmanager.model.AssessmentReportsDestination? = null
        /**
         * The optional description of the assessment to be created.
         */
        public var description: kotlin.String? = null
        /**
         * The identifier for the framework that the assessment will be created from.
         */
        public var frameworkId: kotlin.String? = null
        /**
         * The name of the assessment to be created.
         */
        public var name: kotlin.String? = null
        /**
         * The list of roles for the assessment.
         */
        public var roles: List? = null
        /**
         * The wrapper that contains the Amazon Web Services accounts that are in scope for the assessment.
         *
         * You no longer need to specify which Amazon Web Services are in scope when you create or update an assessment. Audit Manager infers the services in scope by examining your assessment controls and their data sources, and then mapping this information to the relevant Amazon Web Services.
         *
         * If an underlying data source changes for your assessment, we automatically update the services scope as needed to reflect the correct Amazon Web Services. This ensures that your assessment collects accurate and comprehensive evidence about all of the relevant services in your AWS environment.
         */
        public var scope: aws.sdk.kotlin.services.auditmanager.model.Scope? = null
        /**
         * The tags that are associated with the assessment.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.auditmanager.model.CreateAssessmentRequest) : this() {
            this.assessmentReportsDestination = x.assessmentReportsDestination
            this.description = x.description
            this.frameworkId = x.frameworkId
            this.name = x.name
            this.roles = x.roles
            this.scope = x.scope
            this.tags = x.tags
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy