<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for PeriodEndJournal StructType
 * @subpackage Structs
 */
class PeriodEndJournal extends Record
{
    /**
     * The createdDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $createdDate;
    /**
     * The lastModifiedDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $lastModifiedDate;
    /**
     * The transactionNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $transactionNumber;
    /**
     * The accountingBook
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $accountingBook;
    /**
     * The customForm
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $customForm;
    /**
     * The tranId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $tranId;
    /**
     * The trandate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $trandate;
    /**
     * The postingPeriod
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $postingPeriod;
    /**
     * The memo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $memo;
    /**
     * The subsidiary
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $subsidiary;
    /**
     * The sourceSubsidiary
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $sourceSubsidiary;
    /**
     * The class
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $class;
    /**
     * The department
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $department;
    /**
     * The location
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $location;
    /**
     * The mainAccount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $mainAccount;
    /**
     * The currency
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $currency;
    /**
     * The creditTotal
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $creditTotal;
    /**
     * The debitTotal
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $debitTotal;
    /**
     * The lineList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\PeriodEndJournalLineList
     */
    public $lineList;
    /**
     * The customFieldList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\CustomFieldList
     */
    public $customFieldList;
    /**
     * The internalId
     * @var string
     */
    public $internalId;
    /**
     * The externalId
     * @var string
     */
    public $externalId;
    /**
     * Constructor method for PeriodEndJournal
     * @uses PeriodEndJournal::setCreatedDate()
     * @uses PeriodEndJournal::setLastModifiedDate()
     * @uses PeriodEndJournal::setTransactionNumber()
     * @uses PeriodEndJournal::setAccountingBook()
     * @uses PeriodEndJournal::setCustomForm()
     * @uses PeriodEndJournal::setTranId()
     * @uses PeriodEndJournal::setTrandate()
     * @uses PeriodEndJournal::setPostingPeriod()
     * @uses PeriodEndJournal::setMemo()
     * @uses PeriodEndJournal::setSubsidiary()
     * @uses PeriodEndJournal::setSourceSubsidiary()
     * @uses PeriodEndJournal::setClass()
     * @uses PeriodEndJournal::setDepartment()
     * @uses PeriodEndJournal::setLocation()
     * @uses PeriodEndJournal::setMainAccount()
     * @uses PeriodEndJournal::setCurrency()
     * @uses PeriodEndJournal::setCreditTotal()
     * @uses PeriodEndJournal::setDebitTotal()
     * @uses PeriodEndJournal::setLineList()
     * @uses PeriodEndJournal::setCustomFieldList()
     * @uses PeriodEndJournal::setInternalId()
     * @uses PeriodEndJournal::setExternalId()
     * @param string $createdDate
     * @param string $lastModifiedDate
     * @param string $transactionNumber
     * @param \StructType\RecordRef $accountingBook
     * @param \StructType\RecordRef $customForm
     * @param string $tranId
     * @param string $trandate
     * @param \StructType\RecordRef $postingPeriod
     * @param string $memo
     * @param \StructType\RecordRef $subsidiary
     * @param \StructType\RecordRef $sourceSubsidiary
     * @param \StructType\RecordRef $class
     * @param \StructType\RecordRef $department
     * @param \StructType\RecordRef $location
     * @param \StructType\RecordRef $mainAccount
     * @param \StructType\RecordRef $currency
     * @param float $creditTotal
     * @param float $debitTotal
     * @param \StructType\PeriodEndJournalLineList $lineList
     * @param \StructType\CustomFieldList $customFieldList
     * @param string $internalId
     * @param string $externalId
     */
    public function __construct($createdDate = null, $lastModifiedDate = null, $transactionNumber = null, \StructType\RecordRef $accountingBook = null, \StructType\RecordRef $customForm = null, $tranId = null, $trandate = null, \StructType\RecordRef $postingPeriod = null, $memo = null, \StructType\RecordRef $subsidiary = null, \StructType\RecordRef $sourceSubsidiary = null, \StructType\RecordRef $class = null, \StructType\RecordRef $department = null, \StructType\RecordRef $location = null, \StructType\RecordRef $mainAccount = null, \StructType\RecordRef $currency = null, $creditTotal = null, $debitTotal = null, \StructType\PeriodEndJournalLineList $lineList = null, \StructType\CustomFieldList $customFieldList = null, $internalId = null, $externalId = null)
    {
        $this
            ->setCreatedDate($createdDate)
            ->setLastModifiedDate($lastModifiedDate)
            ->setTransactionNumber($transactionNumber)
            ->setAccountingBook($accountingBook)
            ->setCustomForm($customForm)
            ->setTranId($tranId)
            ->setTrandate($trandate)
            ->setPostingPeriod($postingPeriod)
            ->setMemo($memo)
            ->setSubsidiary($subsidiary)
            ->setSourceSubsidiary($sourceSubsidiary)
            ->setClass($class)
            ->setDepartment($department)
            ->setLocation($location)
            ->setMainAccount($mainAccount)
            ->setCurrency($currency)
            ->setCreditTotal($creditTotal)
            ->setDebitTotal($debitTotal)
            ->setLineList($lineList)
            ->setCustomFieldList($customFieldList)
            ->setInternalId($internalId)
            ->setExternalId($externalId);
    }
    /**
     * Get createdDate value
     * @return string|null
     */
    public function getCreatedDate()
    {
        return $this->createdDate;
    }
    /**
     * Set createdDate value
     * @param string $createdDate
     * @return \StructType\PeriodEndJournal
     */
    public function setCreatedDate($createdDate = null)
    {
        // validation for constraint: string
        if (!is_null($createdDate) && !is_string($createdDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($createdDate, true), gettype($createdDate)), __LINE__);
        }
        $this->createdDate = $createdDate;
        return $this;
    }
    /**
     * Get lastModifiedDate value
     * @return string|null
     */
    public function getLastModifiedDate()
    {
        return $this->lastModifiedDate;
    }
    /**
     * Set lastModifiedDate value
     * @param string $lastModifiedDate
     * @return \StructType\PeriodEndJournal
     */
    public function setLastModifiedDate($lastModifiedDate = null)
    {
        // validation for constraint: string
        if (!is_null($lastModifiedDate) && !is_string($lastModifiedDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastModifiedDate, true), gettype($lastModifiedDate)), __LINE__);
        }
        $this->lastModifiedDate = $lastModifiedDate;
        return $this;
    }
    /**
     * Get transactionNumber value
     * @return string|null
     */
    public function getTransactionNumber()
    {
        return $this->transactionNumber;
    }
    /**
     * Set transactionNumber value
     * @param string $transactionNumber
     * @return \StructType\PeriodEndJournal
     */
    public function setTransactionNumber($transactionNumber = null)
    {
        // validation for constraint: string
        if (!is_null($transactionNumber) && !is_string($transactionNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transactionNumber, true), gettype($transactionNumber)), __LINE__);
        }
        $this->transactionNumber = $transactionNumber;
        return $this;
    }
    /**
     * Get accountingBook value
     * @return \StructType\RecordRef|null
     */
    public function getAccountingBook()
    {
        return $this->accountingBook;
    }
    /**
     * Set accountingBook value
     * @param \StructType\RecordRef $accountingBook
     * @return \StructType\PeriodEndJournal
     */
    public function setAccountingBook(\StructType\RecordRef $accountingBook = null)
    {
        $this->accountingBook = $accountingBook;
        return $this;
    }
    /**
     * Get customForm value
     * @return \StructType\RecordRef|null
     */
    public function getCustomForm()
    {
        return $this->customForm;
    }
    /**
     * Set customForm value
     * @param \StructType\RecordRef $customForm
     * @return \StructType\PeriodEndJournal
     */
    public function setCustomForm(\StructType\RecordRef $customForm = null)
    {
        $this->customForm = $customForm;
        return $this;
    }
    /**
     * Get tranId value
     * @return string|null
     */
    public function getTranId()
    {
        return $this->tranId;
    }
    /**
     * Set tranId value
     * @param string $tranId
     * @return \StructType\PeriodEndJournal
     */
    public function setTranId($tranId = null)
    {
        // validation for constraint: string
        if (!is_null($tranId) && !is_string($tranId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($tranId, true), gettype($tranId)), __LINE__);
        }
        $this->tranId = $tranId;
        return $this;
    }
    /**
     * Get trandate value
     * @return string|null
     */
    public function getTrandate()
    {
        return $this->trandate;
    }
    /**
     * Set trandate value
     * @param string $trandate
     * @return \StructType\PeriodEndJournal
     */
    public function setTrandate($trandate = null)
    {
        // validation for constraint: string
        if (!is_null($trandate) && !is_string($trandate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($trandate, true), gettype($trandate)), __LINE__);
        }
        $this->trandate = $trandate;
        return $this;
    }
    /**
     * Get postingPeriod value
     * @return \StructType\RecordRef|null
     */
    public function getPostingPeriod()
    {
        return $this->postingPeriod;
    }
    /**
     * Set postingPeriod value
     * @param \StructType\RecordRef $postingPeriod
     * @return \StructType\PeriodEndJournal
     */
    public function setPostingPeriod(\StructType\RecordRef $postingPeriod = null)
    {
        $this->postingPeriod = $postingPeriod;
        return $this;
    }
    /**
     * Get memo value
     * @return string|null
     */
    public function getMemo()
    {
        return $this->memo;
    }
    /**
     * Set memo value
     * @param string $memo
     * @return \StructType\PeriodEndJournal
     */
    public function setMemo($memo = null)
    {
        // validation for constraint: string
        if (!is_null($memo) && !is_string($memo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($memo, true), gettype($memo)), __LINE__);
        }
        $this->memo = $memo;
        return $this;
    }
    /**
     * Get subsidiary value
     * @return \StructType\RecordRef|null
     */
    public function getSubsidiary()
    {
        return $this->subsidiary;
    }
    /**
     * Set subsidiary value
     * @param \StructType\RecordRef $subsidiary
     * @return \StructType\PeriodEndJournal
     */
    public function setSubsidiary(\StructType\RecordRef $subsidiary = null)
    {
        $this->subsidiary = $subsidiary;
        return $this;
    }
    /**
     * Get sourceSubsidiary value
     * @return \StructType\RecordRef|null
     */
    public function getSourceSubsidiary()
    {
        return $this->sourceSubsidiary;
    }
    /**
     * Set sourceSubsidiary value
     * @param \StructType\RecordRef $sourceSubsidiary
     * @return \StructType\PeriodEndJournal
     */
    public function setSourceSubsidiary(\StructType\RecordRef $sourceSubsidiary = null)
    {
        $this->sourceSubsidiary = $sourceSubsidiary;
        return $this;
    }
    /**
     * Get class value
     * @return \StructType\RecordRef|null
     */
    public function getClass()
    {
        return $this->class;
    }
    /**
     * Set class value
     * @param \StructType\RecordRef $class
     * @return \StructType\PeriodEndJournal
     */
    public function setClass(\StructType\RecordRef $class = null)
    {
        $this->class = $class;
        return $this;
    }
    /**
     * Get department value
     * @return \StructType\RecordRef|null
     */
    public function getDepartment()
    {
        return $this->department;
    }
    /**
     * Set department value
     * @param \StructType\RecordRef $department
     * @return \StructType\PeriodEndJournal
     */
    public function setDepartment(\StructType\RecordRef $department = null)
    {
        $this->department = $department;
        return $this;
    }
    /**
     * Get location value
     * @return \StructType\RecordRef|null
     */
    public function getLocation()
    {
        return $this->location;
    }
    /**
     * Set location value
     * @param \StructType\RecordRef $location
     * @return \StructType\PeriodEndJournal
     */
    public function setLocation(\StructType\RecordRef $location = null)
    {
        $this->location = $location;
        return $this;
    }
    /**
     * Get mainAccount value
     * @return \StructType\RecordRef|null
     */
    public function getMainAccount()
    {
        return $this->mainAccount;
    }
    /**
     * Set mainAccount value
     * @param \StructType\RecordRef $mainAccount
     * @return \StructType\PeriodEndJournal
     */
    public function setMainAccount(\StructType\RecordRef $mainAccount = null)
    {
        $this->mainAccount = $mainAccount;
        return $this;
    }
    /**
     * Get currency value
     * @return \StructType\RecordRef|null
     */
    public function getCurrency()
    {
        return $this->currency;
    }
    /**
     * Set currency value
     * @param \StructType\RecordRef $currency
     * @return \StructType\PeriodEndJournal
     */
    public function setCurrency(\StructType\RecordRef $currency = null)
    {
        $this->currency = $currency;
        return $this;
    }
    /**
     * Get creditTotal value
     * @return float|null
     */
    public function getCreditTotal()
    {
        return $this->creditTotal;
    }
    /**
     * Set creditTotal value
     * @param float $creditTotal
     * @return \StructType\PeriodEndJournal
     */
    public function setCreditTotal($creditTotal = null)
    {
        // validation for constraint: float
        if (!is_null($creditTotal) && !(is_float($creditTotal) || is_numeric($creditTotal))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($creditTotal, true), gettype($creditTotal)), __LINE__);
        }
        $this->creditTotal = $creditTotal;
        return $this;
    }
    /**
     * Get debitTotal value
     * @return float|null
     */
    public function getDebitTotal()
    {
        return $this->debitTotal;
    }
    /**
     * Set debitTotal value
     * @param float $debitTotal
     * @return \StructType\PeriodEndJournal
     */
    public function setDebitTotal($debitTotal = null)
    {
        // validation for constraint: float
        if (!is_null($debitTotal) && !(is_float($debitTotal) || is_numeric($debitTotal))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($debitTotal, true), gettype($debitTotal)), __LINE__);
        }
        $this->debitTotal = $debitTotal;
        return $this;
    }
    /**
     * Get lineList value
     * @return \StructType\PeriodEndJournalLineList|null
     */
    public function getLineList()
    {
        return $this->lineList;
    }
    /**
     * Set lineList value
     * @param \StructType\PeriodEndJournalLineList $lineList
     * @return \StructType\PeriodEndJournal
     */
    public function setLineList(\StructType\PeriodEndJournalLineList $lineList = null)
    {
        $this->lineList = $lineList;
        return $this;
    }
    /**
     * Get customFieldList value
     * @return \StructType\CustomFieldList|null
     */
    public function getCustomFieldList()
    {
        return $this->customFieldList;
    }
    /**
     * Set customFieldList value
     * @param \StructType\CustomFieldList $customFieldList
     * @return \StructType\PeriodEndJournal
     */
    public function setCustomFieldList(\StructType\CustomFieldList $customFieldList = null)
    {
        $this->customFieldList = $customFieldList;
        return $this;
    }
    /**
     * Get internalId value
     * @return string|null
     */
    public function getInternalId()
    {
        return $this->internalId;
    }
    /**
     * Set internalId value
     * @param string $internalId
     * @return \StructType\PeriodEndJournal
     */
    public function setInternalId($internalId = null)
    {
        // validation for constraint: string
        if (!is_null($internalId) && !is_string($internalId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($internalId, true), gettype($internalId)), __LINE__);
        }
        $this->internalId = $internalId;
        return $this;
    }
    /**
     * Get externalId value
     * @return string|null
     */
    public function getExternalId()
    {
        return $this->externalId;
    }
    /**
     * Set externalId value
     * @param string $externalId
     * @return \StructType\PeriodEndJournal
     */
    public function setExternalId($externalId = null)
    {
        // validation for constraint: string
        if (!is_null($externalId) && !is_string($externalId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($externalId, true), gettype($externalId)), __LINE__);
        }
        $this->externalId = $externalId;
        return $this;
    }
}
