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

namespace Keyapis\Device\V1;

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

/**
 * Ответ на запрос списка SIP-трубок
 *
 * Generated from protobuf message <code>keyapis.device.v1.PostSipPhoneGetListResponse</code>
 */
class PostSipPhoneGetListResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Список SIP-трубок
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.SipPhone items = 1;</code>
     */
    private $items;
    /**
     * Ошибка
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PostSipPhoneGetListResponse.Error error = 2;</code>
     */
    protected $error = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Keyapis\Device\V1\SipPhone>|\Google\Protobuf\Internal\RepeatedField $items
     *           Список SIP-трубок
     *     @type \Keyapis\Device\V1\PostSipPhoneGetListResponse\Error $error
     *           Ошибка
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceSipPhoneV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Список SIP-трубок
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.SipPhone items = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getItems()
    {
        return $this->items;
    }

    /**
     * Список SIP-трубок
     *
     * Generated from protobuf field <code>repeated .keyapis.device.v1.SipPhone items = 1;</code>
     * @param array<\Keyapis\Device\V1\SipPhone>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Device\V1\SipPhone::class);
        $this->items = $arr;

        return $this;
    }

    /**
     * Ошибка
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PostSipPhoneGetListResponse.Error error = 2;</code>
     * @return \Keyapis\Device\V1\PostSipPhoneGetListResponse\Error|null
     */
    public function getError()
    {
        return $this->error;
    }

    public function hasError()
    {
        return isset($this->error);
    }

    public function clearError()
    {
        unset($this->error);
    }

    /**
     * Ошибка
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PostSipPhoneGetListResponse.Error error = 2;</code>
     * @param \Keyapis\Device\V1\PostSipPhoneGetListResponse\Error $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\PostSipPhoneGetListResponse\Error::class);
        $this->error = $var;

        return $this;
    }

}

