<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Sales.LiaRecalculationBatchDetail StructType
 * @subpackage Structs
 */
class Sales_LiaRecalculationBatchDetail extends PersistableEntity
{
    /**
     * The BatchDuration
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $BatchDuration;
    /**
     * The BatchStartTime
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $BatchStartTime;
    /**
     * The DeductionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $DeductionNumber;
    /**
     * The EnableFeesCalculation
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $EnableFeesCalculation;
    /**
     * The EnableMainCalculation
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $EnableMainCalculation;
    /**
     * The ErrorLog
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ErrorLog;
    /**
     * The FailedDeductionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $FailedDeductionNumber;
    /**
     * The FailedTransactionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $FailedTransactionNumber;
    /**
     * The FromDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $FromDate;
    /**
     * The Mode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Mode;
    /**
     * The PopulationSelector
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $PopulationSelector;
    /**
     * The Status
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Status;
    /**
     * The ToDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ToDate;
    /**
     * The TransactionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $TransactionNumber;
    /**
     * The WorkerCount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $WorkerCount;
    /**
     * Constructor method for Sales.LiaRecalculationBatchDetail
     * @uses Sales_LiaRecalculationBatchDetail::setBatchDuration()
     * @uses Sales_LiaRecalculationBatchDetail::setBatchStartTime()
     * @uses Sales_LiaRecalculationBatchDetail::setDeductionNumber()
     * @uses Sales_LiaRecalculationBatchDetail::setEnableFeesCalculation()
     * @uses Sales_LiaRecalculationBatchDetail::setEnableMainCalculation()
     * @uses Sales_LiaRecalculationBatchDetail::setErrorLog()
     * @uses Sales_LiaRecalculationBatchDetail::setFailedDeductionNumber()
     * @uses Sales_LiaRecalculationBatchDetail::setFailedTransactionNumber()
     * @uses Sales_LiaRecalculationBatchDetail::setFromDate()
     * @uses Sales_LiaRecalculationBatchDetail::setMode()
     * @uses Sales_LiaRecalculationBatchDetail::setPopulationSelector()
     * @uses Sales_LiaRecalculationBatchDetail::setStatus()
     * @uses Sales_LiaRecalculationBatchDetail::setToDate()
     * @uses Sales_LiaRecalculationBatchDetail::setTransactionNumber()
     * @uses Sales_LiaRecalculationBatchDetail::setWorkerCount()
     * @param int $batchDuration
     * @param string $batchStartTime
     * @param int $deductionNumber
     * @param bool $enableFeesCalculation
     * @param bool $enableMainCalculation
     * @param string $errorLog
     * @param int $failedDeductionNumber
     * @param int $failedTransactionNumber
     * @param string $fromDate
     * @param string $mode
     * @param string $populationSelector
     * @param string $status
     * @param string $toDate
     * @param int $transactionNumber
     * @param int $workerCount
     */
    public function __construct($batchDuration = null, $batchStartTime = null, $deductionNumber = null, $enableFeesCalculation = null, $enableMainCalculation = null, $errorLog = null, $failedDeductionNumber = null, $failedTransactionNumber = null, $fromDate = null, $mode = null, $populationSelector = null, $status = null, $toDate = null, $transactionNumber = null, $workerCount = null)
    {
        $this
            ->setBatchDuration($batchDuration)
            ->setBatchStartTime($batchStartTime)
            ->setDeductionNumber($deductionNumber)
            ->setEnableFeesCalculation($enableFeesCalculation)
            ->setEnableMainCalculation($enableMainCalculation)
            ->setErrorLog($errorLog)
            ->setFailedDeductionNumber($failedDeductionNumber)
            ->setFailedTransactionNumber($failedTransactionNumber)
            ->setFromDate($fromDate)
            ->setMode($mode)
            ->setPopulationSelector($populationSelector)
            ->setStatus($status)
            ->setToDate($toDate)
            ->setTransactionNumber($transactionNumber)
            ->setWorkerCount($workerCount);
    }
    /**
     * Get BatchDuration 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 getBatchDuration()
    {
        return isset($this->BatchDuration) ? $this->BatchDuration : null;
    }
    /**
     * Set BatchDuration 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 $batchDuration
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setBatchDuration($batchDuration = null)
    {
        // validation for constraint: int
        if (!is_null($batchDuration) && !(is_int($batchDuration) || ctype_digit($batchDuration))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($batchDuration, true), gettype($batchDuration)), __LINE__);
        }
        if (is_null($batchDuration) || (is_array($batchDuration) && empty($batchDuration))) {
            unset($this->BatchDuration);
        } else {
            $this->BatchDuration = $batchDuration;
        }
        return $this;
    }
    /**
     * Get BatchStartTime 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 getBatchStartTime()
    {
        return isset($this->BatchStartTime) ? $this->BatchStartTime : null;
    }
    /**
     * Set BatchStartTime 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 $batchStartTime
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setBatchStartTime($batchStartTime = null)
    {
        // validation for constraint: string
        if (!is_null($batchStartTime) && !is_string($batchStartTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($batchStartTime, true), gettype($batchStartTime)), __LINE__);
        }
        if (is_null($batchStartTime) || (is_array($batchStartTime) && empty($batchStartTime))) {
            unset($this->BatchStartTime);
        } else {
            $this->BatchStartTime = $batchStartTime;
        }
        return $this;
    }
    /**
     * Get DeductionNumber 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 getDeductionNumber()
    {
        return isset($this->DeductionNumber) ? $this->DeductionNumber : null;
    }
    /**
     * Set DeductionNumber 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 $deductionNumber
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setDeductionNumber($deductionNumber = null)
    {
        // validation for constraint: int
        if (!is_null($deductionNumber) && !(is_int($deductionNumber) || ctype_digit($deductionNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($deductionNumber, true), gettype($deductionNumber)), __LINE__);
        }
        if (is_null($deductionNumber) || (is_array($deductionNumber) && empty($deductionNumber))) {
            unset($this->DeductionNumber);
        } else {
            $this->DeductionNumber = $deductionNumber;
        }
        return $this;
    }
    /**
     * Get EnableFeesCalculation 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 getEnableFeesCalculation()
    {
        return isset($this->EnableFeesCalculation) ? $this->EnableFeesCalculation : null;
    }
    /**
     * Set EnableFeesCalculation 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 $enableFeesCalculation
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setEnableFeesCalculation($enableFeesCalculation = null)
    {
        // validation for constraint: boolean
        if (!is_null($enableFeesCalculation) && !is_bool($enableFeesCalculation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($enableFeesCalculation, true), gettype($enableFeesCalculation)), __LINE__);
        }
        if (is_null($enableFeesCalculation) || (is_array($enableFeesCalculation) && empty($enableFeesCalculation))) {
            unset($this->EnableFeesCalculation);
        } else {
            $this->EnableFeesCalculation = $enableFeesCalculation;
        }
        return $this;
    }
    /**
     * Get EnableMainCalculation 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 getEnableMainCalculation()
    {
        return isset($this->EnableMainCalculation) ? $this->EnableMainCalculation : null;
    }
    /**
     * Set EnableMainCalculation 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 $enableMainCalculation
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setEnableMainCalculation($enableMainCalculation = null)
    {
        // validation for constraint: boolean
        if (!is_null($enableMainCalculation) && !is_bool($enableMainCalculation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($enableMainCalculation, true), gettype($enableMainCalculation)), __LINE__);
        }
        if (is_null($enableMainCalculation) || (is_array($enableMainCalculation) && empty($enableMainCalculation))) {
            unset($this->EnableMainCalculation);
        } else {
            $this->EnableMainCalculation = $enableMainCalculation;
        }
        return $this;
    }
    /**
     * Get ErrorLog 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 getErrorLog()
    {
        return isset($this->ErrorLog) ? $this->ErrorLog : null;
    }
    /**
     * Set ErrorLog 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 $errorLog
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setErrorLog($errorLog = null)
    {
        // validation for constraint: string
        if (!is_null($errorLog) && !is_string($errorLog)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($errorLog, true), gettype($errorLog)), __LINE__);
        }
        if (is_null($errorLog) || (is_array($errorLog) && empty($errorLog))) {
            unset($this->ErrorLog);
        } else {
            $this->ErrorLog = $errorLog;
        }
        return $this;
    }
    /**
     * Get FailedDeductionNumber 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 getFailedDeductionNumber()
    {
        return isset($this->FailedDeductionNumber) ? $this->FailedDeductionNumber : null;
    }
    /**
     * Set FailedDeductionNumber 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 $failedDeductionNumber
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setFailedDeductionNumber($failedDeductionNumber = null)
    {
        // validation for constraint: int
        if (!is_null($failedDeductionNumber) && !(is_int($failedDeductionNumber) || ctype_digit($failedDeductionNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($failedDeductionNumber, true), gettype($failedDeductionNumber)), __LINE__);
        }
        if (is_null($failedDeductionNumber) || (is_array($failedDeductionNumber) && empty($failedDeductionNumber))) {
            unset($this->FailedDeductionNumber);
        } else {
            $this->FailedDeductionNumber = $failedDeductionNumber;
        }
        return $this;
    }
    /**
     * Get FailedTransactionNumber 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 getFailedTransactionNumber()
    {
        return isset($this->FailedTransactionNumber) ? $this->FailedTransactionNumber : null;
    }
    /**
     * Set FailedTransactionNumber 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 $failedTransactionNumber
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setFailedTransactionNumber($failedTransactionNumber = null)
    {
        // validation for constraint: int
        if (!is_null($failedTransactionNumber) && !(is_int($failedTransactionNumber) || ctype_digit($failedTransactionNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($failedTransactionNumber, true), gettype($failedTransactionNumber)), __LINE__);
        }
        if (is_null($failedTransactionNumber) || (is_array($failedTransactionNumber) && empty($failedTransactionNumber))) {
            unset($this->FailedTransactionNumber);
        } else {
            $this->FailedTransactionNumber = $failedTransactionNumber;
        }
        return $this;
    }
    /**
     * Get FromDate 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 getFromDate()
    {
        return isset($this->FromDate) ? $this->FromDate : null;
    }
    /**
     * Set FromDate 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 $fromDate
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setFromDate($fromDate = null)
    {
        // validation for constraint: string
        if (!is_null($fromDate) && !is_string($fromDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromDate, true), gettype($fromDate)), __LINE__);
        }
        if (is_null($fromDate) || (is_array($fromDate) && empty($fromDate))) {
            unset($this->FromDate);
        } else {
            $this->FromDate = $fromDate;
        }
        return $this;
    }
    /**
     * Get Mode 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 getMode()
    {
        return isset($this->Mode) ? $this->Mode : null;
    }
    /**
     * Set Mode 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
     * @uses \patest\EnumType\LiaRecalculationMode::valueIsValid()
     * @uses \patest\EnumType\LiaRecalculationMode::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $mode
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setMode($mode = null)
    {
        // validation for constraint: enumeration
        if (!\patest\EnumType\LiaRecalculationMode::valueIsValid($mode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \patest\EnumType\LiaRecalculationMode', is_array($mode) ? implode(', ', $mode) : var_export($mode, true), implode(', ', \patest\EnumType\LiaRecalculationMode::getValidValues())), __LINE__);
        }
        if (is_null($mode) || (is_array($mode) && empty($mode))) {
            unset($this->Mode);
        } else {
            $this->Mode = $mode;
        }
        return $this;
    }
    /**
     * Get PopulationSelector 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 getPopulationSelector()
    {
        return isset($this->PopulationSelector) ? $this->PopulationSelector : null;
    }
    /**
     * Set PopulationSelector 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 $populationSelector
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setPopulationSelector($populationSelector = null)
    {
        // validation for constraint: string
        if (!is_null($populationSelector) && !is_string($populationSelector)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($populationSelector, true), gettype($populationSelector)), __LINE__);
        }
        if (is_null($populationSelector) || (is_array($populationSelector) && empty($populationSelector))) {
            unset($this->PopulationSelector);
        } else {
            $this->PopulationSelector = $populationSelector;
        }
        return $this;
    }
    /**
     * Get Status 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 getStatus()
    {
        return isset($this->Status) ? $this->Status : null;
    }
    /**
     * Set Status 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
     * @uses \patest\EnumType\LiaRecalculationBatchStatus::valueIsValid()
     * @uses \patest\EnumType\LiaRecalculationBatchStatus::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $status
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setStatus($status = null)
    {
        // validation for constraint: enumeration
        if (!\patest\EnumType\LiaRecalculationBatchStatus::valueIsValid($status)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \patest\EnumType\LiaRecalculationBatchStatus', is_array($status) ? implode(', ', $status) : var_export($status, true), implode(', ', \patest\EnumType\LiaRecalculationBatchStatus::getValidValues())), __LINE__);
        }
        if (is_null($status) || (is_array($status) && empty($status))) {
            unset($this->Status);
        } else {
            $this->Status = $status;
        }
        return $this;
    }
    /**
     * Get ToDate 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 getToDate()
    {
        return isset($this->ToDate) ? $this->ToDate : null;
    }
    /**
     * Set ToDate 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 $toDate
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setToDate($toDate = null)
    {
        // validation for constraint: string
        if (!is_null($toDate) && !is_string($toDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($toDate, true), gettype($toDate)), __LINE__);
        }
        if (is_null($toDate) || (is_array($toDate) && empty($toDate))) {
            unset($this->ToDate);
        } else {
            $this->ToDate = $toDate;
        }
        return $this;
    }
    /**
     * Get TransactionNumber 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 getTransactionNumber()
    {
        return isset($this->TransactionNumber) ? $this->TransactionNumber : null;
    }
    /**
     * Set TransactionNumber 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 $transactionNumber
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setTransactionNumber($transactionNumber = null)
    {
        // validation for constraint: int
        if (!is_null($transactionNumber) && !(is_int($transactionNumber) || ctype_digit($transactionNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($transactionNumber, true), gettype($transactionNumber)), __LINE__);
        }
        if (is_null($transactionNumber) || (is_array($transactionNumber) && empty($transactionNumber))) {
            unset($this->TransactionNumber);
        } else {
            $this->TransactionNumber = $transactionNumber;
        }
        return $this;
    }
    /**
     * Get WorkerCount 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 getWorkerCount()
    {
        return isset($this->WorkerCount) ? $this->WorkerCount : null;
    }
    /**
     * Set WorkerCount 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 $workerCount
     * @return \patest\StructType\Sales_LiaRecalculationBatchDetail
     */
    public function setWorkerCount($workerCount = null)
    {
        // validation for constraint: int
        if (!is_null($workerCount) && !(is_int($workerCount) || ctype_digit($workerCount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($workerCount, true), gettype($workerCount)), __LINE__);
        }
        if (is_null($workerCount) || (is_array($workerCount) && empty($workerCount))) {
            unset($this->WorkerCount);
        } else {
            $this->WorkerCount = $workerCount;
        }
        return $this;
    }
}
