<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RevRecTemplateSearchRowBasic StructType
 * @subpackage Structs
 */
class RevRecTemplateSearchRowBasic extends SearchRowBasic
{
    /**
     * The amorMethod
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $amorMethod;
    /**
     * The amorPeriod
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $amorPeriod;
    /**
     * The amorStartOffset
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $amorStartOffset;
    /**
     * The amorTermSrc
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $amorTermSrc;
    /**
     * The amorType
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $amorType;
    /**
     * The contraAccount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $contraAccount;
    /**
     * The deferralAccount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $deferralAccount;
    /**
     * 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 isInactive
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $isInactive;
    /**
     * The name
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $name;
    /**
     * The periodOffset
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $periodOffset;
    /**
     * The targetAccount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $targetAccount;
    /**
     * The useForeignAmounts
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $useForeignAmounts;
    /**
     * Constructor method for RevRecTemplateSearchRowBasic
     * @uses RevRecTemplateSearchRowBasic::setAmorMethod()
     * @uses RevRecTemplateSearchRowBasic::setAmorPeriod()
     * @uses RevRecTemplateSearchRowBasic::setAmorStartOffset()
     * @uses RevRecTemplateSearchRowBasic::setAmorTermSrc()
     * @uses RevRecTemplateSearchRowBasic::setAmorType()
     * @uses RevRecTemplateSearchRowBasic::setContraAccount()
     * @uses RevRecTemplateSearchRowBasic::setDeferralAccount()
     * @uses RevRecTemplateSearchRowBasic::setExternalId()
     * @uses RevRecTemplateSearchRowBasic::setInternalId()
     * @uses RevRecTemplateSearchRowBasic::setIsInactive()
     * @uses RevRecTemplateSearchRowBasic::setName()
     * @uses RevRecTemplateSearchRowBasic::setPeriodOffset()
     * @uses RevRecTemplateSearchRowBasic::setTargetAccount()
     * @uses RevRecTemplateSearchRowBasic::setUseForeignAmounts()
     * @param \StructType\SearchColumnStringField[] $amorMethod
     * @param \StructType\SearchColumnStringField[] $amorPeriod
     * @param \StructType\SearchColumnStringField[] $amorStartOffset
     * @param \StructType\SearchColumnStringField[] $amorTermSrc
     * @param \StructType\SearchColumnStringField[] $amorType
     * @param \StructType\SearchColumnStringField[] $contraAccount
     * @param \StructType\SearchColumnStringField[] $deferralAccount
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnStringField[] $isInactive
     * @param \StructType\SearchColumnStringField[] $name
     * @param \StructType\SearchColumnStringField[] $periodOffset
     * @param \StructType\SearchColumnStringField[] $targetAccount
     * @param \StructType\SearchColumnBooleanField[] $useForeignAmounts
     */
    public function __construct(array $amorMethod = array(), array $amorPeriod = array(), array $amorStartOffset = array(), array $amorTermSrc = array(), array $amorType = array(), array $contraAccount = array(), array $deferralAccount = array(), array $externalId = array(), array $internalId = array(), array $isInactive = array(), array $name = array(), array $periodOffset = array(), array $targetAccount = array(), array $useForeignAmounts = array())
    {
        $this
            ->setAmorMethod($amorMethod)
            ->setAmorPeriod($amorPeriod)
            ->setAmorStartOffset($amorStartOffset)
            ->setAmorTermSrc($amorTermSrc)
            ->setAmorType($amorType)
            ->setContraAccount($contraAccount)
            ->setDeferralAccount($deferralAccount)
            ->setExternalId($externalId)
            ->setInternalId($internalId)
            ->setIsInactive($isInactive)
            ->setName($name)
            ->setPeriodOffset($periodOffset)
            ->setTargetAccount($targetAccount)
            ->setUseForeignAmounts($useForeignAmounts);
    }
    /**
     * Get amorMethod value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAmorMethod()
    {
        return $this->amorMethod;
    }
    /**
     * This method is responsible for validating the values passed to the setAmorMethod method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAmorMethod method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAmorMethodForArrayConstraintsFromSetAmorMethod(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicAmorMethodItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicAmorMethodItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicAmorMethodItem) ? get_class($revRecTemplateSearchRowBasicAmorMethodItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicAmorMethodItem), var_export($revRecTemplateSearchRowBasicAmorMethodItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The amorMethod property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set amorMethod value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $amorMethod
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setAmorMethod(array $amorMethod = array())
    {
        // validation for constraint: array
        if ('' !== ($amorMethodArrayErrorMessage = self::validateAmorMethodForArrayConstraintsFromSetAmorMethod($amorMethod))) {
            throw new \InvalidArgumentException($amorMethodArrayErrorMessage, __LINE__);
        }
        $this->amorMethod = $amorMethod;
        return $this;
    }
    /**
     * Add item to amorMethod value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToAmorMethod(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The amorMethod property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->amorMethod[] = $item;
        return $this;
    }
    /**
     * Get amorPeriod value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAmorPeriod()
    {
        return $this->amorPeriod;
    }
    /**
     * This method is responsible for validating the values passed to the setAmorPeriod method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAmorPeriod method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAmorPeriodForArrayConstraintsFromSetAmorPeriod(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicAmorPeriodItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicAmorPeriodItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicAmorPeriodItem) ? get_class($revRecTemplateSearchRowBasicAmorPeriodItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicAmorPeriodItem), var_export($revRecTemplateSearchRowBasicAmorPeriodItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The amorPeriod property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set amorPeriod value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $amorPeriod
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setAmorPeriod(array $amorPeriod = array())
    {
        // validation for constraint: array
        if ('' !== ($amorPeriodArrayErrorMessage = self::validateAmorPeriodForArrayConstraintsFromSetAmorPeriod($amorPeriod))) {
            throw new \InvalidArgumentException($amorPeriodArrayErrorMessage, __LINE__);
        }
        $this->amorPeriod = $amorPeriod;
        return $this;
    }
    /**
     * Add item to amorPeriod value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToAmorPeriod(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The amorPeriod property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->amorPeriod[] = $item;
        return $this;
    }
    /**
     * Get amorStartOffset value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAmorStartOffset()
    {
        return $this->amorStartOffset;
    }
    /**
     * This method is responsible for validating the values passed to the setAmorStartOffset method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAmorStartOffset method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAmorStartOffsetForArrayConstraintsFromSetAmorStartOffset(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicAmorStartOffsetItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicAmorStartOffsetItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicAmorStartOffsetItem) ? get_class($revRecTemplateSearchRowBasicAmorStartOffsetItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicAmorStartOffsetItem), var_export($revRecTemplateSearchRowBasicAmorStartOffsetItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The amorStartOffset property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set amorStartOffset value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $amorStartOffset
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setAmorStartOffset(array $amorStartOffset = array())
    {
        // validation for constraint: array
        if ('' !== ($amorStartOffsetArrayErrorMessage = self::validateAmorStartOffsetForArrayConstraintsFromSetAmorStartOffset($amorStartOffset))) {
            throw new \InvalidArgumentException($amorStartOffsetArrayErrorMessage, __LINE__);
        }
        $this->amorStartOffset = $amorStartOffset;
        return $this;
    }
    /**
     * Add item to amorStartOffset value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToAmorStartOffset(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The amorStartOffset property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->amorStartOffset[] = $item;
        return $this;
    }
    /**
     * Get amorTermSrc value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAmorTermSrc()
    {
        return $this->amorTermSrc;
    }
    /**
     * This method is responsible for validating the values passed to the setAmorTermSrc method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAmorTermSrc method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAmorTermSrcForArrayConstraintsFromSetAmorTermSrc(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicAmorTermSrcItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicAmorTermSrcItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicAmorTermSrcItem) ? get_class($revRecTemplateSearchRowBasicAmorTermSrcItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicAmorTermSrcItem), var_export($revRecTemplateSearchRowBasicAmorTermSrcItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The amorTermSrc property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set amorTermSrc value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $amorTermSrc
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setAmorTermSrc(array $amorTermSrc = array())
    {
        // validation for constraint: array
        if ('' !== ($amorTermSrcArrayErrorMessage = self::validateAmorTermSrcForArrayConstraintsFromSetAmorTermSrc($amorTermSrc))) {
            throw new \InvalidArgumentException($amorTermSrcArrayErrorMessage, __LINE__);
        }
        $this->amorTermSrc = $amorTermSrc;
        return $this;
    }
    /**
     * Add item to amorTermSrc value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToAmorTermSrc(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The amorTermSrc property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->amorTermSrc[] = $item;
        return $this;
    }
    /**
     * Get amorType value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAmorType()
    {
        return $this->amorType;
    }
    /**
     * This method is responsible for validating the values passed to the setAmorType method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAmorType method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAmorTypeForArrayConstraintsFromSetAmorType(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicAmorTypeItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicAmorTypeItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicAmorTypeItem) ? get_class($revRecTemplateSearchRowBasicAmorTypeItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicAmorTypeItem), var_export($revRecTemplateSearchRowBasicAmorTypeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The amorType property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set amorType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $amorType
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setAmorType(array $amorType = array())
    {
        // validation for constraint: array
        if ('' !== ($amorTypeArrayErrorMessage = self::validateAmorTypeForArrayConstraintsFromSetAmorType($amorType))) {
            throw new \InvalidArgumentException($amorTypeArrayErrorMessage, __LINE__);
        }
        $this->amorType = $amorType;
        return $this;
    }
    /**
     * Add item to amorType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToAmorType(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The amorType property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->amorType[] = $item;
        return $this;
    }
    /**
     * Get contraAccount value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getContraAccount()
    {
        return $this->contraAccount;
    }
    /**
     * This method is responsible for validating the values passed to the setContraAccount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setContraAccount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateContraAccountForArrayConstraintsFromSetContraAccount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicContraAccountItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicContraAccountItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicContraAccountItem) ? get_class($revRecTemplateSearchRowBasicContraAccountItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicContraAccountItem), var_export($revRecTemplateSearchRowBasicContraAccountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The contraAccount property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set contraAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $contraAccount
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setContraAccount(array $contraAccount = array())
    {
        // validation for constraint: array
        if ('' !== ($contraAccountArrayErrorMessage = self::validateContraAccountForArrayConstraintsFromSetContraAccount($contraAccount))) {
            throw new \InvalidArgumentException($contraAccountArrayErrorMessage, __LINE__);
        }
        $this->contraAccount = $contraAccount;
        return $this;
    }
    /**
     * Add item to contraAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToContraAccount(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The contraAccount property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->contraAccount[] = $item;
        return $this;
    }
    /**
     * Get deferralAccount value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getDeferralAccount()
    {
        return $this->deferralAccount;
    }
    /**
     * This method is responsible for validating the values passed to the setDeferralAccount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDeferralAccount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDeferralAccountForArrayConstraintsFromSetDeferralAccount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicDeferralAccountItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicDeferralAccountItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicDeferralAccountItem) ? get_class($revRecTemplateSearchRowBasicDeferralAccountItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicDeferralAccountItem), var_export($revRecTemplateSearchRowBasicDeferralAccountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The deferralAccount property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set deferralAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $deferralAccount
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setDeferralAccount(array $deferralAccount = array())
    {
        // validation for constraint: array
        if ('' !== ($deferralAccountArrayErrorMessage = self::validateDeferralAccountForArrayConstraintsFromSetDeferralAccount($deferralAccount))) {
            throw new \InvalidArgumentException($deferralAccountArrayErrorMessage, __LINE__);
        }
        $this->deferralAccount = $deferralAccount;
        return $this;
    }
    /**
     * Add item to deferralAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToDeferralAccount(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The deferralAccount property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->deferralAccount[] = $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 $revRecTemplateSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicExternalIdItem) ? get_class($revRecTemplateSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicExternalIdItem), var_export($revRecTemplateSearchRowBasicExternalIdItem, 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\RevRecTemplateSearchRowBasic
     */
    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\RevRecTemplateSearchRowBasic
     */
    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 $revRecTemplateSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicInternalIdItem) ? get_class($revRecTemplateSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicInternalIdItem), var_export($revRecTemplateSearchRowBasicInternalIdItem, 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\RevRecTemplateSearchRowBasic
     */
    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\RevRecTemplateSearchRowBasic
     */
    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 isInactive value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getIsInactive()
    {
        return $this->isInactive;
    }
    /**
     * This method is responsible for validating the values passed to the setIsInactive method
     * This method is willingly generated in order to preserve the one-line inline validation within the setIsInactive method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateIsInactiveForArrayConstraintsFromSetIsInactive(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicIsInactiveItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicIsInactiveItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicIsInactiveItem) ? get_class($revRecTemplateSearchRowBasicIsInactiveItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicIsInactiveItem), var_export($revRecTemplateSearchRowBasicIsInactiveItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The isInactive property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set isInactive value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $isInactive
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setIsInactive(array $isInactive = array())
    {
        // validation for constraint: array
        if ('' !== ($isInactiveArrayErrorMessage = self::validateIsInactiveForArrayConstraintsFromSetIsInactive($isInactive))) {
            throw new \InvalidArgumentException($isInactiveArrayErrorMessage, __LINE__);
        }
        $this->isInactive = $isInactive;
        return $this;
    }
    /**
     * Add item to isInactive value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToIsInactive(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The isInactive property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->isInactive[] = $item;
        return $this;
    }
    /**
     * Get name value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * This method is responsible for validating the values passed to the setName method
     * This method is willingly generated in order to preserve the one-line inline validation within the setName method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateNameForArrayConstraintsFromSetName(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicNameItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicNameItem) ? get_class($revRecTemplateSearchRowBasicNameItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicNameItem), var_export($revRecTemplateSearchRowBasicNameItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The name property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set name value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $name
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setName(array $name = array())
    {
        // validation for constraint: array
        if ('' !== ($nameArrayErrorMessage = self::validateNameForArrayConstraintsFromSetName($name))) {
            throw new \InvalidArgumentException($nameArrayErrorMessage, __LINE__);
        }
        $this->name = $name;
        return $this;
    }
    /**
     * Add item to name value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToName(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The name property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->name[] = $item;
        return $this;
    }
    /**
     * Get periodOffset value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getPeriodOffset()
    {
        return $this->periodOffset;
    }
    /**
     * This method is responsible for validating the values passed to the setPeriodOffset method
     * This method is willingly generated in order to preserve the one-line inline validation within the setPeriodOffset method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validatePeriodOffsetForArrayConstraintsFromSetPeriodOffset(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicPeriodOffsetItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicPeriodOffsetItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicPeriodOffsetItem) ? get_class($revRecTemplateSearchRowBasicPeriodOffsetItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicPeriodOffsetItem), var_export($revRecTemplateSearchRowBasicPeriodOffsetItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The periodOffset property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set periodOffset value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $periodOffset
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setPeriodOffset(array $periodOffset = array())
    {
        // validation for constraint: array
        if ('' !== ($periodOffsetArrayErrorMessage = self::validatePeriodOffsetForArrayConstraintsFromSetPeriodOffset($periodOffset))) {
            throw new \InvalidArgumentException($periodOffsetArrayErrorMessage, __LINE__);
        }
        $this->periodOffset = $periodOffset;
        return $this;
    }
    /**
     * Add item to periodOffset value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToPeriodOffset(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The periodOffset property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->periodOffset[] = $item;
        return $this;
    }
    /**
     * Get targetAccount value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getTargetAccount()
    {
        return $this->targetAccount;
    }
    /**
     * This method is responsible for validating the values passed to the setTargetAccount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setTargetAccount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateTargetAccountForArrayConstraintsFromSetTargetAccount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicTargetAccountItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicTargetAccountItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicTargetAccountItem) ? get_class($revRecTemplateSearchRowBasicTargetAccountItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicTargetAccountItem), var_export($revRecTemplateSearchRowBasicTargetAccountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The targetAccount property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set targetAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $targetAccount
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setTargetAccount(array $targetAccount = array())
    {
        // validation for constraint: array
        if ('' !== ($targetAccountArrayErrorMessage = self::validateTargetAccountForArrayConstraintsFromSetTargetAccount($targetAccount))) {
            throw new \InvalidArgumentException($targetAccountArrayErrorMessage, __LINE__);
        }
        $this->targetAccount = $targetAccount;
        return $this;
    }
    /**
     * Add item to targetAccount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToTargetAccount(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The targetAccount property can only contain items of type \StructType\SearchColumnStringField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->targetAccount[] = $item;
        return $this;
    }
    /**
     * Get useForeignAmounts value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getUseForeignAmounts()
    {
        return $this->useForeignAmounts;
    }
    /**
     * This method is responsible for validating the values passed to the setUseForeignAmounts method
     * This method is willingly generated in order to preserve the one-line inline validation within the setUseForeignAmounts method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateUseForeignAmountsForArrayConstraintsFromSetUseForeignAmounts(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $revRecTemplateSearchRowBasicUseForeignAmountsItem) {
            // validation for constraint: itemType
            if (!$revRecTemplateSearchRowBasicUseForeignAmountsItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($revRecTemplateSearchRowBasicUseForeignAmountsItem) ? get_class($revRecTemplateSearchRowBasicUseForeignAmountsItem) : sprintf('%s(%s)', gettype($revRecTemplateSearchRowBasicUseForeignAmountsItem), var_export($revRecTemplateSearchRowBasicUseForeignAmountsItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The useForeignAmounts property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set useForeignAmounts value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $useForeignAmounts
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function setUseForeignAmounts(array $useForeignAmounts = array())
    {
        // validation for constraint: array
        if ('' !== ($useForeignAmountsArrayErrorMessage = self::validateUseForeignAmountsForArrayConstraintsFromSetUseForeignAmounts($useForeignAmounts))) {
            throw new \InvalidArgumentException($useForeignAmountsArrayErrorMessage, __LINE__);
        }
        $this->useForeignAmounts = $useForeignAmounts;
        return $this;
    }
    /**
     * Add item to useForeignAmounts value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\RevRecTemplateSearchRowBasic
     */
    public function addToUseForeignAmounts(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The useForeignAmounts property can only contain items of type \StructType\SearchColumnBooleanField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->useForeignAmounts[] = $item;
        return $this;
    }
}
