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

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

/**
 * The mapping attributes that determine the evidence source for a given control, along with related parameters and metadata. This doesn't contain `mappingID`.
 */
public class CreateControlMappingSource private constructor(builder: Builder) {
    /**
     * The description of the data source that determines where Audit Manager collects evidence from for the control.
     */
    public val sourceDescription: kotlin.String? = builder.sourceDescription
    /**
     * Specifies how often evidence is collected from the control mapping source.
     */
    public val sourceFrequency: aws.sdk.kotlin.services.auditmanager.model.SourceFrequency? = builder.sourceFrequency
    /**
     * A keyword that relates to the control data source.
     *
     * For manual evidence, this keyword indicates if the manual evidence is a file or text.
     *
     * For automated evidence, this keyword identifies a specific CloudTrail event, Config rule, Security Hub control, or Amazon Web Services API name.
     *
     *  To learn more about the supported keywords that you can use when mapping a control data source, see the following pages in the *Audit Manager User Guide*:
     * + [Config rules supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-config.html)
     * + [Security Hub controls supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-ash.html)
     * + [API calls supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-api.html)
     * + [CloudTrail event names supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-cloudtrail.html)
     */
    public val sourceKeyword: aws.sdk.kotlin.services.auditmanager.model.SourceKeyword? = builder.sourceKeyword
    /**
     * The name of the control mapping data source.
     */
    public val sourceName: kotlin.String? = builder.sourceName
    /**
     * The setup option for the data source. This option reflects if the evidence collection method is automated or manual. If you don’t provide a value for `sourceSetUpOption`, Audit Manager automatically infers and populates the correct value based on the `sourceType` that you specify.
     */
    public val sourceSetUpOption: aws.sdk.kotlin.services.auditmanager.model.SourceSetUpOption? = builder.sourceSetUpOption
    /**
     * Specifies which type of data source is used to collect evidence.
     * + The source can be an individual data source type, such as `AWS_Cloudtrail`, `AWS_Config`, `AWS_Security_Hub`, `AWS_API_Call`, or `MANUAL`.
     * + The source can also be a managed grouping of data sources, such as a `Core_Control` or a `Common_Control`.
     */
    public val sourceType: aws.sdk.kotlin.services.auditmanager.model.SourceType? = builder.sourceType
    /**
     * The instructions for troubleshooting the control.
     */
    public val troubleshootingText: kotlin.String? = builder.troubleshootingText

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

    override fun toString(): kotlin.String = buildString {
        append("CreateControlMappingSource(")
        append("sourceDescription=$sourceDescription,")
        append("sourceFrequency=$sourceFrequency,")
        append("sourceKeyword=$sourceKeyword,")
        append("sourceName=$sourceName,")
        append("sourceSetUpOption=$sourceSetUpOption,")
        append("sourceType=$sourceType,")
        append("troubleshootingText=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sourceDescription?.hashCode() ?: 0
        result = 31 * result + (sourceFrequency?.hashCode() ?: 0)
        result = 31 * result + (sourceKeyword?.hashCode() ?: 0)
        result = 31 * result + (sourceName?.hashCode() ?: 0)
        result = 31 * result + (sourceSetUpOption?.hashCode() ?: 0)
        result = 31 * result + (sourceType?.hashCode() ?: 0)
        result = 31 * result + (troubleshootingText?.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 CreateControlMappingSource

        if (sourceDescription != other.sourceDescription) return false
        if (sourceFrequency != other.sourceFrequency) return false
        if (sourceKeyword != other.sourceKeyword) return false
        if (sourceName != other.sourceName) return false
        if (sourceSetUpOption != other.sourceSetUpOption) return false
        if (sourceType != other.sourceType) return false
        if (troubleshootingText != other.troubleshootingText) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description of the data source that determines where Audit Manager collects evidence from for the control.
         */
        public var sourceDescription: kotlin.String? = null
        /**
         * Specifies how often evidence is collected from the control mapping source.
         */
        public var sourceFrequency: aws.sdk.kotlin.services.auditmanager.model.SourceFrequency? = null
        /**
         * A keyword that relates to the control data source.
         *
         * For manual evidence, this keyword indicates if the manual evidence is a file or text.
         *
         * For automated evidence, this keyword identifies a specific CloudTrail event, Config rule, Security Hub control, or Amazon Web Services API name.
         *
         *  To learn more about the supported keywords that you can use when mapping a control data source, see the following pages in the *Audit Manager User Guide*:
         * + [Config rules supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-config.html)
         * + [Security Hub controls supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-ash.html)
         * + [API calls supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-api.html)
         * + [CloudTrail event names supported by Audit Manager](https://docs.aws.amazon.com/audit-manager/latest/userguide/control-data-sources-cloudtrail.html)
         */
        public var sourceKeyword: aws.sdk.kotlin.services.auditmanager.model.SourceKeyword? = null
        /**
         * The name of the control mapping data source.
         */
        public var sourceName: kotlin.String? = null
        /**
         * The setup option for the data source. This option reflects if the evidence collection method is automated or manual. If you don’t provide a value for `sourceSetUpOption`, Audit Manager automatically infers and populates the correct value based on the `sourceType` that you specify.
         */
        public var sourceSetUpOption: aws.sdk.kotlin.services.auditmanager.model.SourceSetUpOption? = null
        /**
         * Specifies which type of data source is used to collect evidence.
         * + The source can be an individual data source type, such as `AWS_Cloudtrail`, `AWS_Config`, `AWS_Security_Hub`, `AWS_API_Call`, or `MANUAL`.
         * + The source can also be a managed grouping of data sources, such as a `Core_Control` or a `Common_Control`.
         */
        public var sourceType: aws.sdk.kotlin.services.auditmanager.model.SourceType? = null
        /**
         * The instructions for troubleshooting the control.
         */
        public var troubleshootingText: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.auditmanager.model.CreateControlMappingSource) : this() {
            this.sourceDescription = x.sourceDescription
            this.sourceFrequency = x.sourceFrequency
            this.sourceKeyword = x.sourceKeyword
            this.sourceName = x.sourceName
            this.sourceSetUpOption = x.sourceSetUpOption
            this.sourceType = x.sourceType
            this.troubleshootingText = x.troubleshootingText
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy