commonMain.aws.sdk.kotlin.services.wafv2.model.OrStatement.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wafv2-jvm Show documentation
Show all versions of wafv2-jvm Show documentation
The AWS Kotlin client for WAFV2
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wafv2.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A logical rule statement used to combine other rule statements with OR logic. You provide more than one Statement within the `OrStatement`.
*/
public class OrStatement private constructor(builder: Builder) {
/**
* The statements to combine with OR logic. You can use any statements that can be nested.
*/
public val statements: List = requireNotNull(builder.statements) { "A non-null value must be provided for statements" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.OrStatement = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OrStatement(")
append("statements=$statements")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = statements.hashCode()
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 OrStatement
if (statements != other.statements) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.OrStatement = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The statements to combine with OR logic. You can use any statements that can be nested.
*/
public var statements: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.OrStatement) : this() {
this.statements = x.statements
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.OrStatement = OrStatement(this)
internal fun correctErrors(): Builder {
if (statements == null) statements = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy