<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto

namespace Google\Cloud\RecaptchaEnterprise\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Metrics related to challenges.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.ChallengeMetrics</code>
 */
class ChallengeMetrics extends \Google\Protobuf\Internal\Message
{
    /**
     * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent
     * to a count of pageloads for pages that include reCAPTCHA.
     *
     * Generated from protobuf field <code>int64 pageload_count = 1;</code>
     */
    protected $pageload_count = 0;
    /**
     * Count of nocaptchas (successful verification without a challenge) issued.
     *
     * Generated from protobuf field <code>int64 nocaptcha_count = 2;</code>
     */
    protected $nocaptcha_count = 0;
    /**
     * Count of submitted challenge solutions that were incorrect or otherwise
     * deemed suspicious such that a subsequent challenge was triggered.
     *
     * Generated from protobuf field <code>int64 failed_count = 3;</code>
     */
    protected $failed_count = 0;
    /**
     * Count of nocaptchas (successful verification without a challenge) plus
     * submitted challenge solutions that were correct and resulted in
     * verification.
     *
     * Generated from protobuf field <code>int64 passed_count = 4;</code>
     */
    protected $passed_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $pageload_count
     *           Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent
     *           to a count of pageloads for pages that include reCAPTCHA.
     *     @type int|string $nocaptcha_count
     *           Count of nocaptchas (successful verification without a challenge) issued.
     *     @type int|string $failed_count
     *           Count of submitted challenge solutions that were incorrect or otherwise
     *           deemed suspicious such that a subsequent challenge was triggered.
     *     @type int|string $passed_count
     *           Count of nocaptchas (successful verification without a challenge) plus
     *           submitted challenge solutions that were correct and resulted in
     *           verification.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent
     * to a count of pageloads for pages that include reCAPTCHA.
     *
     * Generated from protobuf field <code>int64 pageload_count = 1;</code>
     * @return int|string
     */
    public function getPageloadCount()
    {
        return $this->pageload_count;
    }

    /**
     * Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent
     * to a count of pageloads for pages that include reCAPTCHA.
     *
     * Generated from protobuf field <code>int64 pageload_count = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPageloadCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->pageload_count = $var;

        return $this;
    }

    /**
     * Count of nocaptchas (successful verification without a challenge) issued.
     *
     * Generated from protobuf field <code>int64 nocaptcha_count = 2;</code>
     * @return int|string
     */
    public function getNocaptchaCount()
    {
        return $this->nocaptcha_count;
    }

    /**
     * Count of nocaptchas (successful verification without a challenge) issued.
     *
     * Generated from protobuf field <code>int64 nocaptcha_count = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setNocaptchaCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->nocaptcha_count = $var;

        return $this;
    }

    /**
     * Count of submitted challenge solutions that were incorrect or otherwise
     * deemed suspicious such that a subsequent challenge was triggered.
     *
     * Generated from protobuf field <code>int64 failed_count = 3;</code>
     * @return int|string
     */
    public function getFailedCount()
    {
        return $this->failed_count;
    }

    /**
     * Count of submitted challenge solutions that were incorrect or otherwise
     * deemed suspicious such that a subsequent challenge was triggered.
     *
     * Generated from protobuf field <code>int64 failed_count = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setFailedCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->failed_count = $var;

        return $this;
    }

    /**
     * Count of nocaptchas (successful verification without a challenge) plus
     * submitted challenge solutions that were correct and resulted in
     * verification.
     *
     * Generated from protobuf field <code>int64 passed_count = 4;</code>
     * @return int|string
     */
    public function getPassedCount()
    {
        return $this->passed_count;
    }

    /**
     * Count of nocaptchas (successful verification without a challenge) plus
     * submitted challenge solutions that were correct and resulted in
     * verification.
     *
     * Generated from protobuf field <code>int64 passed_count = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPassedCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->passed_count = $var;

        return $this;
    }

}

