<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/identity_b2b/v1/keyapis_identity_b2b_authorization_v1.proto

namespace Keyapis\IdentityB2b\V1;

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

/**
 * Данные для двухфакторной аутентификации
 *
 * Generated from protobuf message <code>keyapis.identity_b2b.v1.Data2fa</code>
 */
class Data2fa extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор сессии двухфакторной аутентификации
     *
     * Generated from protobuf field <code>string session_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $session_id = '';
    /**
     * Идентификатор процесса двухфакторной аутентификации
     *
     * Generated from protobuf field <code>string action_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $action_id = '';
    /**
     * Идентификатор кода двухфакторной авторизации
     *
     * Generated from protobuf field <code>string code_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $code_id = '';
    /**
     * Время в секундах, оставшееся до возможности отправки следующего кода
     *
     * Generated from protobuf field <code>int32 timeout = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $timeout = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $session_id
     *           Идентификатор сессии двухфакторной аутентификации
     *     @type string $action_id
     *           Идентификатор процесса двухфакторной аутентификации
     *     @type string $code_id
     *           Идентификатор кода двухфакторной авторизации
     *     @type int $timeout
     *           Время в секундах, оставшееся до возможности отправки следующего кода
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\IdentityB2B\V1\KeyapisIdentityB2BAuthorizationV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор сессии двухфакторной аутентификации
     *
     * Generated from protobuf field <code>string session_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSessionId()
    {
        return $this->session_id;
    }

    /**
     * Идентификатор сессии двухфакторной аутентификации
     *
     * Generated from protobuf field <code>string session_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSessionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->session_id = $var;

        return $this;
    }

    /**
     * Идентификатор процесса двухфакторной аутентификации
     *
     * Generated from protobuf field <code>string action_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getActionId()
    {
        return $this->action_id;
    }

    /**
     * Идентификатор процесса двухфакторной аутентификации
     *
     * Generated from protobuf field <code>string action_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setActionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->action_id = $var;

        return $this;
    }

    /**
     * Идентификатор кода двухфакторной авторизации
     *
     * Generated from protobuf field <code>string code_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCodeId()
    {
        return $this->code_id;
    }

    /**
     * Идентификатор кода двухфакторной авторизации
     *
     * Generated from protobuf field <code>string code_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCodeId($var)
    {
        GPBUtil::checkString($var, True);
        $this->code_id = $var;

        return $this;
    }

    /**
     * Время в секундах, оставшееся до возможности отправки следующего кода
     *
     * Generated from protobuf field <code>int32 timeout = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getTimeout()
    {
        return $this->timeout;
    }

    /**
     * Время в секундах, оставшееся до возможности отправки следующего кода
     *
     * Generated from protobuf field <code>int32 timeout = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setTimeout($var)
    {
        GPBUtil::checkInt32($var);
        $this->timeout = $var;

        return $this;
    }

}

