<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for getKierunkiInfoResponse StructType
 * @subpackage Structs
 */
class GetKierunkiInfoResponse extends AbstractStructBase
{
    /**
     * The lastUpdate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $lastUpdate;
    /**
     * The usluga
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 1
     * @var UslugiType[]
     */
    public $usluga;
    /**
     * The error
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var ErrorType[]
     */
    public $error;
    /**
     * Constructor method for getKierunkiInfoResponse
     * @uses GetKierunkiInfoResponse::setLastUpdate()
     * @uses GetKierunkiInfoResponse::setUsluga()
     * @uses GetKierunkiInfoResponse::setError()
     * @param string $lastUpdate
     * @param UslugiType[] $usluga
     * @param ErrorType[] $error
     */
    public function __construct($lastUpdate = null, array $usluga = array(), array $error = array())
    {
        $this
            ->setLastUpdate($lastUpdate)
            ->setUsluga($usluga)
            ->setError($error);
    }
    /**
     * Get lastUpdate value
     * @return string
     */
    public function getLastUpdate()
    {
        return $this->lastUpdate;
    }
    /**
     * Set lastUpdate value
     * @param string $lastUpdate
     * @return GetKierunkiInfoResponse
     */
    public function setLastUpdate($lastUpdate = null)
    {
        $this->lastUpdate = $lastUpdate;
        return $this;
    }
    /**
     * Get usluga value
     * @return UslugiType[]
     */
    public function getUsluga()
    {
        return $this->usluga;
    }
    /**
     * Set usluga value
     * @param UslugiType[] $usluga
     * @return GetKierunkiInfoResponse
     */
    public function setUsluga(array $usluga = array())
    {
        $this->usluga = $usluga;
        return $this;
    }
    /**
     * Add item to usluga value
     * @throws \InvalidArgumentException
     * @param UslugiType $item
     * @return GetKierunkiInfoResponse
     */
    public function addToUsluga(UslugiType $item)
    {
        $this->usluga[] = $item;
        return $this;
    }
    /**
     * Get error value
     * @return ErrorType[]|null
     */
    public function getError()
    {
        return $this->error;
    }
    /**
     * Set error value
     * @param ErrorType[] $error
     * @return GetKierunkiInfoResponse
     */
    public function setError(array $error = array())
    {
        $this->error = $error;
        return $this;
    }
    /**
     * Add item to error value
     * @throws \InvalidArgumentException
     * @param ErrorType $item
     * @return GetKierunkiInfoResponse
     */
    public function addToError(ErrorType $item)
    {
        $this->error[] = $item;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return GetKierunkiInfoResponse
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
