<?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\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Details on a phone authentication event
*
* Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.PhoneAuthenticationEvent</code>
*/
class PhoneAuthenticationEvent extends \Google\Protobuf\Internal\Message
{
/**
* Required. Phone number in E.164 format for which a multi-factor
* authentication challenge was initiated, succeeded, or failed.
*
* Generated from protobuf field <code>string phone_number = 1 [(.google.api.field_behavior) = REQUIRED];</code>
*/
protected $phone_number = '';
/**
* Optional. The time at which the multi-factor authentication event
* (challenge or verification) occurred.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $event_time = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $phone_number
* Required. Phone number in E.164 format for which a multi-factor
* authentication challenge was initiated, succeeded, or failed.
* @type \Google\Protobuf\Timestamp $event_time
* Optional. The time at which the multi-factor authentication event
* (challenge or verification) occurred.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
parent::__construct($data);
}
/**
* Required. Phone number in E.164 format for which a multi-factor
* authentication challenge was initiated, succeeded, or failed.
*
* Generated from protobuf field <code>string phone_number = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return string
*/
public function getPhoneNumber()
{
return $this->phone_number;
}
/**
* Required. Phone number in E.164 format for which a multi-factor
* authentication challenge was initiated, succeeded, or failed.
*
* Generated from protobuf field <code>string phone_number = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @param string $var
* @return $this
*/
public function setPhoneNumber($var)
{
GPBUtil::checkString($var, True);
$this->phone_number = $var;
return $this;
}
/**
* Optional. The time at which the multi-factor authentication event
* (challenge or verification) occurred.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getEventTime()
{
return $this->event_time;
}
public function hasEventTime()
{
return isset($this->event_time);
}
public function clearEventTime()
{
unset($this->event_time);
}
/**
* Optional. The time at which the multi-factor authentication event
* (challenge or verification) occurred.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setEventTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->event_time = $var;
return $this;
}
}