/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace WAFV2 { namespace Model { /** *

The result from the inspection of the web request for a valid * CAPTCHA token.

See Also:

AWS * API Reference

*/ class CaptchaResponse { public: AWS_WAFV2_API CaptchaResponse(); AWS_WAFV2_API CaptchaResponse(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API CaptchaResponse& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The HTTP response code indicating the status of the CAPTCHA * token in the web request. If the token is missing, invalid, or expired, this * code is 405 Method Not Allowed.

*/ inline int GetResponseCode() const{ return m_responseCode; } /** *

The HTTP response code indicating the status of the CAPTCHA * token in the web request. If the token is missing, invalid, or expired, this * code is 405 Method Not Allowed.

*/ inline bool ResponseCodeHasBeenSet() const { return m_responseCodeHasBeenSet; } /** *

The HTTP response code indicating the status of the CAPTCHA * token in the web request. If the token is missing, invalid, or expired, this * code is 405 Method Not Allowed.

*/ inline void SetResponseCode(int value) { m_responseCodeHasBeenSet = true; m_responseCode = value; } /** *

The HTTP response code indicating the status of the CAPTCHA * token in the web request. If the token is missing, invalid, or expired, this * code is 405 Method Not Allowed.

*/ inline CaptchaResponse& WithResponseCode(int value) { SetResponseCode(value); return *this;} /** *

The time that the CAPTCHA was last solved for the supplied * token.

*/ inline long long GetSolveTimestamp() const{ return m_solveTimestamp; } /** *

The time that the CAPTCHA was last solved for the supplied * token.

*/ inline bool SolveTimestampHasBeenSet() const { return m_solveTimestampHasBeenSet; } /** *

The time that the CAPTCHA was last solved for the supplied * token.

*/ inline void SetSolveTimestamp(long long value) { m_solveTimestampHasBeenSet = true; m_solveTimestamp = value; } /** *

The time that the CAPTCHA was last solved for the supplied * token.

*/ inline CaptchaResponse& WithSolveTimestamp(long long value) { SetSolveTimestamp(value); return *this;} /** *

The reason for failure, populated when the evaluation of the token fails.

*/ inline const FailureReason& GetFailureReason() const{ return m_failureReason; } /** *

The reason for failure, populated when the evaluation of the token fails.

*/ inline bool FailureReasonHasBeenSet() const { return m_failureReasonHasBeenSet; } /** *

The reason for failure, populated when the evaluation of the token fails.

*/ inline void SetFailureReason(const FailureReason& value) { m_failureReasonHasBeenSet = true; m_failureReason = value; } /** *

The reason for failure, populated when the evaluation of the token fails.

*/ inline void SetFailureReason(FailureReason&& value) { m_failureReasonHasBeenSet = true; m_failureReason = std::move(value); } /** *

The reason for failure, populated when the evaluation of the token fails.

*/ inline CaptchaResponse& WithFailureReason(const FailureReason& value) { SetFailureReason(value); return *this;} /** *

The reason for failure, populated when the evaluation of the token fails.

*/ inline CaptchaResponse& WithFailureReason(FailureReason&& value) { SetFailureReason(std::move(value)); return *this;} private: int m_responseCode; bool m_responseCodeHasBeenSet = false; long long m_solveTimestamp; bool m_solveTimestampHasBeenSet = false; FailureReason m_failureReason; bool m_failureReasonHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws