<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.SpoolGroupsAuditExtension4UI StructType
 * @subpackage Structs
 */
class Printing_SpoolGroupsAuditExtension4UI extends Printing_SpoolGroupsAudit
{
    /**
     * The ErrorsCount
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $ErrorsCount;
    /**
     * The ErrorText
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ErrorText;
    /**
     * The HasGroupErrors
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $HasGroupErrors;
    /**
     * The HasItemErrors
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $HasItemErrors;
    /**
     * The InfoText
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $InfoText;
    /**
     * Constructor method for Printing.SpoolGroupsAuditExtension4UI
     * @uses Printing_SpoolGroupsAuditExtension4UI::setErrorsCount()
     * @uses Printing_SpoolGroupsAuditExtension4UI::setErrorText()
     * @uses Printing_SpoolGroupsAuditExtension4UI::setHasGroupErrors()
     * @uses Printing_SpoolGroupsAuditExtension4UI::setHasItemErrors()
     * @uses Printing_SpoolGroupsAuditExtension4UI::setInfoText()
     * @param int $errorsCount
     * @param string $errorText
     * @param bool $hasGroupErrors
     * @param bool $hasItemErrors
     * @param string $infoText
     */
    public function __construct($errorsCount = null, $errorText = null, $hasGroupErrors = null, $hasItemErrors = null, $infoText = null)
    {
        $this
            ->setErrorsCount($errorsCount)
            ->setErrorText($errorText)
            ->setHasGroupErrors($hasGroupErrors)
            ->setHasItemErrors($hasItemErrors)
            ->setInfoText($infoText);
    }
    /**
     * Get ErrorsCount 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 int|null
     */
    public function getErrorsCount()
    {
        return isset($this->ErrorsCount) ? $this->ErrorsCount : null;
    }
    /**
     * Set ErrorsCount 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 int $errorsCount
     * @return \patest\StructType\Printing_SpoolGroupsAuditExtension4UI
     */
    public function setErrorsCount($errorsCount = null)
    {
        // validation for constraint: int
        if (!is_null($errorsCount) && !(is_int($errorsCount) || ctype_digit($errorsCount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($errorsCount, true), gettype($errorsCount)), __LINE__);
        }
        if (is_null($errorsCount) || (is_array($errorsCount) && empty($errorsCount))) {
            unset($this->ErrorsCount);
        } else {
            $this->ErrorsCount = $errorsCount;
        }
        return $this;
    }
    /**
     * Get ErrorText 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 getErrorText()
    {
        return isset($this->ErrorText) ? $this->ErrorText : null;
    }
    /**
     * Set ErrorText 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 $errorText
     * @return \patest\StructType\Printing_SpoolGroupsAuditExtension4UI
     */
    public function setErrorText($errorText = null)
    {
        // validation for constraint: string
        if (!is_null($errorText) && !is_string($errorText)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorText, true), gettype($errorText)), __LINE__);
        }
        if (is_null($errorText) || (is_array($errorText) && empty($errorText))) {
            unset($this->ErrorText);
        } else {
            $this->ErrorText = $errorText;
        }
        return $this;
    }
    /**
     * Get HasGroupErrors 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 getHasGroupErrors()
    {
        return isset($this->HasGroupErrors) ? $this->HasGroupErrors : null;
    }
    /**
     * Set HasGroupErrors 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 $hasGroupErrors
     * @return \patest\StructType\Printing_SpoolGroupsAuditExtension4UI
     */
    public function setHasGroupErrors($hasGroupErrors = null)
    {
        // validation for constraint: boolean
        if (!is_null($hasGroupErrors) && !is_bool($hasGroupErrors)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($hasGroupErrors, true), gettype($hasGroupErrors)), __LINE__);
        }
        if (is_null($hasGroupErrors) || (is_array($hasGroupErrors) && empty($hasGroupErrors))) {
            unset($this->HasGroupErrors);
        } else {
            $this->HasGroupErrors = $hasGroupErrors;
        }
        return $this;
    }
    /**
     * Get HasItemErrors 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 getHasItemErrors()
    {
        return isset($this->HasItemErrors) ? $this->HasItemErrors : null;
    }
    /**
     * Set HasItemErrors 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 $hasItemErrors
     * @return \patest\StructType\Printing_SpoolGroupsAuditExtension4UI
     */
    public function setHasItemErrors($hasItemErrors = null)
    {
        // validation for constraint: boolean
        if (!is_null($hasItemErrors) && !is_bool($hasItemErrors)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($hasItemErrors, true), gettype($hasItemErrors)), __LINE__);
        }
        if (is_null($hasItemErrors) || (is_array($hasItemErrors) && empty($hasItemErrors))) {
            unset($this->HasItemErrors);
        } else {
            $this->HasItemErrors = $hasItemErrors;
        }
        return $this;
    }
    /**
     * Get InfoText 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 getInfoText()
    {
        return isset($this->InfoText) ? $this->InfoText : null;
    }
    /**
     * Set InfoText 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 $infoText
     * @return \patest\StructType\Printing_SpoolGroupsAuditExtension4UI
     */
    public function setInfoText($infoText = null)
    {
        // validation for constraint: string
        if (!is_null($infoText) && !is_string($infoText)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($infoText, true), gettype($infoText)), __LINE__);
        }
        if (is_null($infoText) || (is_array($infoText) && empty($infoText))) {
            unset($this->InfoText);
        } else {
            $this->InfoText = $infoText;
        }
        return $this;
    }
}
