<?php

namespace App\Integration\Providers\Alliance3\DTO;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ErrorWithCodeList DTO
 * @subpackage Structs
 */
class ErrorWithCodeList extends AbstractStructBase
{
    /**
     * The error
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \App\Integration\Providers\Alliance3\DTO\ErrorWithCode[]
     */
    public $error;
    /**
     * Constructor method for ErrorWithCodeList
     * @uses ErrorWithCodeList::setError()
     * @param \App\Integration\Providers\Alliance3\DTO\ErrorWithCode[] $error
     */
    public function __construct(array $error = array())
    {
        $this
            ->setError($error);
    }
    /**
     * Get error value
     * @return \App\Integration\Providers\Alliance3\DTO\ErrorWithCode[]|null
     */
    public function getError()
    {
        return $this->error;
    }
    /**
     * Set error value
     * @param \App\Integration\Providers\Alliance3\DTO\ErrorWithCode[] $error
     * @return \App\Integration\Providers\Alliance3\DTO\ErrorWithCodeList
     */
    public function setError(array $error = array())
    {
        $this->error = $error;
        return $this;
    }
    /**
     * Add item to error value
     * @throws \InvalidArgumentException
     * @param \App\Integration\Providers\Alliance3\DTO\ErrorWithCode $item
     * @return \App\Integration\Providers\Alliance3\DTO\ErrorWithCodeList
     */
    public function addToError(\App\Integration\Providers\Alliance3\DTO\ErrorWithCode $item)
    {
        $this->error[] = $item;
        return $this;
    }
}
