<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 getLibrariesForLegalDepositsResponse StructType
 * @subpackage Structs
 */
class GetLibrariesForLegalDepositsResponse extends AbstractStructBase
{
    /**
     * The libraryForLegalDeposit
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var LibraryForLegalDepositType[]
     */
    public $libraryForLegalDeposit;
    /**
     * Constructor method for getLibrariesForLegalDepositsResponse
     * @uses GetLibrariesForLegalDepositsResponse::setLibraryForLegalDeposit()
     * @param LibraryForLegalDepositType[] $libraryForLegalDeposit
     */
    public function __construct(array $libraryForLegalDeposit = array())
    {
        $this
            -&gt;setLibraryForLegalDeposit($libraryForLegalDeposit);
    }
    /**
     * Get libraryForLegalDeposit value
     * @return LibraryForLegalDepositType[]|null
     */
    public function getLibraryForLegalDeposit()
    {
        return $this-&gt;libraryForLegalDeposit;
    }
    /**
     * This method is responsible for validating the values passed to the setLibraryForLegalDeposit method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLibraryForLegalDeposit method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLibraryForLegalDepositForArrayConstraintsFromSetLibraryForLegalDeposit(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $getLibrariesForLegalDepositsResponseLibraryForLegalDepositItem) {
            // validation for constraint: itemType
            if (!$getLibrariesForLegalDepositsResponseLibraryForLegalDepositItem instanceof LibraryForLegalDepositType) {
                $invalidValues[] = is_object($getLibrariesForLegalDepositsResponseLibraryForLegalDepositItem) ? get_class($getLibrariesForLegalDepositsResponseLibraryForLegalDepositItem) : sprintf('%s(%s)', gettype($getLibrariesForLegalDepositsResponseLibraryForLegalDepositItem), var_export($getLibrariesForLegalDepositsResponseLibraryForLegalDepositItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The libraryForLegalDeposit property can only contain items of type LibraryForLegalDepositType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set libraryForLegalDeposit value
     * @throws \InvalidArgumentException
     * @param LibraryForLegalDepositType[] $libraryForLegalDeposit
     * @return GetLibrariesForLegalDepositsResponse
     */
    public function setLibraryForLegalDeposit(array $libraryForLegalDeposit = array())
    {
        // validation for constraint: array
        if ('' !== ($libraryForLegalDepositArrayErrorMessage = self::validateLibraryForLegalDepositForArrayConstraintsFromSetLibraryForLegalDeposit($libraryForLegalDeposit))) {
            throw new \InvalidArgumentException($libraryForLegalDepositArrayErrorMessage, __LINE__);
        }
        $this-&gt;libraryForLegalDeposit = $libraryForLegalDeposit;
        return $this;
    }
    /**
     * Add item to libraryForLegalDeposit value
     * @throws \InvalidArgumentException
     * @param LibraryForLegalDepositType $item
     * @return GetLibrariesForLegalDepositsResponse
     */
    public function addToLibraryForLegalDeposit(LibraryForLegalDepositType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof LibraryForLegalDepositType) {
            throw new \InvalidArgumentException(sprintf('The libraryForLegalDeposit property can only contain items of type LibraryForLegalDepositType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this-&gt;libraryForLegalDeposit[] = $item;
        return $this;
    }
}
</pre></body></html>