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

namespace Keyapis\Device\V1;

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

/**
 * Ошибки реинстала
 *
 * Generated from protobuf message <code>keyapis.device.v1.ReinstallError</code>
 */
class ReinstallError extends \Google\Protobuf\Internal\Message
{
    protected $reason;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Device\V1\ReinstallError\SipLoginIsMissing $sip_login_is_missing
     *           Сип-логин отсутствует на устройстве
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Сип-логин отсутствует на устройстве
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ReinstallError.SipLoginIsMissing sip_login_is_missing = 1;</code>
     * @return \Keyapis\Device\V1\ReinstallError\SipLoginIsMissing|null
     */
    public function getSipLoginIsMissing()
    {
        return $this->readOneof(1);
    }

    public function hasSipLoginIsMissing()
    {
        return $this->hasOneof(1);
    }

    /**
     * Сип-логин отсутствует на устройстве
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ReinstallError.SipLoginIsMissing sip_login_is_missing = 1;</code>
     * @param \Keyapis\Device\V1\ReinstallError\SipLoginIsMissing $var
     * @return $this
     */
    public function setSipLoginIsMissing($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\ReinstallError\SipLoginIsMissing::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getReason()
    {
        return $this->whichOneof("reason");
    }

}

