diff --git a/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php
index c7e9e4a574c1..0577623efb24 100644
Binary files a/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php and b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php differ
diff --git a/RecaptchaEnterprise/src/V1/RiskAnalysis.php b/RecaptchaEnterprise/src/V1/RiskAnalysis.php
index 46356d7be939..378bf2563756 100644
--- a/RecaptchaEnterprise/src/V1/RiskAnalysis.php
+++ b/RecaptchaEnterprise/src/V1/RiskAnalysis.php
@@ -36,6 +36,12 @@ class RiskAnalysis extends \Google\Protobuf\Internal\Message
* Generated from protobuf field repeated string extended_verdict_reasons = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $extended_verdict_reasons;
+ /**
+ * Output only. Challenge information for SCORE_AND_CHALLENGE keys
+ *
+ * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $challenge = 0;
/**
* Constructor.
@@ -52,6 +58,8 @@ class RiskAnalysis extends \Google\Protobuf\Internal\Message
* @type array|\Google\Protobuf\Internal\RepeatedField $extended_verdict_reasons
* Output only. Extended verdict reasons to be used for experimentation only.
* The set of possible reasons is subject to change.
+ * @type int $challenge
+ * Output only. Challenge information for SCORE_AND_CHALLENGE keys
* }
*/
public function __construct($data = NULL) {
@@ -143,5 +151,31 @@ public function setExtendedVerdictReasons($var)
return $this;
}
+ /**
+ * Output only. Challenge information for SCORE_AND_CHALLENGE keys
+ *
+ * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getChallenge()
+ {
+ return $this->challenge;
+ }
+
+ /**
+ * Output only. Challenge information for SCORE_AND_CHALLENGE keys
+ *
+ * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge challenge = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setChallenge($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis\Challenge::class);
+ $this->challenge = $var;
+
+ return $this;
+ }
+
}
diff --git a/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php b/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php
new file mode 100644
index 000000000000..52ab37b3ff85
--- /dev/null
+++ b/RecaptchaEnterprise/src/V1/RiskAnalysis/Challenge.php
@@ -0,0 +1,72 @@
+google.cloud.recaptchaenterprise.v1.RiskAnalysis.Challenge
+ */
+class Challenge
+{
+ /**
+ * Default unspecified type.
+ *
+ * Generated from protobuf enum CHALLENGE_UNSPECIFIED = 0;
+ */
+ const CHALLENGE_UNSPECIFIED = 0;
+ /**
+ * No challenge was presented for solving.
+ *
+ * Generated from protobuf enum NOCAPTCHA = 1;
+ */
+ const NOCAPTCHA = 1;
+ /**
+ * A solution was submitted that was correct.
+ *
+ * Generated from protobuf enum PASSED = 2;
+ */
+ const PASSED = 2;
+ /**
+ * A solution was submitted that was incorrect or otherwise
+ * deemed suspicious.
+ *
+ * Generated from protobuf enum FAILED = 3;
+ */
+ const FAILED = 3;
+
+ private static $valueToName = [
+ self::CHALLENGE_UNSPECIFIED => 'CHALLENGE_UNSPECIFIED',
+ self::NOCAPTCHA => 'NOCAPTCHA',
+ self::PASSED => 'PASSED',
+ self::FAILED => 'FAILED',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+// Adding a class alias for backwards compatibility with the previous class name.
+class_alias(Challenge::class, \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis_Challenge::class);
+