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

namespace Keyapis\Device\V1\ConfigureDeviceResultTask\Settings;

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

/**
 * Состояние настройки
 *
 * Generated from protobuf message <code>keyapis.device.v1.ConfigureDeviceResultTask.Settings.State</code>
 */
class State extends \Google\Protobuf\Internal\Message
{
    /**
     * Статус конфигурации устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceResultTask.Settings.StatusType status_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $status_type = 0;
    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     */
    protected $error_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $status_type
     *           Статус конфигурации устройства
     *     @type string $error_message
     *           Текст ошибки
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Статус конфигурации устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceResultTask.Settings.StatusType status_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Статус конфигурации устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceResultTask.Settings.StatusType status_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\ConfigureDeviceResultTask\Settings\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @return string
     */
    public function getErrorMessage()
    {
        return $this->error_message;
    }

    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setErrorMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->error_message = $var;

        return $this;
    }

}

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

