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

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

/**
 * An object that provides the current value of a security control parameter and identifies whether it has been customized.
 */
public class ParameterConfiguration private constructor(builder: Builder) {
    /**
     * The current value of a control parameter.
     */
    public val value: aws.sdk.kotlin.services.securityhub.model.ParameterValue? = builder.value
    /**
     * Identifies whether a control parameter uses a custom user-defined value or subscribes to the default Security Hub behavior.
     *
     * When `ValueType` is set equal to `DEFAULT`, the default behavior can be a specific Security Hub default value, or the default behavior can be to ignore a specific parameter. When `ValueType` is set equal to `DEFAULT`, Security Hub ignores user-provided input for the `Value` field.
     *
     * When `ValueType` is set equal to `CUSTOM`, the `Value` field can't be empty.
     */
    public val valueType: aws.sdk.kotlin.services.securityhub.model.ParameterValueType? = builder.valueType

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

    override fun toString(): kotlin.String = buildString {
        append("ParameterConfiguration(")
        append("value=$value,")
        append("valueType=$valueType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = value?.hashCode() ?: 0
        result = 31 * result + (valueType?.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 ParameterConfiguration

        if (value != other.value) return false
        if (valueType != other.valueType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The current value of a control parameter.
         */
        public var value: aws.sdk.kotlin.services.securityhub.model.ParameterValue? = null
        /**
         * Identifies whether a control parameter uses a custom user-defined value or subscribes to the default Security Hub behavior.
         *
         * When `ValueType` is set equal to `DEFAULT`, the default behavior can be a specific Security Hub default value, or the default behavior can be to ignore a specific parameter. When `ValueType` is set equal to `DEFAULT`, Security Hub ignores user-provided input for the `Value` field.
         *
         * When `ValueType` is set equal to `CUSTOM`, the `Value` field can't be empty.
         */
        public var valueType: aws.sdk.kotlin.services.securityhub.model.ParameterValueType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.securityhub.model.ParameterConfiguration) : this() {
            this.value = x.value
            this.valueType = x.valueType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy