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