commonMain.aws.sdk.kotlin.services.wafv2.model.ChallengeResponse.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
/**
* The result from the inspection of the web request for a valid challenge token.
*/
public class ChallengeResponse private constructor(builder: Builder) {
/**
* The reason for failure, populated when the evaluation of the token fails.
*/
public val failureReason: aws.sdk.kotlin.services.wafv2.model.FailureReason? = builder.failureReason
/**
* The HTTP response code indicating the status of the challenge token in the web request. If the token is missing, invalid, or expired, this code is `202 Request Accepted`.
*/
public val responseCode: kotlin.Int? = builder.responseCode
/**
* The time that the challenge was last solved for the supplied token.
*/
public val solveTimestamp: kotlin.Long? = builder.solveTimestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.ChallengeResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ChallengeResponse(")
append("failureReason=$failureReason,")
append("responseCode=$responseCode,")
append("solveTimestamp=$solveTimestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = failureReason?.hashCode() ?: 0
result = 31 * result + (responseCode ?: 0)
result = 31 * result + (solveTimestamp?.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 ChallengeResponse
if (failureReason != other.failureReason) return false
if (responseCode != other.responseCode) return false
if (solveTimestamp != other.solveTimestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.ChallengeResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The reason for failure, populated when the evaluation of the token fails.
*/
public var failureReason: aws.sdk.kotlin.services.wafv2.model.FailureReason? = null
/**
* The HTTP response code indicating the status of the challenge token in the web request. If the token is missing, invalid, or expired, this code is `202 Request Accepted`.
*/
public var responseCode: kotlin.Int? = null
/**
* The time that the challenge was last solved for the supplied token.
*/
public var solveTimestamp: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.ChallengeResponse) : this() {
this.failureReason = x.failureReason
this.responseCode = x.responseCode
this.solveTimestamp = x.solveTimestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.ChallengeResponse = ChallengeResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy