<?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.Codes</code>
 */
class Codes extends \Google\Protobuf\Internal\Message
{
    /**
     * Статус конфигурации устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceResultTask.Settings.StatusType status_type = 1;</code>
     */
    protected $status_type = 0;
    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 2;</code>
     */
    protected $error_message = '';
    /**
     * Загруженные коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Code loaded_codes = 3;</code>
     */
    private $loaded_codes;
    /**
     * Незагруженные коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.CodeError unloaded_codes = 4;</code>
     */
    private $unloaded_codes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $status_type
     *           Статус конфигурации устройства
     *     @type string $error_message
     *           Текст ошибки
     *     @type array<\Keyapis\Device\V1\Code>|\Google\Protobuf\Internal\RepeatedField $loaded_codes
     *           Загруженные коды
     *     @type array<\Keyapis\Device\V1\CodeError>|\Google\Protobuf\Internal\RepeatedField $unloaded_codes
     *           Незагруженные коды
     * }
     */
    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;</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Статус конфигурации устройства
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ConfigureDeviceResultTask.Settings.StatusType status_type = 1;</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;
    }

    /**
     * Загруженные коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Code loaded_codes = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLoadedCodes()
    {
        return $this->loaded_codes;
    }

    /**
     * Загруженные коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.Code loaded_codes = 3;</code>
     * @param array<\Keyapis\Device\V1\Code>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLoadedCodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\Code::class);
        $this->loaded_codes = $arr;

        return $this;
    }

    /**
     * Незагруженные коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.CodeError unloaded_codes = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUnloadedCodes()
    {
        return $this->unloaded_codes;
    }

    /**
     * Незагруженные коды
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.CodeError unloaded_codes = 4;</code>
     * @param array<\Keyapis\Device\V1\CodeError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUnloadedCodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\CodeError::class);
        $this->unloaded_codes = $arr;

        return $this;
    }

}

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

