<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: registration.proto

namespace Registration\Core;

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

/**
 * Generated from protobuf message <code>registration.core.OldTokenData</code>
 */
class OldTokenData extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.registration.core.ReadTokenStatus status = 1;</code>
     */
    protected $status = 0;
    /**
     * Generated from protobuf field <code>.registration.core.TokenMetadata token = 2;</code>
     */
    protected $token = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $status
     *     @type \Registration\Core\TokenMetadata $token
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Registration::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.registration.core.ReadTokenStatus status = 1;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Generated from protobuf field <code>.registration.core.ReadTokenStatus status = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Registration\Core\ReadTokenStatus::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.registration.core.TokenMetadata token = 2;</code>
     * @return \Registration\Core\TokenMetadata|null
     */
    public function getToken()
    {
        return $this->token;
    }

    public function hasToken()
    {
        return isset($this->token);
    }

    public function clearToken()
    {
        unset($this->token);
    }

    /**
     * Generated from protobuf field <code>.registration.core.TokenMetadata token = 2;</code>
     * @param \Registration\Core\TokenMetadata $var
     * @return $this
     */
    public function setToken($var)
    {
        GPBUtil::checkMessage($var, \Registration\Core\TokenMetadata::class);
        $this->token = $var;

        return $this;
    }

}

