commonMain.aws.sdk.kotlin.services.wafv2.model.CookieMatchPattern.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
/**
* The filter to use to identify the subset of cookies to inspect in a web request.
*
* You must specify exactly one setting: either `All`, `IncludedCookies`, or `ExcludedCookies`.
*
* Example JSON: `"MatchPattern": { "IncludedCookies": [ "session-id-time", "session-id" ] }`
*/
public class CookieMatchPattern private constructor(builder: Builder) {
/**
* Inspect all cookies.
*/
public val all: aws.sdk.kotlin.services.wafv2.model.All? = builder.all
/**
* Inspect only the cookies whose keys don't match any of the strings specified here.
*/
public val excludedCookies: List? = builder.excludedCookies
/**
* Inspect only the cookies that have a key that matches one of the strings specified here.
*/
public val includedCookies: List? = builder.includedCookies
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.CookieMatchPattern = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CookieMatchPattern(")
append("all=$all,")
append("excludedCookies=$excludedCookies,")
append("includedCookies=$includedCookies")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = all?.hashCode() ?: 0
result = 31 * result + (excludedCookies?.hashCode() ?: 0)
result = 31 * result + (includedCookies?.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 CookieMatchPattern
if (all != other.all) return false
if (excludedCookies != other.excludedCookies) return false
if (includedCookies != other.includedCookies) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.CookieMatchPattern = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Inspect all cookies.
*/
public var all: aws.sdk.kotlin.services.wafv2.model.All? = null
/**
* Inspect only the cookies whose keys don't match any of the strings specified here.
*/
public var excludedCookies: List? = null
/**
* Inspect only the cookies that have a key that matches one of the strings specified here.
*/
public var includedCookies: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.CookieMatchPattern) : this() {
this.all = x.all
this.excludedCookies = x.excludedCookies
this.includedCookies = x.includedCookies
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.CookieMatchPattern = CookieMatchPattern(this)
/**
* construct an [aws.sdk.kotlin.services.wafv2.model.All] inside the given [block]
*/
public fun all(block: aws.sdk.kotlin.services.wafv2.model.All.Builder.() -> kotlin.Unit) {
this.all = aws.sdk.kotlin.services.wafv2.model.All.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy