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

namespace Google\Cloud\RecaptchaEnterprise\V1\TransactionData;

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

/**
 * Details about a user's account involved in the transaction.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.TransactionData.User</code>
 */
class User extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Unique account identifier for this user. If using account
     * defender, this should match the hashed_account_id field. Otherwise, a
     * unique and persistent identifier for this account.
     *
     * Generated from protobuf field <code>string account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $account_id = '';
    /**
     * Optional. The epoch milliseconds of the user's account creation.
     *
     * Generated from protobuf field <code>int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $creation_ms = 0;
    /**
     * Optional. The email address of the user.
     *
     * Generated from protobuf field <code>string email = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $email = '';
    /**
     * Optional. Whether the email has been verified to be accessible by the
     * user (OTP or similar).
     *
     * Generated from protobuf field <code>bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $email_verified = false;
    /**
     * Optional. The phone number of the user, with country code.
     *
     * Generated from protobuf field <code>string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $phone_number = '';
    /**
     * Optional. Whether the phone number has been verified to be accessible by
     * the user (OTP or similar).
     *
     * Generated from protobuf field <code>bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $phone_verified = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $account_id
     *           Optional. Unique account identifier for this user. If using account
     *           defender, this should match the hashed_account_id field. Otherwise, a
     *           unique and persistent identifier for this account.
     *     @type int|string $creation_ms
     *           Optional. The epoch milliseconds of the user's account creation.
     *     @type string $email
     *           Optional. The email address of the user.
     *     @type bool $email_verified
     *           Optional. Whether the email has been verified to be accessible by the
     *           user (OTP or similar).
     *     @type string $phone_number
     *           Optional. The phone number of the user, with country code.
     *     @type bool $phone_verified
     *           Optional. Whether the phone number has been verified to be accessible by
     *           the user (OTP or similar).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Unique account identifier for this user. If using account
     * defender, this should match the hashed_account_id field. Otherwise, a
     * unique and persistent identifier for this account.
     *
     * Generated from protobuf field <code>string account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getAccountId()
    {
        return $this->account_id;
    }

    /**
     * Optional. Unique account identifier for this user. If using account
     * defender, this should match the hashed_account_id field. Otherwise, a
     * unique and persistent identifier for this account.
     *
     * Generated from protobuf field <code>string account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setAccountId($var)
    {
        GPBUtil::checkString($var, True);
        $this->account_id = $var;

        return $this;
    }

    /**
     * Optional. The epoch milliseconds of the user's account creation.
     *
     * Generated from protobuf field <code>int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getCreationMs()
    {
        return $this->creation_ms;
    }

    /**
     * Optional. The epoch milliseconds of the user's account creation.
     *
     * Generated from protobuf field <code>int64 creation_ms = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setCreationMs($var)
    {
        GPBUtil::checkInt64($var);
        $this->creation_ms = $var;

        return $this;
    }

    /**
     * Optional. The email address of the user.
     *
     * Generated from protobuf field <code>string email = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Optional. The email address of the user.
     *
     * Generated from protobuf field <code>string email = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->email = $var;

        return $this;
    }

    /**
     * Optional. Whether the email has been verified to be accessible by the
     * user (OTP or similar).
     *
     * Generated from protobuf field <code>bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getEmailVerified()
    {
        return $this->email_verified;
    }

    /**
     * Optional. Whether the email has been verified to be accessible by the
     * user (OTP or similar).
     *
     * Generated from protobuf field <code>bool email_verified = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setEmailVerified($var)
    {
        GPBUtil::checkBool($var);
        $this->email_verified = $var;

        return $this;
    }

    /**
     * Optional. The phone number of the user, with country code.
     *
     * Generated from protobuf field <code>string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getPhoneNumber()
    {
        return $this->phone_number;
    }

    /**
     * Optional. The phone number of the user, with country code.
     *
     * Generated from protobuf field <code>string phone_number = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setPhoneNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->phone_number = $var;

        return $this;
    }

    /**
     * Optional. Whether the phone number has been verified to be accessible by
     * the user (OTP or similar).
     *
     * Generated from protobuf field <code>bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getPhoneVerified()
    {
        return $this->phone_verified;
    }

    /**
     * Optional. Whether the phone number has been verified to be accessible by
     * the user (OTP or similar).
     *
     * Generated from protobuf field <code>bool phone_verified = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setPhoneVerified($var)
    {
        GPBUtil::checkBool($var);
        $this->phone_verified = $var;

        return $this;
    }

}


© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration