<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.SpoolPrintableItemArchived StructType
 * @subpackage Structs
 */
class Printing_SpoolPrintableItemArchived extends Printing_SpoolPrintableItem
{
    /**
     * The DocumentRequiresRepair
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $DocumentRequiresRepair;
    /**
     * The DocumentWasSent
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $DocumentWasSent;
    /**
     * Constructor method for Printing.SpoolPrintableItemArchived
     * @uses Printing_SpoolPrintableItemArchived::setDocumentRequiresRepair()
     * @uses Printing_SpoolPrintableItemArchived::setDocumentWasSent()
     * @param bool $documentRequiresRepair
     * @param bool $documentWasSent
     */
    public function __construct($documentRequiresRepair = null, $documentWasSent = null)
    {
        $this
            ->setDocumentRequiresRepair($documentRequiresRepair)
            ->setDocumentWasSent($documentWasSent);
    }
    /**
     * Get DocumentRequiresRepair value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getDocumentRequiresRepair()
    {
        return isset($this->DocumentRequiresRepair) ? $this->DocumentRequiresRepair : null;
    }
    /**
     * Set DocumentRequiresRepair value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $documentRequiresRepair
     * @return \patest\StructType\Printing_SpoolPrintableItemArchived
     */
    public function setDocumentRequiresRepair($documentRequiresRepair = null)
    {
        // validation for constraint: boolean
        if (!is_null($documentRequiresRepair) && !is_bool($documentRequiresRepair)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($documentRequiresRepair, true), gettype($documentRequiresRepair)), __LINE__);
        }
        if (is_null($documentRequiresRepair) || (is_array($documentRequiresRepair) && empty($documentRequiresRepair))) {
            unset($this->DocumentRequiresRepair);
        } else {
            $this->DocumentRequiresRepair = $documentRequiresRepair;
        }
        return $this;
    }
    /**
     * Get DocumentWasSent value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getDocumentWasSent()
    {
        return isset($this->DocumentWasSent) ? $this->DocumentWasSent : null;
    }
    /**
     * Set DocumentWasSent value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $documentWasSent
     * @return \patest\StructType\Printing_SpoolPrintableItemArchived
     */
    public function setDocumentWasSent($documentWasSent = null)
    {
        // validation for constraint: boolean
        if (!is_null($documentWasSent) && !is_bool($documentWasSent)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($documentWasSent, true), gettype($documentWasSent)), __LINE__);
        }
        if (is_null($documentWasSent) || (is_array($documentWasSent) && empty($documentWasSent))) {
            unset($this->DocumentWasSent);
        } else {
            $this->DocumentWasSent = $documentWasSent;
        }
        return $this;
    }
}
