All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.wafv2.model.EmailField.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// 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 email.
 *
 * This data type is used in the `RequestInspectionACFP` data type.
 */
public class EmailField private constructor(builder: Builder) {
    /**
     * The name of the email 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": { "email": "THE_EMAIL" } }`, the email field specification is `/form/email`.
     * + For form encoded payload types, use the HTML form names.For example, for an HTML form with the input element named `email1`, the email field specification is `email1`.
     */
    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.EmailField = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("EmailField(")
        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 EmailField

        if (identifier != other.identifier) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.EmailField = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The name of the email 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": { "email": "THE_EMAIL" } }`, the email field specification is `/form/email`.
         * + For form encoded payload types, use the HTML form names.For example, for an HTML form with the input element named `email1`, the email field specification is `email1`.
         */
        public var identifier: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wafv2.model.EmailField) : this() {
            this.identifier = x.identifier
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.wafv2.model.EmailField = EmailField(this)

        internal fun correctErrors(): Builder {
            if (identifier == null) identifier = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy