commonMain.aws.sdk.kotlin.services.wafv2.model.RuleSummary.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wafv2.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* High-level information about a Rule, returned by operations like DescribeManagedRuleGroup. This provides information like the ID, that you can use to retrieve and manage a `RuleGroup`, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.
*/
public class RuleSummary private constructor(builder: Builder) {
/**
* The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.
*/
public val action: aws.sdk.kotlin.services.wafv2.model.RuleAction? = builder.action
/**
* The name of the rule.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.RuleSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RuleSummary(")
append("action=$action,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (name?.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 RuleSummary
if (action != other.action) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.RuleSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.
*/
public var action: aws.sdk.kotlin.services.wafv2.model.RuleAction? = null
/**
* The name of the rule.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.RuleSummary) : this() {
this.action = x.action
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.RuleSummary = RuleSummary(this)
/**
* construct an [aws.sdk.kotlin.services.wafv2.model.RuleAction] inside the given [block]
*/
public fun action(block: aws.sdk.kotlin.services.wafv2.model.RuleAction.Builder.() -> kotlin.Unit) {
this.action = aws.sdk.kotlin.services.wafv2.model.RuleAction.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy