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

namespace Keyapis\Device\V1\PostDeviceInstallPresetResponse;

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

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

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Device\V1\PostDeviceInstallPresetResponse\Error\PresetStatusIsProcessing $preset_status_is_processing
     *           Пресет в процессе установки
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Пресет в процессе установки
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing preset_status_is_processing = 1;</code>
     * @return \Keyapis\Device\V1\PostDeviceInstallPresetResponse\Error\PresetStatusIsProcessing|null
     */
    public function getPresetStatusIsProcessing()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Пресет в процессе установки
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PostDeviceInstallPresetResponse.Error.PresetStatusIsProcessing preset_status_is_processing = 1;</code>
     * @param \Keyapis\Device\V1\PostDeviceInstallPresetResponse\Error\PresetStatusIsProcessing $var
     * @return $this
     */
    public function setPresetStatusIsProcessing($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\PostDeviceInstallPresetResponse\Error\PresetStatusIsProcessing::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Error::class, \Keyapis\Device\V1\PostDeviceInstallPresetResponse_Error::class);

