<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Preferences StructType
 * @subpackage Structs
 */
class Preferences extends AbstractStructBase
{
    /**
     * The warningAsError
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $warningAsError;
    /**
     * The disableMandatoryCustomFieldValidation
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $disableMandatoryCustomFieldValidation;
    /**
     * The disableSystemNotesForCustomFields
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $disableSystemNotesForCustomFields;
    /**
     * The ignoreReadOnlyFields
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $ignoreReadOnlyFields;
    /**
     * The runServerSuiteScriptAndTriggerWorkflows
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $runServerSuiteScriptAndTriggerWorkflows;
    /**
     * Constructor method for Preferences
     * @uses Preferences::setWarningAsError()
     * @uses Preferences::setDisableMandatoryCustomFieldValidation()
     * @uses Preferences::setDisableSystemNotesForCustomFields()
     * @uses Preferences::setIgnoreReadOnlyFields()
     * @uses Preferences::setRunServerSuiteScriptAndTriggerWorkflows()
     * @param bool $warningAsError
     * @param bool $disableMandatoryCustomFieldValidation
     * @param bool $disableSystemNotesForCustomFields
     * @param bool $ignoreReadOnlyFields
     * @param bool $runServerSuiteScriptAndTriggerWorkflows
     */
    public function __construct($warningAsError = null, $disableMandatoryCustomFieldValidation = null, $disableSystemNotesForCustomFields = null, $ignoreReadOnlyFields = null, $runServerSuiteScriptAndTriggerWorkflows = null)
    {
        $this
            ->setWarningAsError($warningAsError)
            ->setDisableMandatoryCustomFieldValidation($disableMandatoryCustomFieldValidation)
            ->setDisableSystemNotesForCustomFields($disableSystemNotesForCustomFields)
            ->setIgnoreReadOnlyFields($ignoreReadOnlyFields)
            ->setRunServerSuiteScriptAndTriggerWorkflows($runServerSuiteScriptAndTriggerWorkflows);
    }
    /**
     * Get warningAsError value
     * @return bool|null
     */
    public function getWarningAsError()
    {
        return $this->warningAsError;
    }
    /**
     * Set warningAsError value
     * @param bool $warningAsError
     * @return \StructType\Preferences
     */
    public function setWarningAsError($warningAsError = null)
    {
        // validation for constraint: boolean
        if (!is_null($warningAsError) && !is_bool($warningAsError)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($warningAsError, true), gettype($warningAsError)), __LINE__);
        }
        $this->warningAsError = $warningAsError;
        return $this;
    }
    /**
     * Get disableMandatoryCustomFieldValidation value
     * @return bool|null
     */
    public function getDisableMandatoryCustomFieldValidation()
    {
        return $this->disableMandatoryCustomFieldValidation;
    }
    /**
     * Set disableMandatoryCustomFieldValidation value
     * @param bool $disableMandatoryCustomFieldValidation
     * @return \StructType\Preferences
     */
    public function setDisableMandatoryCustomFieldValidation($disableMandatoryCustomFieldValidation = null)
    {
        // validation for constraint: boolean
        if (!is_null($disableMandatoryCustomFieldValidation) && !is_bool($disableMandatoryCustomFieldValidation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($disableMandatoryCustomFieldValidation, true), gettype($disableMandatoryCustomFieldValidation)), __LINE__);
        }
        $this->disableMandatoryCustomFieldValidation = $disableMandatoryCustomFieldValidation;
        return $this;
    }
    /**
     * Get disableSystemNotesForCustomFields value
     * @return bool|null
     */
    public function getDisableSystemNotesForCustomFields()
    {
        return $this->disableSystemNotesForCustomFields;
    }
    /**
     * Set disableSystemNotesForCustomFields value
     * @param bool $disableSystemNotesForCustomFields
     * @return \StructType\Preferences
     */
    public function setDisableSystemNotesForCustomFields($disableSystemNotesForCustomFields = null)
    {
        // validation for constraint: boolean
        if (!is_null($disableSystemNotesForCustomFields) && !is_bool($disableSystemNotesForCustomFields)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($disableSystemNotesForCustomFields, true), gettype($disableSystemNotesForCustomFields)), __LINE__);
        }
        $this->disableSystemNotesForCustomFields = $disableSystemNotesForCustomFields;
        return $this;
    }
    /**
     * Get ignoreReadOnlyFields value
     * @return bool|null
     */
    public function getIgnoreReadOnlyFields()
    {
        return $this->ignoreReadOnlyFields;
    }
    /**
     * Set ignoreReadOnlyFields value
     * @param bool $ignoreReadOnlyFields
     * @return \StructType\Preferences
     */
    public function setIgnoreReadOnlyFields($ignoreReadOnlyFields = null)
    {
        // validation for constraint: boolean
        if (!is_null($ignoreReadOnlyFields) && !is_bool($ignoreReadOnlyFields)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($ignoreReadOnlyFields, true), gettype($ignoreReadOnlyFields)), __LINE__);
        }
        $this->ignoreReadOnlyFields = $ignoreReadOnlyFields;
        return $this;
    }
    /**
     * Get runServerSuiteScriptAndTriggerWorkflows value
     * @return bool|null
     */
    public function getRunServerSuiteScriptAndTriggerWorkflows()
    {
        return $this->runServerSuiteScriptAndTriggerWorkflows;
    }
    /**
     * Set runServerSuiteScriptAndTriggerWorkflows value
     * @param bool $runServerSuiteScriptAndTriggerWorkflows
     * @return \StructType\Preferences
     */
    public function setRunServerSuiteScriptAndTriggerWorkflows($runServerSuiteScriptAndTriggerWorkflows = null)
    {
        // validation for constraint: boolean
        if (!is_null($runServerSuiteScriptAndTriggerWorkflows) && !is_bool($runServerSuiteScriptAndTriggerWorkflows)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($runServerSuiteScriptAndTriggerWorkflows, true), gettype($runServerSuiteScriptAndTriggerWorkflows)), __LINE__);
        }
        $this->runServerSuiteScriptAndTriggerWorkflows = $runServerSuiteScriptAndTriggerWorkflows;
        return $this;
    }
}
