<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for getKierunkiResponse StructType
 * @subpackage Structs
 */
class GetKierunkiResponse extends AbstractStructBase
{
    /**
     * The kierunek
     * Meta information extracted from the WSDL
     * - maxOccurs: 1000
     * - minOccurs: 0
     * @var KierunekType[]
     */
    public $kierunek;
    /**
     * The error
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var ErrorType[]
     */
    public $error;
    /**
     * Constructor method for getKierunkiResponse
     * @uses GetKierunkiResponse::setKierunek()
     * @uses GetKierunkiResponse::setError()
     * @param KierunekType[] $kierunek
     * @param ErrorType[] $error
     */
    public function __construct(array $kierunek = array(), array $error = array())
    {
        $this
            -&gt;setKierunek($kierunek)
            -&gt;setError($error);
    }
    /**
     * Get kierunek value
     * @return KierunekType[]|null
     */
    public function getKierunek()
    {
        return $this-&gt;kierunek;
    }
    /**
     * This method is responsible for validating the values passed to the setKierunek method
     * This method is willingly generated in order to preserve the one-line inline validation within the setKierunek method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateKierunekForArrayConstraintsFromSetKierunek(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $getKierunkiResponseKierunekItem) {
            // validation for constraint: itemType
            if (!$getKierunkiResponseKierunekItem instanceof KierunekType) {
                $invalidValues[] = is_object($getKierunkiResponseKierunekItem) ? get_class($getKierunkiResponseKierunekItem) : sprintf('%s(%s)', gettype($getKierunkiResponseKierunekItem), var_export($getKierunkiResponseKierunekItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The kierunek property can only contain items of type KierunekType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set kierunek value
     * @throws \InvalidArgumentException
     * @param KierunekType[] $kierunek
     * @return GetKierunkiResponse
     */
    public function setKierunek(array $kierunek = array())
    {
        // validation for constraint: array
        if ('' !== ($kierunekArrayErrorMessage = self::validateKierunekForArrayConstraintsFromSetKierunek($kierunek))) {
            throw new \InvalidArgumentException($kierunekArrayErrorMessage, __LINE__);
        }
        // validation for constraint: maxOccurs(1000)
        if (is_array($kierunek) &amp;&amp; count($kierunek) &gt; 1000) {
            throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 1000', count($kierunek)), __LINE__);
        }
        $this-&gt;kierunek = $kierunek;
        return $this;
    }
    /**
     * Add item to kierunek value
     * @throws \InvalidArgumentException
     * @param KierunekType $item
     * @return GetKierunkiResponse
     */
    public function addToKierunek(KierunekType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof KierunekType) {
            throw new \InvalidArgumentException(sprintf('The kierunek property can only contain items of type KierunekType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        // validation for constraint: maxOccurs(1000)
        if (is_array($this-&gt;kierunek) &amp;&amp; count($this-&gt;kierunek) &gt;= 1000) {
            throw new \InvalidArgumentException(sprintf('You can\'t add anymore element to this property that already contains %s elements, the number of elements contained by the property must be less than or equal to 1000', count($this-&gt;kierunek)), __LINE__);
        }
        $this-&gt;kierunek[] = $item;
        return $this;
    }
    /**
     * Get error value
     * @return ErrorType[]|null
     */
    public function getError()
    {
        return $this-&gt;error;
    }
    /**
     * This method is responsible for validating the values passed to the setError method
     * This method is willingly generated in order to preserve the one-line inline validation within the setError method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateErrorForArrayConstraintsFromSetError(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $getKierunkiResponseErrorItem) {
            // validation for constraint: itemType
            if (!$getKierunkiResponseErrorItem instanceof ErrorType) {
                $invalidValues[] = is_object($getKierunkiResponseErrorItem) ? get_class($getKierunkiResponseErrorItem) : sprintf('%s(%s)', gettype($getKierunkiResponseErrorItem), var_export($getKierunkiResponseErrorItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The error property can only contain items of type ErrorType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set error value
     * @throws \InvalidArgumentException
     * @param ErrorType[] $error
     * @return GetKierunkiResponse
     */
    public function setError(array $error = array())
    {
        // validation for constraint: array
        if ('' !== ($errorArrayErrorMessage = self::validateErrorForArrayConstraintsFromSetError($error))) {
            throw new \InvalidArgumentException($errorArrayErrorMessage, __LINE__);
        }
        $this-&gt;error = $error;
        return $this;
    }
    /**
     * Add item to error value
     * @throws \InvalidArgumentException
     * @param ErrorType $item
     * @return GetKierunkiResponse
     */
    public function addToError(ErrorType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof ErrorType) {
            throw new \InvalidArgumentException(sprintf('The error property can only contain items of type ErrorType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this-&gt;error[] = $item;
        return $this;
    }
}
</pre></body></html>