<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 addOdwolanieDoReklamacji StructType
 * @subpackage Structs
 */
class AddOdwolanieDoReklamacji extends AbstractStructBase
{
    /**
     * The reklamacja
     * Meta information extracted from the WSDL
     * - maxOccurs: 500
     * - minOccurs: 1
     * @var ReklamowanaPrzesylkaType[]
     */
    public $reklamacja;
    /**
     * Constructor method for addOdwolanieDoReklamacji
     * @uses AddOdwolanieDoReklamacji::setReklamacja()
     * @param ReklamowanaPrzesylkaType[] $reklamacja
     */
    public function __construct(array $reklamacja = array())
    {
        $this
            -&gt;setReklamacja($reklamacja);
    }
    /**
     * Get reklamacja value
     * @return ReklamowanaPrzesylkaType[]
     */
    public function getReklamacja()
    {
        return $this-&gt;reklamacja;
    }
    /**
     * This method is responsible for validating the values passed to the setReklamacja method
     * This method is willingly generated in order to preserve the one-line inline validation within the setReklamacja method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateReklamacjaForArrayConstraintsFromSetReklamacja(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $addOdwolanieDoReklamacjiReklamacjaItem) {
            // validation for constraint: itemType
            if (!$addOdwolanieDoReklamacjiReklamacjaItem instanceof ReklamowanaPrzesylkaType) {
                $invalidValues[] = is_object($addOdwolanieDoReklamacjiReklamacjaItem) ? get_class($addOdwolanieDoReklamacjiReklamacjaItem) : sprintf('%s(%s)', gettype($addOdwolanieDoReklamacjiReklamacjaItem), var_export($addOdwolanieDoReklamacjiReklamacjaItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The reklamacja property can only contain items of type ReklamowanaPrzesylkaType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set reklamacja value
     * @throws \InvalidArgumentException
     * @param ReklamowanaPrzesylkaType[] $reklamacja
     * @return AddOdwolanieDoReklamacji
     */
    public function setReklamacja(array $reklamacja = array())
    {
        // validation for constraint: array
        if ('' !== ($reklamacjaArrayErrorMessage = self::validateReklamacjaForArrayConstraintsFromSetReklamacja($reklamacja))) {
            throw new \InvalidArgumentException($reklamacjaArrayErrorMessage, __LINE__);
        }
        // validation for constraint: maxOccurs(500)
        if (is_array($reklamacja) &amp;&amp; count($reklamacja) &gt; 500) {
            throw new \InvalidArgumentException(sprintf('Invalid count of %s, the number of elements contained by the property must be less than or equal to 500', count($reklamacja)), __LINE__);
        }
        $this-&gt;reklamacja = $reklamacja;
        return $this;
    }
    /**
     * Add item to reklamacja value
     * @throws \InvalidArgumentException
     * @param ReklamowanaPrzesylkaType $item
     * @return AddOdwolanieDoReklamacji
     */
    public function addToReklamacja(ReklamowanaPrzesylkaType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof ReklamowanaPrzesylkaType) {
            throw new \InvalidArgumentException(sprintf('The reklamacja property can only contain items of type ReklamowanaPrzesylkaType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        // validation for constraint: maxOccurs(500)
        if (is_array($this-&gt;reklamacja) &amp;&amp; count($this-&gt;reklamacja) &gt;= 500) {
            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 500', count($this-&gt;reklamacja)), __LINE__);
        }
        $this-&gt;reklamacja[] = $item;
        return $this;
    }
}
</pre></body></html>