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

namespace Keyapis\Identity\V1;

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

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

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

    /**
     * Идентификатор ОТП-кода
     *
     * Generated from protobuf field <code>string code_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCodeId()
    {
        return $this->code_id;
    }

    /**
     * Идентификатор ОТП-кода
     *
     * Generated from protobuf field <code>string code_id = 1 [(.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 = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getTimeout()
    {
        return $this->timeout;
    }

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

        return $this;
    }

}

