<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GlobalAccountMappingSearchRowBasic StructType
 * @subpackage Structs
 */
class GlobalAccountMappingSearchRowBasic 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 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 GlobalAccountMappingSearchRowBasic
     * @uses GlobalAccountMappingSearchRowBasic::setAccountingBook()
     * @uses GlobalAccountMappingSearchRowBasic::setClass()
     * @uses GlobalAccountMappingSearchRowBasic::setCustomDimension()
     * @uses GlobalAccountMappingSearchRowBasic::setDepartment()
     * @uses GlobalAccountMappingSearchRowBasic::setDestinationAccount()
     * @uses GlobalAccountMappingSearchRowBasic::setEffectiveDate()
     * @uses GlobalAccountMappingSearchRowBasic::setEndDate()
     * @uses GlobalAccountMappingSearchRowBasic::setExternalId()
     * @uses GlobalAccountMappingSearchRowBasic::setInternalId()
     * @uses GlobalAccountMappingSearchRowBasic::setLocation()
     * @uses GlobalAccountMappingSearchRowBasic::setSourceAccount()
     * @uses GlobalAccountMappingSearchRowBasic::setSubsidiary()
     * @uses GlobalAccountMappingSearchRowBasic::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\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 $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)
            ->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 $globalAccountMappingSearchRowBasicAccountingBookItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicAccountingBookItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicAccountingBookItem) ? get_class($globalAccountMappingSearchRowBasicAccountingBookItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicAccountingBookItem), var_export($globalAccountMappingSearchRowBasicAccountingBookItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicClassItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicClassItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicClassItem) ? get_class($globalAccountMappingSearchRowBasicClassItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicClassItem), var_export($globalAccountMappingSearchRowBasicClassItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicCustomDimensionItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicCustomDimensionItem instanceof \StructType\SearchColumnSelectCustomField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicCustomDimensionItem) ? get_class($globalAccountMappingSearchRowBasicCustomDimensionItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicCustomDimensionItem), var_export($globalAccountMappingSearchRowBasicCustomDimensionItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicDepartmentItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicDepartmentItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicDepartmentItem) ? get_class($globalAccountMappingSearchRowBasicDepartmentItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicDepartmentItem), var_export($globalAccountMappingSearchRowBasicDepartmentItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicDestinationAccountItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicDestinationAccountItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicDestinationAccountItem) ? get_class($globalAccountMappingSearchRowBasicDestinationAccountItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicDestinationAccountItem), var_export($globalAccountMappingSearchRowBasicDestinationAccountItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicEffectiveDateItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicEffectiveDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicEffectiveDateItem) ? get_class($globalAccountMappingSearchRowBasicEffectiveDateItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicEffectiveDateItem), var_export($globalAccountMappingSearchRowBasicEffectiveDateItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicEndDateItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicEndDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicEndDateItem) ? get_class($globalAccountMappingSearchRowBasicEndDateItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicEndDateItem), var_export($globalAccountMappingSearchRowBasicEndDateItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicExternalIdItem) ? get_class($globalAccountMappingSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicExternalIdItem), var_export($globalAccountMappingSearchRowBasicExternalIdItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicInternalIdItem) ? get_class($globalAccountMappingSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicInternalIdItem), var_export($globalAccountMappingSearchRowBasicInternalIdItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 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 $globalAccountMappingSearchRowBasicLocationItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicLocationItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicLocationItem) ? get_class($globalAccountMappingSearchRowBasicLocationItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicLocationItem), var_export($globalAccountMappingSearchRowBasicLocationItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicSourceAccountItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicSourceAccountItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicSourceAccountItem) ? get_class($globalAccountMappingSearchRowBasicSourceAccountItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicSourceAccountItem), var_export($globalAccountMappingSearchRowBasicSourceAccountItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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 $globalAccountMappingSearchRowBasicSubsidiaryItem) {
            // validation for constraint: itemType
            if (!$globalAccountMappingSearchRowBasicSubsidiaryItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($globalAccountMappingSearchRowBasicSubsidiaryItem) ? get_class($globalAccountMappingSearchRowBasicSubsidiaryItem) : sprintf('%s(%s)', gettype($globalAccountMappingSearchRowBasicSubsidiaryItem), var_export($globalAccountMappingSearchRowBasicSubsidiaryItem, 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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    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\GlobalAccountMappingSearchRowBasic
     */
    public function setCustomFieldList(\StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this->customFieldList = $customFieldList;
        return $this;
    }
}
