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

namespace Keyapis\Invoice\V1;

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

/**
 * Ответ на запрос получения списка платежей
 *
 * Generated from protobuf message <code>keyapis.invoice.v1.GetInvoiceListResponse</code>
 */
class GetInvoiceListResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Платежи
     *
     * Generated from protobuf field <code>repeated .keyapis.invoice.v1.Invoice data = 1;</code>
     */
    private $data;
    /**
     * Ошибка
     *
     * Generated from protobuf field <code>.keyapis.invoice.v1.GetInvoiceListResponse.Error error = 2;</code>
     */
    protected $error = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Keyapis\Invoice\V1\Invoice>|\Google\Protobuf\Internal\RepeatedField $data
     *           Платежи
     *     @type \Keyapis\Invoice\V1\GetInvoiceListResponse\Error $error
     *           Ошибка
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Invoice\V1\KeyapisInvoiceInvoiceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Платежи
     *
     * Generated from protobuf field <code>repeated .keyapis.invoice.v1.Invoice data = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * Платежи
     *
     * Generated from protobuf field <code>repeated .keyapis.invoice.v1.Invoice data = 1;</code>
     * @param array<\Keyapis\Invoice\V1\Invoice>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setData($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Keyapis\Invoice\V1\Invoice::class);
        $this->data = $arr;

        return $this;
    }

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

        return $this;
    }

}

