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