<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for AdvInterCompanyJournalEntry StructType
 * Meta information extracted from the WSDL
 * - type: tranGeneral:AdvInterCompanyJournalEntry
 * @subpackage Structs
 */
class AdvInterCompanyJournalEntry extends Record
{
    /**
     * The postingPeriod
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $postingPeriod;
    /**
     * The customForm
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $customForm;
    /**
     * The tranDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $tranDate;
    /**
     * The currency
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $currency;
    /**
     * The tranId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $tranId;
    /**
     * The reversalDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $reversalDate;
    /**
     * The reversalDefer
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $reversalDefer;
    /**
     * The parentExpenseAlloc
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $parentExpenseAlloc;
    /**
     * The isBookSpecific
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $isBookSpecific;
    /**
     * The accountingBook
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $accountingBook;
    /**
     * The reversalEntry
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $reversalEntry;
    /**
     * The createdFrom
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $createdFrom;
    /**
     * The department
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $department;
    /**
     * The class
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $class;
    /**
     * The location
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $location;
    /**
     * The subsidiary
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $subsidiary;
    /**
     * The memo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $memo;
    /**
     * The approved
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $approved;
    /**
     * 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 performAutoBalance
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $performAutoBalance;
    /**
     * The lineList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\AdvInterCompanyJournalEntryLineList
     */
    public $lineList;
    /**
     * The accountingBookDetailList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\AdvInterCompanyJournalEntryAccountingBookDetailList
     */
    public $accountingBookDetailList;
    /**
     * 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 AdvInterCompanyJournalEntry
     * @uses AdvInterCompanyJournalEntry::setPostingPeriod()
     * @uses AdvInterCompanyJournalEntry::setCustomForm()
     * @uses AdvInterCompanyJournalEntry::setTranDate()
     * @uses AdvInterCompanyJournalEntry::setCurrency()
     * @uses AdvInterCompanyJournalEntry::setTranId()
     * @uses AdvInterCompanyJournalEntry::setReversalDate()
     * @uses AdvInterCompanyJournalEntry::setReversalDefer()
     * @uses AdvInterCompanyJournalEntry::setParentExpenseAlloc()
     * @uses AdvInterCompanyJournalEntry::setIsBookSpecific()
     * @uses AdvInterCompanyJournalEntry::setAccountingBook()
     * @uses AdvInterCompanyJournalEntry::setReversalEntry()
     * @uses AdvInterCompanyJournalEntry::setCreatedFrom()
     * @uses AdvInterCompanyJournalEntry::setDepartment()
     * @uses AdvInterCompanyJournalEntry::setClass()
     * @uses AdvInterCompanyJournalEntry::setLocation()
     * @uses AdvInterCompanyJournalEntry::setSubsidiary()
     * @uses AdvInterCompanyJournalEntry::setMemo()
     * @uses AdvInterCompanyJournalEntry::setApproved()
     * @uses AdvInterCompanyJournalEntry::setCreatedDate()
     * @uses AdvInterCompanyJournalEntry::setLastModifiedDate()
     * @uses AdvInterCompanyJournalEntry::setPerformAutoBalance()
     * @uses AdvInterCompanyJournalEntry::setLineList()
     * @uses AdvInterCompanyJournalEntry::setAccountingBookDetailList()
     * @uses AdvInterCompanyJournalEntry::setCustomFieldList()
     * @uses AdvInterCompanyJournalEntry::setInternalId()
     * @uses AdvInterCompanyJournalEntry::setExternalId()
     * @param \StructType\RecordRef $postingPeriod
     * @param \StructType\RecordRef $customForm
     * @param string $tranDate
     * @param \StructType\RecordRef $currency
     * @param string $tranId
     * @param string $reversalDate
     * @param bool $reversalDefer
     * @param \StructType\RecordRef $parentExpenseAlloc
     * @param bool $isBookSpecific
     * @param \StructType\RecordRef $accountingBook
     * @param string $reversalEntry
     * @param \StructType\RecordRef $createdFrom
     * @param \StructType\RecordRef $department
     * @param \StructType\RecordRef $class
     * @param \StructType\RecordRef $location
     * @param \StructType\RecordRef $subsidiary
     * @param string $memo
     * @param bool $approved
     * @param string $createdDate
     * @param string $lastModifiedDate
     * @param bool $performAutoBalance
     * @param \StructType\AdvInterCompanyJournalEntryLineList $lineList
     * @param \StructType\AdvInterCompanyJournalEntryAccountingBookDetailList $accountingBookDetailList
     * @param \StructType\CustomFieldList $customFieldList
     * @param string $internalId
     * @param string $externalId
     */
    public function __construct(\StructType\RecordRef $postingPeriod = null, \StructType\RecordRef $customForm = null, $tranDate = null, \StructType\RecordRef $currency = null, $tranId = null, $reversalDate = null, $reversalDefer = null, \StructType\RecordRef $parentExpenseAlloc = null, $isBookSpecific = null, \StructType\RecordRef $accountingBook = null, $reversalEntry = null, \StructType\RecordRef $createdFrom = null, \StructType\RecordRef $department = null, \StructType\RecordRef $class = null, \StructType\RecordRef $location = null, \StructType\RecordRef $subsidiary = null, $memo = null, $approved = null, $createdDate = null, $lastModifiedDate = null, $performAutoBalance = null, \StructType\AdvInterCompanyJournalEntryLineList $lineList = null, \StructType\AdvInterCompanyJournalEntryAccountingBookDetailList $accountingBookDetailList = null, \StructType\CustomFieldList $customFieldList = null, $internalId = null, $externalId = null)
    {
        $this
            ->setPostingPeriod($postingPeriod)
            ->setCustomForm($customForm)
            ->setTranDate($tranDate)
            ->setCurrency($currency)
            ->setTranId($tranId)
            ->setReversalDate($reversalDate)
            ->setReversalDefer($reversalDefer)
            ->setParentExpenseAlloc($parentExpenseAlloc)
            ->setIsBookSpecific($isBookSpecific)
            ->setAccountingBook($accountingBook)
            ->setReversalEntry($reversalEntry)
            ->setCreatedFrom($createdFrom)
            ->setDepartment($department)
            ->setClass($class)
            ->setLocation($location)
            ->setSubsidiary($subsidiary)
            ->setMemo($memo)
            ->setApproved($approved)
            ->setCreatedDate($createdDate)
            ->setLastModifiedDate($lastModifiedDate)
            ->setPerformAutoBalance($performAutoBalance)
            ->setLineList($lineList)
            ->setAccountingBookDetailList($accountingBookDetailList)
            ->setCustomFieldList($customFieldList)
            ->setInternalId($internalId)
            ->setExternalId($externalId);
    }
    /**
     * Get postingPeriod value
     * @return \StructType\RecordRef|null
     */
    public function getPostingPeriod()
    {
        return $this->postingPeriod;
    }
    /**
     * Set postingPeriod value
     * @param \StructType\RecordRef $postingPeriod
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setPostingPeriod(\StructType\RecordRef $postingPeriod = null)
    {
        $this->postingPeriod = $postingPeriod;
        return $this;
    }
    /**
     * Get customForm value
     * @return \StructType\RecordRef|null
     */
    public function getCustomForm()
    {
        return $this->customForm;
    }
    /**
     * Set customForm value
     * @param \StructType\RecordRef $customForm
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setCustomForm(\StructType\RecordRef $customForm = null)
    {
        $this->customForm = $customForm;
        return $this;
    }
    /**
     * Get tranDate value
     * @return string|null
     */
    public function getTranDate()
    {
        return $this->tranDate;
    }
    /**
     * Set tranDate value
     * @param string $tranDate
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    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 currency value
     * @return \StructType\RecordRef|null
     */
    public function getCurrency()
    {
        return $this->currency;
    }
    /**
     * Set currency value
     * @param \StructType\RecordRef $currency
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setCurrency(\StructType\RecordRef $currency = null)
    {
        $this->currency = $currency;
        return $this;
    }
    /**
     * Get tranId value
     * @return string|null
     */
    public function getTranId()
    {
        return $this->tranId;
    }
    /**
     * Set tranId value
     * @param string $tranId
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    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 reversalDate value
     * @return string|null
     */
    public function getReversalDate()
    {
        return $this->reversalDate;
    }
    /**
     * Set reversalDate value
     * @param string $reversalDate
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setReversalDate($reversalDate = null)
    {
        // validation for constraint: string
        if (!is_null($reversalDate) && !is_string($reversalDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reversalDate, true), gettype($reversalDate)), __LINE__);
        }
        $this->reversalDate = $reversalDate;
        return $this;
    }
    /**
     * Get reversalDefer value
     * @return bool|null
     */
    public function getReversalDefer()
    {
        return $this->reversalDefer;
    }
    /**
     * Set reversalDefer value
     * @param bool $reversalDefer
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setReversalDefer($reversalDefer = null)
    {
        // validation for constraint: boolean
        if (!is_null($reversalDefer) && !is_bool($reversalDefer)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($reversalDefer, true), gettype($reversalDefer)), __LINE__);
        }
        $this->reversalDefer = $reversalDefer;
        return $this;
    }
    /**
     * Get parentExpenseAlloc value
     * @return \StructType\RecordRef|null
     */
    public function getParentExpenseAlloc()
    {
        return $this->parentExpenseAlloc;
    }
    /**
     * Set parentExpenseAlloc value
     * @param \StructType\RecordRef $parentExpenseAlloc
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setParentExpenseAlloc(\StructType\RecordRef $parentExpenseAlloc = null)
    {
        $this->parentExpenseAlloc = $parentExpenseAlloc;
        return $this;
    }
    /**
     * Get isBookSpecific value
     * @return bool|null
     */
    public function getIsBookSpecific()
    {
        return $this->isBookSpecific;
    }
    /**
     * Set isBookSpecific value
     * @param bool $isBookSpecific
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setIsBookSpecific($isBookSpecific = null)
    {
        // validation for constraint: boolean
        if (!is_null($isBookSpecific) && !is_bool($isBookSpecific)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isBookSpecific, true), gettype($isBookSpecific)), __LINE__);
        }
        $this->isBookSpecific = $isBookSpecific;
        return $this;
    }
    /**
     * Get accountingBook value
     * @return \StructType\RecordRef|null
     */
    public function getAccountingBook()
    {
        return $this->accountingBook;
    }
    /**
     * Set accountingBook value
     * @param \StructType\RecordRef $accountingBook
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setAccountingBook(\StructType\RecordRef $accountingBook = null)
    {
        $this->accountingBook = $accountingBook;
        return $this;
    }
    /**
     * Get reversalEntry value
     * @return string|null
     */
    public function getReversalEntry()
    {
        return $this->reversalEntry;
    }
    /**
     * Set reversalEntry value
     * @param string $reversalEntry
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setReversalEntry($reversalEntry = null)
    {
        // validation for constraint: string
        if (!is_null($reversalEntry) && !is_string($reversalEntry)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($reversalEntry, true), gettype($reversalEntry)), __LINE__);
        }
        $this->reversalEntry = $reversalEntry;
        return $this;
    }
    /**
     * Get createdFrom value
     * @return \StructType\RecordRef|null
     */
    public function getCreatedFrom()
    {
        return $this->createdFrom;
    }
    /**
     * Set createdFrom value
     * @param \StructType\RecordRef $createdFrom
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setCreatedFrom(\StructType\RecordRef $createdFrom = null)
    {
        $this->createdFrom = $createdFrom;
        return $this;
    }
    /**
     * Get department value
     * @return \StructType\RecordRef|null
     */
    public function getDepartment()
    {
        return $this->department;
    }
    /**
     * Set department value
     * @param \StructType\RecordRef $department
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setDepartment(\StructType\RecordRef $department = null)
    {
        $this->department = $department;
        return $this;
    }
    /**
     * Get class value
     * @return \StructType\RecordRef|null
     */
    public function getClass()
    {
        return $this->class;
    }
    /**
     * Set class value
     * @param \StructType\RecordRef $class
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setClass(\StructType\RecordRef $class = null)
    {
        $this->class = $class;
        return $this;
    }
    /**
     * Get location value
     * @return \StructType\RecordRef|null
     */
    public function getLocation()
    {
        return $this->location;
    }
    /**
     * Set location value
     * @param \StructType\RecordRef $location
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setLocation(\StructType\RecordRef $location = null)
    {
        $this->location = $location;
        return $this;
    }
    /**
     * Get subsidiary value
     * @return \StructType\RecordRef|null
     */
    public function getSubsidiary()
    {
        return $this->subsidiary;
    }
    /**
     * Set subsidiary value
     * @param \StructType\RecordRef $subsidiary
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setSubsidiary(\StructType\RecordRef $subsidiary = null)
    {
        $this->subsidiary = $subsidiary;
        return $this;
    }
    /**
     * Get memo value
     * @return string|null
     */
    public function getMemo()
    {
        return $this->memo;
    }
    /**
     * Set memo value
     * @param string $memo
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    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 approved value
     * @return bool|null
     */
    public function getApproved()
    {
        return $this->approved;
    }
    /**
     * Set approved value
     * @param bool $approved
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setApproved($approved = null)
    {
        // validation for constraint: boolean
        if (!is_null($approved) && !is_bool($approved)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($approved, true), gettype($approved)), __LINE__);
        }
        $this->approved = $approved;
        return $this;
    }
    /**
     * Get createdDate value
     * @return string|null
     */
    public function getCreatedDate()
    {
        return $this->createdDate;
    }
    /**
     * Set createdDate value
     * @param string $createdDate
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    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\AdvInterCompanyJournalEntry
     */
    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 performAutoBalance value
     * @return bool|null
     */
    public function getPerformAutoBalance()
    {
        return $this->performAutoBalance;
    }
    /**
     * Set performAutoBalance value
     * @param bool $performAutoBalance
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setPerformAutoBalance($performAutoBalance = null)
    {
        // validation for constraint: boolean
        if (!is_null($performAutoBalance) && !is_bool($performAutoBalance)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($performAutoBalance, true), gettype($performAutoBalance)), __LINE__);
        }
        $this->performAutoBalance = $performAutoBalance;
        return $this;
    }
    /**
     * Get lineList value
     * @return \StructType\AdvInterCompanyJournalEntryLineList|null
     */
    public function getLineList()
    {
        return $this->lineList;
    }
    /**
     * Set lineList value
     * @param \StructType\AdvInterCompanyJournalEntryLineList $lineList
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setLineList(\StructType\AdvInterCompanyJournalEntryLineList $lineList = null)
    {
        $this->lineList = $lineList;
        return $this;
    }
    /**
     * Get accountingBookDetailList value
     * @return \StructType\AdvInterCompanyJournalEntryAccountingBookDetailList|null
     */
    public function getAccountingBookDetailList()
    {
        return $this->accountingBookDetailList;
    }
    /**
     * Set accountingBookDetailList value
     * @param \StructType\AdvInterCompanyJournalEntryAccountingBookDetailList $accountingBookDetailList
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    public function setAccountingBookDetailList(\StructType\AdvInterCompanyJournalEntryAccountingBookDetailList $accountingBookDetailList = null)
    {
        $this->accountingBookDetailList = $accountingBookDetailList;
        return $this;
    }
    /**
     * Get customFieldList value
     * @return \StructType\CustomFieldList|null
     */
    public function getCustomFieldList()
    {
        return $this->customFieldList;
    }
    /**
     * Set customFieldList value
     * @param \StructType\CustomFieldList $customFieldList
     * @return \StructType\AdvInterCompanyJournalEntry
     */
    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\AdvInterCompanyJournalEntry
     */
    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\AdvInterCompanyJournalEntry
     */
    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;
    }
}
