commonMain.aws.sdk.kotlin.services.wafv2.model.UsernameField.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 name of the field in the request payload that contains your customer's username.
*
* This data type is used in the `RequestInspection` and `RequestInspectionACFP` data types.
*/
public class UsernameField private constructor(builder: Builder) {
/**
* The name of the username field.
*
* How you specify this depends on the request inspection payload type.
* + For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation [JavaScript Object Notation (JSON) Pointer](https://tools.ietf.org/html/rfc6901). For example, for the JSON payload `{ "form": { "username": "THE_USERNAME" } }`, the username field specification is `/form/username`.
* + For form encoded payload types, use the HTML form names.For example, for an HTML form with the input element named `username1`, the username field specification is `username1`
*/
public val identifier: kotlin.String = requireNotNull(builder.identifier) { "A non-null value must be provided for identifier" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.UsernameField = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UsernameField(")
append("identifier=$identifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = identifier.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 UsernameField
if (identifier != other.identifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.UsernameField = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the username field.
*
* How you specify this depends on the request inspection payload type.
* + For JSON payloads, specify the field name in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation [JavaScript Object Notation (JSON) Pointer](https://tools.ietf.org/html/rfc6901). For example, for the JSON payload `{ "form": { "username": "THE_USERNAME" } }`, the username field specification is `/form/username`.
* + For form encoded payload types, use the HTML form names.For example, for an HTML form with the input element named `username1`, the username field specification is `username1`
*/
public var identifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.UsernameField) : this() {
this.identifier = x.identifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.UsernameField = UsernameField(this)
internal fun correctErrors(): Builder {
if (identifier == null) identifier = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy