<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ItemAccountMappingSearchRowBasic StructType
 * @subpackage Structs
 */
class ItemAccountMappingSearchRowBasic extends SearchRowBasic
{
    /**
     * The accountingBook
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $accountingBook;
    /**
     * The class
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $class;
    /**
     * The customDimension
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectCustomField[]
     */
    public $customDimension;
    /**
     * The department
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $department;
    /**
     * The destinationAccount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $destinationAccount;
    /**
     * The effectiveDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $effectiveDate;
    /**
     * The endDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $endDate;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The internalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $internalId;
    /**
     * The itemAccount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnEnumSelectField[]
     */
    public $itemAccount;
    /**
     * The location
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $location;
    /**
     * The sourceAccount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $sourceAccount;
    /**
     * The subsidiary
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $subsidiary;
    /**
     * The customFieldList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SearchColumnCustomFieldList
     */
    public $customFieldList;
    /**
     * Constructor method for ItemAccountMappingSearchRowBasic
     * @uses ItemAccountMappingSearchRowBasic::setAccountingBook()
     * @uses ItemAccountMappingSearchRowBasic::setClass()
     * @uses ItemAccountMappingSearchRowBasic::setCustomDimension()
     * @uses ItemAccountMappingSearchRowBasic::setDepartment()
     * @uses ItemAccountMappingSearchRowBasic::setDestinationAccount()
     * @uses ItemAccountMappingSearchRowBasic::setEffectiveDate()
     * @uses ItemAccountMappingSearchRowBasic::setEndDate()
     * @uses ItemAccountMappingSearchRowBasic::setExternalId()
     * @uses ItemAccountMappingSearchRowBasic::setInternalId()
     * @uses ItemAccountMappingSearchRowBasic::setItemAccount()
     * @uses ItemAccountMappingSearchRowBasic::setLocation()
     * @uses ItemAccountMappingSearchRowBasic::setSourceAccount()
     * @uses ItemAccountMappingSearchRowBasic::setSubsidiary()
     * @uses ItemAccountMappingSearchRowBasic::setCustomFieldList()
     * @param \StructType\SearchColumnSelectField[] $accountingBook
     * @param \StructType\SearchColumnSelectField[] $class
     * @param \StructType\SearchColumnSelectCustomField[] $customDimension
     * @param \StructType\SearchColumnSelectField[] $department
     * @param \StructType\SearchColumnSelectField[] $destinationAccount
     * @param \StructType\SearchColumnDateField[] $effectiveDate
     * @param \StructType\SearchColumnDateField[] $endDate
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnEnumSelectField[] $itemAccount
     * @param \StructType\SearchColumnSelectField[] $location
     * @param \StructType\SearchColumnSelectField[] $sourceAccount
     * @param \StructType\SearchColumnSelectField[] $subsidiary
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     */
    public function __construct(array $accountingBook = array(), array $class = array(), array $customDimension = array(), array $department = array(), array $destinationAccount = array(), array $effectiveDate = array(), array $endDate = array(), array $externalId = array(), array $internalId = array(), array $itemAccount = array(), array $location = array(), array $sourceAccount = array(), array $subsidiary = array(), \StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this
            ->setAccountingBook($accountingBook)
            ->setClass($class)
            ->setCustomDimension($customDimension)
            ->setDepartment($department)
            ->setDestinationAccount($destinationAccount)
            ->setEffectiveDate($effectiveDate)
            ->setEndDate($endDate)
            ->setExternalId($externalId)
            ->setInternalId($internalId)
            ->setItemAccount($itemAccount)
            ->setLocation($location)
            ->setSourceAccount($sourceAccount)
            ->setSubsidiary($subsidiary)
            ->setCustomFieldList($customFieldList);
    }
    /**
     * Get accountingBook value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getAccountingBook()
    {
        return $this->accountingBook;
    }
    /**
     * This method is responsible for validating the values passed to the setAccountingBook method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAccountingBook method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAccountingBookForArrayConstraintsFromSetAccountingBook(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicAccountingBookItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicAccountingBookItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicAccountingBookItem) ? get_class($itemAccountMappingSearchRowBasicAccountingBookItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicAccountingBookItem), var_export($itemAccountMappingSearchRowBasicAccountingBookItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The accountingBook property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set accountingBook value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $accountingBook
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setAccountingBook(array $accountingBook = array())
    {
        // validation for constraint: array
        if ('' !== ($accountingBookArrayErrorMessage = self::validateAccountingBookForArrayConstraintsFromSetAccountingBook($accountingBook))) {
            throw new \InvalidArgumentException($accountingBookArrayErrorMessage, __LINE__);
        }
        $this->accountingBook = $accountingBook;
        return $this;
    }
    /**
     * Add item to accountingBook value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToAccountingBook(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The accountingBook property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->accountingBook[] = $item;
        return $this;
    }
    /**
     * Get class value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getClass()
    {
        return $this->class;
    }
    /**
     * This method is responsible for validating the values passed to the setClass method
     * This method is willingly generated in order to preserve the one-line inline validation within the setClass method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateClassForArrayConstraintsFromSetClass(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicClassItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicClassItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicClassItem) ? get_class($itemAccountMappingSearchRowBasicClassItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicClassItem), var_export($itemAccountMappingSearchRowBasicClassItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The class property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set class value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $class
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setClass(array $class = array())
    {
        // validation for constraint: array
        if ('' !== ($classArrayErrorMessage = self::validateClassForArrayConstraintsFromSetClass($class))) {
            throw new \InvalidArgumentException($classArrayErrorMessage, __LINE__);
        }
        $this->class = $class;
        return $this;
    }
    /**
     * Add item to class value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToClass(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The class property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->class[] = $item;
        return $this;
    }
    /**
     * Get customDimension value
     * @return \StructType\SearchColumnSelectCustomField[]|null
     */
    public function getCustomDimension()
    {
        return $this->customDimension;
    }
    /**
     * This method is responsible for validating the values passed to the setCustomDimension method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCustomDimension method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateCustomDimensionForArrayConstraintsFromSetCustomDimension(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicCustomDimensionItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicCustomDimensionItem instanceof \StructType\SearchColumnSelectCustomField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicCustomDimensionItem) ? get_class($itemAccountMappingSearchRowBasicCustomDimensionItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicCustomDimensionItem), var_export($itemAccountMappingSearchRowBasicCustomDimensionItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The customDimension property can only contain items of type \StructType\SearchColumnSelectCustomField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set customDimension value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectCustomField[] $customDimension
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setCustomDimension(array $customDimension = array())
    {
        // validation for constraint: array
        if ('' !== ($customDimensionArrayErrorMessage = self::validateCustomDimensionForArrayConstraintsFromSetCustomDimension($customDimension))) {
            throw new \InvalidArgumentException($customDimensionArrayErrorMessage, __LINE__);
        }
        $this->customDimension = $customDimension;
        return $this;
    }
    /**
     * Add item to customDimension value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectCustomField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToCustomDimension(\StructType\SearchColumnSelectCustomField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectCustomField) {
            throw new \InvalidArgumentException(sprintf('The customDimension property can only contain items of type \StructType\SearchColumnSelectCustomField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->customDimension[] = $item;
        return $this;
    }
    /**
     * Get department value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getDepartment()
    {
        return $this->department;
    }
    /**
     * This method is responsible for validating the values passed to the setDepartment method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDepartment method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDepartmentForArrayConstraintsFromSetDepartment(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicDepartmentItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicDepartmentItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicDepartmentItem) ? get_class($itemAccountMappingSearchRowBasicDepartmentItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicDepartmentItem), var_export($itemAccountMappingSearchRowBasicDepartmentItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The department property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set department value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $department
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setDepartment(array $department = array())
    {
        // validation for constraint: array
        if ('' !== ($departmentArrayErrorMessage = self::validateDepartmentForArrayConstraintsFromSetDepartment($department))) {
            throw new \InvalidArgumentException($departmentArrayErrorMessage, __LINE__);
        }
        $this->department = $department;
        return $this;
    }
    /**
     * Add item to department value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToDepartment(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The department property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->department[] = $item;
        return $this;
    }
    /**
     * Get destinationAccount value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getDestinationAccount()
    {
        return $this->destinationAccount;
    }
    /**
     * This method is responsible for validating the values passed to the setDestinationAccount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDestinationAccount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDestinationAccountForArrayConstraintsFromSetDestinationAccount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicDestinationAccountItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicDestinationAccountItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicDestinationAccountItem) ? get_class($itemAccountMappingSearchRowBasicDestinationAccountItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicDestinationAccountItem), var_export($itemAccountMappingSearchRowBasicDestinationAccountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The destinationAccount property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set destinationAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $destinationAccount
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setDestinationAccount(array $destinationAccount = array())
    {
        // validation for constraint: array
        if ('' !== ($destinationAccountArrayErrorMessage = self::validateDestinationAccountForArrayConstraintsFromSetDestinationAccount($destinationAccount))) {
            throw new \InvalidArgumentException($destinationAccountArrayErrorMessage, __LINE__);
        }
        $this->destinationAccount = $destinationAccount;
        return $this;
    }
    /**
     * Add item to destinationAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToDestinationAccount(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The destinationAccount property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->destinationAccount[] = $item;
        return $this;
    }
    /**
     * Get effectiveDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getEffectiveDate()
    {
        return $this->effectiveDate;
    }
    /**
     * This method is responsible for validating the values passed to the setEffectiveDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setEffectiveDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateEffectiveDateForArrayConstraintsFromSetEffectiveDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicEffectiveDateItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicEffectiveDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicEffectiveDateItem) ? get_class($itemAccountMappingSearchRowBasicEffectiveDateItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicEffectiveDateItem), var_export($itemAccountMappingSearchRowBasicEffectiveDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The effectiveDate property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set effectiveDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $effectiveDate
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setEffectiveDate(array $effectiveDate = array())
    {
        // validation for constraint: array
        if ('' !== ($effectiveDateArrayErrorMessage = self::validateEffectiveDateForArrayConstraintsFromSetEffectiveDate($effectiveDate))) {
            throw new \InvalidArgumentException($effectiveDateArrayErrorMessage, __LINE__);
        }
        $this->effectiveDate = $effectiveDate;
        return $this;
    }
    /**
     * Add item to effectiveDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToEffectiveDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The effectiveDate property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->effectiveDate[] = $item;
        return $this;
    }
    /**
     * Get endDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getEndDate()
    {
        return $this->endDate;
    }
    /**
     * This method is responsible for validating the values passed to the setEndDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setEndDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateEndDateForArrayConstraintsFromSetEndDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicEndDateItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicEndDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicEndDateItem) ? get_class($itemAccountMappingSearchRowBasicEndDateItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicEndDateItem), var_export($itemAccountMappingSearchRowBasicEndDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The endDate property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set endDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $endDate
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setEndDate(array $endDate = array())
    {
        // validation for constraint: array
        if ('' !== ($endDateArrayErrorMessage = self::validateEndDateForArrayConstraintsFromSetEndDate($endDate))) {
            throw new \InvalidArgumentException($endDateArrayErrorMessage, __LINE__);
        }
        $this->endDate = $endDate;
        return $this;
    }
    /**
     * Add item to endDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToEndDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The endDate property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->endDate[] = $item;
        return $this;
    }
    /**
     * Get externalId value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getExternalId()
    {
        return $this->externalId;
    }
    /**
     * This method is responsible for validating the values passed to the setExternalId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setExternalId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateExternalIdForArrayConstraintsFromSetExternalId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicExternalIdItem) ? get_class($itemAccountMappingSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicExternalIdItem), var_export($itemAccountMappingSearchRowBasicExternalIdItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The externalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set externalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setExternalId(array $externalId = array())
    {
        // validation for constraint: array
        if ('' !== ($externalIdArrayErrorMessage = self::validateExternalIdForArrayConstraintsFromSetExternalId($externalId))) {
            throw new \InvalidArgumentException($externalIdArrayErrorMessage, __LINE__);
        }
        $this->externalId = $externalId;
        return $this;
    }
    /**
     * Add item to externalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToExternalId(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The externalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->externalId[] = $item;
        return $this;
    }
    /**
     * Get internalId value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getInternalId()
    {
        return $this->internalId;
    }
    /**
     * This method is responsible for validating the values passed to the setInternalId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setInternalId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateInternalIdForArrayConstraintsFromSetInternalId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicInternalIdItem) ? get_class($itemAccountMappingSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicInternalIdItem), var_export($itemAccountMappingSearchRowBasicInternalIdItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The internalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set internalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setInternalId(array $internalId = array())
    {
        // validation for constraint: array
        if ('' !== ($internalIdArrayErrorMessage = self::validateInternalIdForArrayConstraintsFromSetInternalId($internalId))) {
            throw new \InvalidArgumentException($internalIdArrayErrorMessage, __LINE__);
        }
        $this->internalId = $internalId;
        return $this;
    }
    /**
     * Add item to internalId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToInternalId(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The internalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->internalId[] = $item;
        return $this;
    }
    /**
     * Get itemAccount value
     * @return \StructType\SearchColumnEnumSelectField[]|null
     */
    public function getItemAccount()
    {
        return $this->itemAccount;
    }
    /**
     * This method is responsible for validating the values passed to the setItemAccount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setItemAccount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateItemAccountForArrayConstraintsFromSetItemAccount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicItemAccountItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicItemAccountItem instanceof \StructType\SearchColumnEnumSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicItemAccountItem) ? get_class($itemAccountMappingSearchRowBasicItemAccountItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicItemAccountItem), var_export($itemAccountMappingSearchRowBasicItemAccountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The itemAccount property can only contain items of type \StructType\SearchColumnEnumSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set itemAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField[] $itemAccount
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setItemAccount(array $itemAccount = array())
    {
        // validation for constraint: array
        if ('' !== ($itemAccountArrayErrorMessage = self::validateItemAccountForArrayConstraintsFromSetItemAccount($itemAccount))) {
            throw new \InvalidArgumentException($itemAccountArrayErrorMessage, __LINE__);
        }
        $this->itemAccount = $itemAccount;
        return $this;
    }
    /**
     * Add item to itemAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToItemAccount(\StructType\SearchColumnEnumSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnEnumSelectField) {
            throw new \InvalidArgumentException(sprintf('The itemAccount property can only contain items of type \StructType\SearchColumnEnumSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->itemAccount[] = $item;
        return $this;
    }
    /**
     * Get location value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getLocation()
    {
        return $this->location;
    }
    /**
     * This method is responsible for validating the values passed to the setLocation method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLocation method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLocationForArrayConstraintsFromSetLocation(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicLocationItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicLocationItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicLocationItem) ? get_class($itemAccountMappingSearchRowBasicLocationItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicLocationItem), var_export($itemAccountMappingSearchRowBasicLocationItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The location property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set location value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $location
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setLocation(array $location = array())
    {
        // validation for constraint: array
        if ('' !== ($locationArrayErrorMessage = self::validateLocationForArrayConstraintsFromSetLocation($location))) {
            throw new \InvalidArgumentException($locationArrayErrorMessage, __LINE__);
        }
        $this->location = $location;
        return $this;
    }
    /**
     * Add item to location value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToLocation(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The location property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->location[] = $item;
        return $this;
    }
    /**
     * Get sourceAccount value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getSourceAccount()
    {
        return $this->sourceAccount;
    }
    /**
     * This method is responsible for validating the values passed to the setSourceAccount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setSourceAccount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateSourceAccountForArrayConstraintsFromSetSourceAccount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicSourceAccountItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicSourceAccountItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicSourceAccountItem) ? get_class($itemAccountMappingSearchRowBasicSourceAccountItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicSourceAccountItem), var_export($itemAccountMappingSearchRowBasicSourceAccountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The sourceAccount property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set sourceAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $sourceAccount
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setSourceAccount(array $sourceAccount = array())
    {
        // validation for constraint: array
        if ('' !== ($sourceAccountArrayErrorMessage = self::validateSourceAccountForArrayConstraintsFromSetSourceAccount($sourceAccount))) {
            throw new \InvalidArgumentException($sourceAccountArrayErrorMessage, __LINE__);
        }
        $this->sourceAccount = $sourceAccount;
        return $this;
    }
    /**
     * Add item to sourceAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToSourceAccount(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The sourceAccount property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->sourceAccount[] = $item;
        return $this;
    }
    /**
     * Get subsidiary value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getSubsidiary()
    {
        return $this->subsidiary;
    }
    /**
     * This method is responsible for validating the values passed to the setSubsidiary method
     * This method is willingly generated in order to preserve the one-line inline validation within the setSubsidiary method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateSubsidiaryForArrayConstraintsFromSetSubsidiary(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $itemAccountMappingSearchRowBasicSubsidiaryItem) {
            // validation for constraint: itemType
            if (!$itemAccountMappingSearchRowBasicSubsidiaryItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($itemAccountMappingSearchRowBasicSubsidiaryItem) ? get_class($itemAccountMappingSearchRowBasicSubsidiaryItem) : sprintf('%s(%s)', gettype($itemAccountMappingSearchRowBasicSubsidiaryItem), var_export($itemAccountMappingSearchRowBasicSubsidiaryItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The subsidiary property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set subsidiary value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $subsidiary
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setSubsidiary(array $subsidiary = array())
    {
        // validation for constraint: array
        if ('' !== ($subsidiaryArrayErrorMessage = self::validateSubsidiaryForArrayConstraintsFromSetSubsidiary($subsidiary))) {
            throw new \InvalidArgumentException($subsidiaryArrayErrorMessage, __LINE__);
        }
        $this->subsidiary = $subsidiary;
        return $this;
    }
    /**
     * Add item to subsidiary value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function addToSubsidiary(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The subsidiary property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->subsidiary[] = $item;
        return $this;
    }
    /**
     * Get customFieldList value
     * @return \StructType\SearchColumnCustomFieldList|null
     */
    public function getCustomFieldList()
    {
        return $this->customFieldList;
    }
    /**
     * Set customFieldList value
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     * @return \StructType\ItemAccountMappingSearchRowBasic
     */
    public function setCustomFieldList(\StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this->customFieldList = $customFieldList;
        return $this;
    }
}
