<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InterCompanyJournalEntry StructType
 * Meta information extracted from the WSDL
 * - type: tranGeneral:InterCompanyJournalEntry
 * @subpackage Structs
 */
class InterCompanyJournalEntry 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 exchangeRate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $exchangeRate;
    /**
     * 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 toSubsidiary
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $toSubsidiary;
    /**
     * 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 lineList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\InterCompanyJournalEntryLineList
     */
    public $lineList;
    /**
     * The accountingBookDetailList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\InterCompanyJournalEntryAccountingBookDetailList
     */
    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 InterCompanyJournalEntry
     * @uses InterCompanyJournalEntry::setPostingPeriod()
     * @uses InterCompanyJournalEntry::setCustomForm()
     * @uses InterCompanyJournalEntry::setTranDate()
     * @uses InterCompanyJournalEntry::setCurrency()
     * @uses InterCompanyJournalEntry::setExchangeRate()
     * @uses InterCompanyJournalEntry::setTranId()
     * @uses InterCompanyJournalEntry::setReversalDate()
     * @uses InterCompanyJournalEntry::setReversalDefer()
     * @uses InterCompanyJournalEntry::setParentExpenseAlloc()
     * @uses InterCompanyJournalEntry::setIsBookSpecific()
     * @uses InterCompanyJournalEntry::setAccountingBook()
     * @uses InterCompanyJournalEntry::setReversalEntry()
     * @uses InterCompanyJournalEntry::setCreatedFrom()
     * @uses InterCompanyJournalEntry::setDepartment()
     * @uses InterCompanyJournalEntry::setClass()
     * @uses InterCompanyJournalEntry::setLocation()
     * @uses InterCompanyJournalEntry::setSubsidiary()
     * @uses InterCompanyJournalEntry::setMemo()
     * @uses InterCompanyJournalEntry::setToSubsidiary()
     * @uses InterCompanyJournalEntry::setApproved()
     * @uses InterCompanyJournalEntry::setCreatedDate()
     * @uses InterCompanyJournalEntry::setLastModifiedDate()
     * @uses InterCompanyJournalEntry::setLineList()
     * @uses InterCompanyJournalEntry::setAccountingBookDetailList()
     * @uses InterCompanyJournalEntry::setCustomFieldList()
     * @uses InterCompanyJournalEntry::setInternalId()
     * @uses InterCompanyJournalEntry::setExternalId()
     * @param \StructType\RecordRef $postingPeriod
     * @param \StructType\RecordRef $customForm
     * @param string $tranDate
     * @param \StructType\RecordRef $currency
     * @param float $exchangeRate
     * @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 \StructType\RecordRef $toSubsidiary
     * @param bool $approved
     * @param string $createdDate
     * @param string $lastModifiedDate
     * @param \StructType\InterCompanyJournalEntryLineList $lineList
     * @param \StructType\InterCompanyJournalEntryAccountingBookDetailList $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, $exchangeRate = 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, \StructType\RecordRef $toSubsidiary = null, $approved = null, $createdDate = null, $lastModifiedDate = null, \StructType\InterCompanyJournalEntryLineList $lineList = null, \StructType\InterCompanyJournalEntryAccountingBookDetailList $accountingBookDetailList = null, \StructType\CustomFieldList $customFieldList = null, $internalId = null, $externalId = null)
    {
        $this
            ->setPostingPeriod($postingPeriod)
            ->setCustomForm($customForm)
            ->setTranDate($tranDate)
            ->setCurrency($currency)
            ->setExchangeRate($exchangeRate)
            ->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)
            ->setToSubsidiary($toSubsidiary)
            ->setApproved($approved)
            ->setCreatedDate($createdDate)
            ->setLastModifiedDate($lastModifiedDate)
            ->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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    public function setCurrency(\StructType\RecordRef $currency = null)
    {
        $this->currency = $currency;
        return $this;
    }
    /**
     * Get exchangeRate value
     * @return float|null
     */
    public function getExchangeRate()
    {
        return $this->exchangeRate;
    }
    /**
     * Set exchangeRate value
     * @param float $exchangeRate
     * @return \StructType\InterCompanyJournalEntry
     */
    public function setExchangeRate($exchangeRate = null)
    {
        // validation for constraint: float
        if (!is_null($exchangeRate) && !(is_float($exchangeRate) || is_numeric($exchangeRate))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($exchangeRate, true), gettype($exchangeRate)), __LINE__);
        }
        $this->exchangeRate = $exchangeRate;
        return $this;
    }
    /**
     * Get tranId value
     * @return string|null
     */
    public function getTranId()
    {
        return $this->tranId;
    }
    /**
     * Set tranId value
     * @param string $tranId
     * @return \StructType\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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 toSubsidiary value
     * @return \StructType\RecordRef|null
     */
    public function getToSubsidiary()
    {
        return $this->toSubsidiary;
    }
    /**
     * Set toSubsidiary value
     * @param \StructType\RecordRef $toSubsidiary
     * @return \StructType\InterCompanyJournalEntry
     */
    public function setToSubsidiary(\StructType\RecordRef $toSubsidiary = null)
    {
        $this->toSubsidiary = $toSubsidiary;
        return $this;
    }
    /**
     * Get approved value
     * @return bool|null
     */
    public function getApproved()
    {
        return $this->approved;
    }
    /**
     * Set approved value
     * @param bool $approved
     * @return \StructType\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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 lineList value
     * @return \StructType\InterCompanyJournalEntryLineList|null
     */
    public function getLineList()
    {
        return $this->lineList;
    }
    /**
     * Set lineList value
     * @param \StructType\InterCompanyJournalEntryLineList $lineList
     * @return \StructType\InterCompanyJournalEntry
     */
    public function setLineList(\StructType\InterCompanyJournalEntryLineList $lineList = null)
    {
        $this->lineList = $lineList;
        return $this;
    }
    /**
     * Get accountingBookDetailList value
     * @return \StructType\InterCompanyJournalEntryAccountingBookDetailList|null
     */
    public function getAccountingBookDetailList()
    {
        return $this->accountingBookDetailList;
    }
    /**
     * Set accountingBookDetailList value
     * @param \StructType\InterCompanyJournalEntryAccountingBookDetailList $accountingBookDetailList
     * @return \StructType\InterCompanyJournalEntry
     */
    public function setAccountingBookDetailList(\StructType\InterCompanyJournalEntryAccountingBookDetailList $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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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\InterCompanyJournalEntry
     */
    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;
    }
}
