
commonMain.aws.sdk.kotlin.services.waf.model.GetRuleResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.waf.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetRuleResponse private constructor(builder: Builder) {
/**
* Information about the Rule that you specified in the `GetRule` request. For more information, see the following topics:
* + Rule: Contains `MetricName`, `Name`, an array of `Predicate` objects, and `RuleId`
* + Predicate: Each `Predicate` object contains `DataId`, `Negated`, and `Type`
*/
public val rule: aws.sdk.kotlin.services.waf.model.Rule? = builder.rule
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.waf.model.GetRuleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetRuleResponse(")
append("rule=$rule")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = rule?.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 GetRuleResponse
if (rule != other.rule) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.waf.model.GetRuleResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Information about the Rule that you specified in the `GetRule` request. For more information, see the following topics:
* + Rule: Contains `MetricName`, `Name`, an array of `Predicate` objects, and `RuleId`
* + Predicate: Each `Predicate` object contains `DataId`, `Negated`, and `Type`
*/
public var rule: aws.sdk.kotlin.services.waf.model.Rule? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.waf.model.GetRuleResponse) : this() {
this.rule = x.rule
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.waf.model.GetRuleResponse = GetRuleResponse(this)
/**
* construct an [aws.sdk.kotlin.services.waf.model.Rule] inside the given [block]
*/
public fun rule(block: aws.sdk.kotlin.services.waf.model.Rule.Builder.() -> kotlin.Unit) {
this.rule = aws.sdk.kotlin.services.waf.model.Rule.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy