<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.PrintOption StructType
 * @subpackage Structs
 */
class Printing_PrintOption extends AnyEntity
{
    /**
     * The AskUser
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $AskUser;
    /**
     * The DocumentTypeId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DocumentTypeId;
    /**
     * The DocumentTypeName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $DocumentTypeName;
    /**
     * The PrintByDefault
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $PrintByDefault;
    /**
     * Constructor method for Printing.PrintOption
     * @uses Printing_PrintOption::setAskUser()
     * @uses Printing_PrintOption::setDocumentTypeId()
     * @uses Printing_PrintOption::setDocumentTypeName()
     * @uses Printing_PrintOption::setPrintByDefault()
     * @param bool $askUser
     * @param string $documentTypeId
     * @param string $documentTypeName
     * @param bool $printByDefault
     */
    public function __construct($askUser = null, $documentTypeId = null, $documentTypeName = null, $printByDefault = null)
    {
        $this
            ->setAskUser($askUser)
            ->setDocumentTypeId($documentTypeId)
            ->setDocumentTypeName($documentTypeName)
            ->setPrintByDefault($printByDefault);
    }
    /**
     * Get AskUser 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 getAskUser()
    {
        return isset($this->AskUser) ? $this->AskUser : null;
    }
    /**
     * Set AskUser 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 $askUser
     * @return \patest\StructType\Printing_PrintOption
     */
    public function setAskUser($askUser = null)
    {
        // validation for constraint: boolean
        if (!is_null($askUser) && !is_bool($askUser)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($askUser, true), gettype($askUser)), __LINE__);
        }
        if (is_null($askUser) || (is_array($askUser) && empty($askUser))) {
            unset($this->AskUser);
        } else {
            $this->AskUser = $askUser;
        }
        return $this;
    }
    /**
     * Get DocumentTypeId 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 string|null
     */
    public function getDocumentTypeId()
    {
        return isset($this->DocumentTypeId) ? $this->DocumentTypeId : null;
    }
    /**
     * Set DocumentTypeId 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 string $documentTypeId
     * @return \patest\StructType\Printing_PrintOption
     */
    public function setDocumentTypeId($documentTypeId = null)
    {
        // validation for constraint: string
        if (!is_null($documentTypeId) && !is_string($documentTypeId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($documentTypeId, true), gettype($documentTypeId)), __LINE__);
        }
        if (is_null($documentTypeId) || (is_array($documentTypeId) && empty($documentTypeId))) {
            unset($this->DocumentTypeId);
        } else {
            $this->DocumentTypeId = $documentTypeId;
        }
        return $this;
    }
    /**
     * Get DocumentTypeName 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 string|null
     */
    public function getDocumentTypeName()
    {
        return isset($this->DocumentTypeName) ? $this->DocumentTypeName : null;
    }
    /**
     * Set DocumentTypeName 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 string $documentTypeName
     * @return \patest\StructType\Printing_PrintOption
     */
    public function setDocumentTypeName($documentTypeName = null)
    {
        // validation for constraint: string
        if (!is_null($documentTypeName) && !is_string($documentTypeName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($documentTypeName, true), gettype($documentTypeName)), __LINE__);
        }
        if (is_null($documentTypeName) || (is_array($documentTypeName) && empty($documentTypeName))) {
            unset($this->DocumentTypeName);
        } else {
            $this->DocumentTypeName = $documentTypeName;
        }
        return $this;
    }
    /**
     * Get PrintByDefault 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 getPrintByDefault()
    {
        return isset($this->PrintByDefault) ? $this->PrintByDefault : null;
    }
    /**
     * Set PrintByDefault 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 $printByDefault
     * @return \patest\StructType\Printing_PrintOption
     */
    public function setPrintByDefault($printByDefault = null)
    {
        // validation for constraint: boolean
        if (!is_null($printByDefault) && !is_bool($printByDefault)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($printByDefault, true), gettype($printByDefault)), __LINE__);
        }
        if (is_null($printByDefault) || (is_array($printByDefault) && empty($printByDefault))) {
            unset($this->PrintByDefault);
        } else {
            $this->PrintByDefault = $printByDefault;
        }
        return $this;
    }
}
