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

commonMain.aws.sdk.kotlin.services.fms.model.PartialMatch.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fms.model



/**
 * The reference rule that partially matches the `ViolationTarget` rule and violation reason.
 */
public class PartialMatch private constructor(builder: Builder) {
    /**
     * The reference rule from the primary security group of the Firewall Manager policy.
     */
    public val reference: kotlin.String? = builder.reference
    /**
     * The violation reason.
     */
    public val targetViolationReasons: List? = builder.targetViolationReasons

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

    override fun toString(): kotlin.String = buildString {
        append("PartialMatch(")
        append("reference=$reference,")
        append("targetViolationReasons=$targetViolationReasons")
        append(")")
    }

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

        if (reference != other.reference) return false
        if (targetViolationReasons != other.targetViolationReasons) return false

        return true
    }

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

    public class Builder {
        /**
         * The reference rule from the primary security group of the Firewall Manager policy.
         */
        public var reference: kotlin.String? = null
        /**
         * The violation reason.
         */
        public var targetViolationReasons: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fms.model.PartialMatch) : this() {
            this.reference = x.reference
            this.targetViolationReasons = x.targetViolationReasons
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.fms.model.PartialMatch = PartialMatch(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy