Copied!
<?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;

/**
 * Information about a verification endpoint that can be used for 2FA.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.EndpointVerificationInfo</code>
 */
class EndpointVerificationInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Token to provide to the client to trigger endpoint
     * verification. It must be used within 15 minutes.
     *
     * Generated from protobuf field <code>string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $request_token = '';
    /**
     * Output only. Timestamp of the last successful verification for the
     * endpoint, if any.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $last_verification_time = null;
    protected $endpoint;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $email_address
     *           Email address for which to trigger a verification request.
     *     @type string $phone_number
     *           Phone number for which to trigger a verification request. Should be given
     *           in E.164 format.
     *     @type string $request_token
     *           Output only. Token to provide to the client to trigger endpoint
     *           verification. It must be used within 15 minutes.
     *     @type \Google\Protobuf\Timestamp $last_verification_time
     *           Output only. Timestamp of the last successful verification for the
     *           endpoint, if any.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Email address for which to trigger a verification request.
     *
     * Generated from protobuf field <code>string email_address = 1;</code>
     * @return string
     */
    public function getEmailAddress()
    {
        return $this->readOneof(1);
    }

    public function hasEmailAddress()
    {
        return $this->hasOneof(1);
    }

    /**
     * Email address for which to trigger a verification request.
     *
     * Generated from protobuf field <code>string email_address = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setEmailAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Phone number for which to trigger a verification request. Should be given
     * in E.164 format.
     *
     * Generated from protobuf field <code>string phone_number = 2;</code>
     * @return string
     */
    public function getPhoneNumber()
    {
        return $this->readOneof(2);
    }

    public function hasPhoneNumber()
    {
        return $this->hasOneof(2);
    }

    /**
     * Phone number for which to trigger a verification request. Should be given
     * in E.164 format.
     *
     * Generated from protobuf field <code>string phone_number = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setPhoneNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Output only. Token to provide to the client to trigger endpoint
     * verification. It must be used within 15 minutes.
     *
     * Generated from protobuf field <code>string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getRequestToken()
    {
        return $this->request_token;
    }

    /**
     * Output only. Token to provide to the client to trigger endpoint
     * verification. It must be used within 15 minutes.
     *
     * Generated from protobuf field <code>string request_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_token = $var;

        return $this;
    }

    /**
     * Output only. Timestamp of the last successful verification for the
     * endpoint, if any.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastVerificationTime()
    {
        return $this->last_verification_time;
    }

    public function hasLastVerificationTime()
    {
        return isset($this->last_verification_time);
    }

    public function clearLastVerificationTime()
    {
        unset($this->last_verification_time);
    }

    /**
     * Output only. Timestamp of the last successful verification for the
     * endpoint, if any.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_verification_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastVerificationTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_verification_time = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getEndpoint()
    {
        return $this->whichOneof("endpoint");
    }

}

© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration