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

namespace Deviceapis\Device\V1;

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

/**
 * Ответ на запрос сохранения списка настроек квартиры
 *
 * Generated from protobuf message <code>deviceapis.device.v1.SaveRoomListResponse</code>
 */
class SaveRoomListResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Список Room
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.Room data = 1;</code>
     */
    private $data;
    /**
     * Список ошибок
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.SaveRoomListResponse.Error errors = 2;</code>
     */
    private $errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Deviceapis\Device\V1\Room>|\Google\Protobuf\Internal\RepeatedField $data
     *           Список Room
     *     @type array<\Deviceapis\Device\V1\SaveRoomListResponse\Error>|\Google\Protobuf\Internal\RepeatedField $errors
     *           Список ошибок
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Deviceapis\Device\V1\DeviceapisDeviceRoomV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Список Room
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.Room data = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * Список Room
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.Room data = 1;</code>
     * @param array<\Deviceapis\Device\V1\Room>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setData($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Deviceapis\Device\V1\Room::class);
        $this->data = $arr;

        return $this;
    }

    /**
     * Список ошибок
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.SaveRoomListResponse.Error errors = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getErrors()
    {
        return $this->errors;
    }

    /**
     * Список ошибок
     *
     * Generated from protobuf field <code>repeated .deviceapis.device.v1.SaveRoomListResponse.Error errors = 2;</code>
     * @param array<\Deviceapis\Device\V1\SaveRoomListResponse\Error>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Deviceapis\Device\V1\SaveRoomListResponse\Error::class);
        $this->errors = $arr;

        return $this;
    }

}

