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

commonMain.aws.sdk.kotlin.services.securityhub.model.SecurityControl.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.securityhub.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A security control in Security Hub describes a security best practice related to a specific resource.
 */
public class SecurityControl private constructor(builder: Builder) {
    /**
     * The description of a security control across standards. This typically summarizes how Security Hub evaluates the control and the conditions under which it produces a failed finding. This parameter doesn't reference a specific standard.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The most recent reason for updating the customizable properties of a security control. This differs from the `UpdateReason` field of the `BatchUpdateStandardsControlAssociations`[](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_BatchUpdateStandardsControlAssociations.html) API, which tracks the reason for updating the enablement status of a control. This field accepts alphanumeric characters in addition to white spaces, dashes, and underscores.
     */
    public val lastUpdateReason: kotlin.String? = builder.lastUpdateReason
    /**
     * An object that identifies the name of a control parameter, its current value, and whether it has been customized.
     */
    public val parameters: Map? = builder.parameters
    /**
     * A link to Security Hub documentation that explains how to remediate a failed finding for a security control.
     */
    public val remediationUrl: kotlin.String? = builder.remediationUrl
    /**
     * The Amazon Resource Name (ARN) for a security control across standards, such as `arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1`. This parameter doesn't mention a specific standard.
     */
    public val securityControlArn: kotlin.String? = builder.securityControlArn
    /**
     * The unique identifier of a security control across standards. Values for this field typically consist of an Amazon Web Servicesservice name and a number, such as APIGateway.3.
     */
    public val securityControlId: kotlin.String? = builder.securityControlId
    /**
     * The enablement status of a security control in a specific standard.
     */
    public val securityControlStatus: aws.sdk.kotlin.services.securityhub.model.ControlStatus? = builder.securityControlStatus
    /**
     * The severity of a security control. For more information about how Security Hub determines control severity, see [Assigning severity to control findings](https://docs.aws.amazon.com/securityhub/latest/userguide/controls-findings-create-update.html#control-findings-severity) in the *Security Hub User Guide*.
     */
    public val severityRating: aws.sdk.kotlin.services.securityhub.model.SeverityRating? = builder.severityRating
    /**
     * The title of a security control.
     */
    public val title: kotlin.String? = builder.title
    /**
     * Identifies whether customizable properties of a security control are reflected in Security Hub findings. A status of `READY` indicates that Security Hub uses the current control parameter values when running security checks of the control. A status of `UPDATING` indicates that all security checks might not use the current parameter values.
     */
    public val updateStatus: aws.sdk.kotlin.services.securityhub.model.UpdateStatus? = builder.updateStatus

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

    override fun toString(): kotlin.String = buildString {
        append("SecurityControl(")
        append("description=$description,")
        append("lastUpdateReason=$lastUpdateReason,")
        append("parameters=$parameters,")
        append("remediationUrl=$remediationUrl,")
        append("securityControlArn=$securityControlArn,")
        append("securityControlId=$securityControlId,")
        append("securityControlStatus=$securityControlStatus,")
        append("severityRating=$severityRating,")
        append("title=$title,")
        append("updateStatus=$updateStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (lastUpdateReason?.hashCode() ?: 0)
        result = 31 * result + (parameters?.hashCode() ?: 0)
        result = 31 * result + (remediationUrl?.hashCode() ?: 0)
        result = 31 * result + (securityControlArn?.hashCode() ?: 0)
        result = 31 * result + (securityControlId?.hashCode() ?: 0)
        result = 31 * result + (securityControlStatus?.hashCode() ?: 0)
        result = 31 * result + (severityRating?.hashCode() ?: 0)
        result = 31 * result + (title?.hashCode() ?: 0)
        result = 31 * result + (updateStatus?.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 SecurityControl

        if (description != other.description) return false
        if (lastUpdateReason != other.lastUpdateReason) return false
        if (parameters != other.parameters) return false
        if (remediationUrl != other.remediationUrl) return false
        if (securityControlArn != other.securityControlArn) return false
        if (securityControlId != other.securityControlId) return false
        if (securityControlStatus != other.securityControlStatus) return false
        if (severityRating != other.severityRating) return false
        if (title != other.title) return false
        if (updateStatus != other.updateStatus) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description of a security control across standards. This typically summarizes how Security Hub evaluates the control and the conditions under which it produces a failed finding. This parameter doesn't reference a specific standard.
         */
        public var description: kotlin.String? = null
        /**
         * The most recent reason for updating the customizable properties of a security control. This differs from the `UpdateReason` field of the `BatchUpdateStandardsControlAssociations`[](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_BatchUpdateStandardsControlAssociations.html) API, which tracks the reason for updating the enablement status of a control. This field accepts alphanumeric characters in addition to white spaces, dashes, and underscores.
         */
        public var lastUpdateReason: kotlin.String? = null
        /**
         * An object that identifies the name of a control parameter, its current value, and whether it has been customized.
         */
        public var parameters: Map? = null
        /**
         * A link to Security Hub documentation that explains how to remediate a failed finding for a security control.
         */
        public var remediationUrl: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) for a security control across standards, such as `arn:aws:securityhub:eu-central-1:123456789012:security-control/S3.1`. This parameter doesn't mention a specific standard.
         */
        public var securityControlArn: kotlin.String? = null
        /**
         * The unique identifier of a security control across standards. Values for this field typically consist of an Amazon Web Servicesservice name and a number, such as APIGateway.3.
         */
        public var securityControlId: kotlin.String? = null
        /**
         * The enablement status of a security control in a specific standard.
         */
        public var securityControlStatus: aws.sdk.kotlin.services.securityhub.model.ControlStatus? = null
        /**
         * The severity of a security control. For more information about how Security Hub determines control severity, see [Assigning severity to control findings](https://docs.aws.amazon.com/securityhub/latest/userguide/controls-findings-create-update.html#control-findings-severity) in the *Security Hub User Guide*.
         */
        public var severityRating: aws.sdk.kotlin.services.securityhub.model.SeverityRating? = null
        /**
         * The title of a security control.
         */
        public var title: kotlin.String? = null
        /**
         * Identifies whether customizable properties of a security control are reflected in Security Hub findings. A status of `READY` indicates that Security Hub uses the current control parameter values when running security checks of the control. A status of `UPDATING` indicates that all security checks might not use the current parameter values.
         */
        public var updateStatus: aws.sdk.kotlin.services.securityhub.model.UpdateStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.securityhub.model.SecurityControl) : this() {
            this.description = x.description
            this.lastUpdateReason = x.lastUpdateReason
            this.parameters = x.parameters
            this.remediationUrl = x.remediationUrl
            this.securityControlArn = x.securityControlArn
            this.securityControlId = x.securityControlId
            this.securityControlStatus = x.securityControlStatus
            this.severityRating = x.severityRating
            this.title = x.title
            this.updateStatus = x.updateStatus
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy