<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TermSearchRowBasic StructType
 * @subpackage Structs
 */
class TermSearchRowBasic extends SearchRowBasic
{
    /**
     * The dateDriven
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $dateDriven;
    /**
     * The dayDiscountExpires
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $dayDiscountExpires;
    /**
     * The dayOfMonthNetDue
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $dayOfMonthNetDue;
    /**
     * The daysUntilExpiry
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $daysUntilExpiry;
    /**
     * The daysUntilNetDue
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $daysUntilNetDue;
    /**
     * The discountPercent
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDoubleField[]
     */
    public $discountPercent;
    /**
     * The discountPercentDateDriven
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDoubleField[]
     */
    public $discountPercentDateDriven;
    /**
     * The dueNextMonthIfWithinDays
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $dueNextMonthIfWithinDays;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The installment
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $installment;
    /**
     * 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\SearchColumnBooleanField[]
     */
    public $isInactive;
    /**
     * The name
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $name;
    /**
     * The preferred
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $preferred;
    /**
     * The recurrenceCount
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $recurrenceCount;
    /**
     * The recurrenceFrequency
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $recurrenceFrequency;
    /**
     * The repeatEvery
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $repeatEvery;
    /**
     * The splitEvenly
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $splitEvenly;
    /**
     * Constructor method for TermSearchRowBasic
     * @uses TermSearchRowBasic::setDateDriven()
     * @uses TermSearchRowBasic::setDayDiscountExpires()
     * @uses TermSearchRowBasic::setDayOfMonthNetDue()
     * @uses TermSearchRowBasic::setDaysUntilExpiry()
     * @uses TermSearchRowBasic::setDaysUntilNetDue()
     * @uses TermSearchRowBasic::setDiscountPercent()
     * @uses TermSearchRowBasic::setDiscountPercentDateDriven()
     * @uses TermSearchRowBasic::setDueNextMonthIfWithinDays()
     * @uses TermSearchRowBasic::setExternalId()
     * @uses TermSearchRowBasic::setInstallment()
     * @uses TermSearchRowBasic::setInternalId()
     * @uses TermSearchRowBasic::setIsInactive()
     * @uses TermSearchRowBasic::setName()
     * @uses TermSearchRowBasic::setPreferred()
     * @uses TermSearchRowBasic::setRecurrenceCount()
     * @uses TermSearchRowBasic::setRecurrenceFrequency()
     * @uses TermSearchRowBasic::setRepeatEvery()
     * @uses TermSearchRowBasic::setSplitEvenly()
     * @param \StructType\SearchColumnBooleanField[] $dateDriven
     * @param \StructType\SearchColumnLongField[] $dayDiscountExpires
     * @param \StructType\SearchColumnLongField[] $dayOfMonthNetDue
     * @param \StructType\SearchColumnLongField[] $daysUntilExpiry
     * @param \StructType\SearchColumnLongField[] $daysUntilNetDue
     * @param \StructType\SearchColumnDoubleField[] $discountPercent
     * @param \StructType\SearchColumnDoubleField[] $discountPercentDateDriven
     * @param \StructType\SearchColumnLongField[] $dueNextMonthIfWithinDays
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnBooleanField[] $installment
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnBooleanField[] $isInactive
     * @param \StructType\SearchColumnStringField[] $name
     * @param \StructType\SearchColumnBooleanField[] $preferred
     * @param \StructType\SearchColumnLongField[] $recurrenceCount
     * @param \StructType\SearchColumnStringField[] $recurrenceFrequency
     * @param \StructType\SearchColumnLongField[] $repeatEvery
     * @param \StructType\SearchColumnBooleanField[] $splitEvenly
     */
    public function __construct(array $dateDriven = array(), array $dayDiscountExpires = array(), array $dayOfMonthNetDue = array(), array $daysUntilExpiry = array(), array $daysUntilNetDue = array(), array $discountPercent = array(), array $discountPercentDateDriven = array(), array $dueNextMonthIfWithinDays = array(), array $externalId = array(), array $installment = array(), array $internalId = array(), array $isInactive = array(), array $name = array(), array $preferred = array(), array $recurrenceCount = array(), array $recurrenceFrequency = array(), array $repeatEvery = array(), array $splitEvenly = array())
    {
        $this
            ->setDateDriven($dateDriven)
            ->setDayDiscountExpires($dayDiscountExpires)
            ->setDayOfMonthNetDue($dayOfMonthNetDue)
            ->setDaysUntilExpiry($daysUntilExpiry)
            ->setDaysUntilNetDue($daysUntilNetDue)
            ->setDiscountPercent($discountPercent)
            ->setDiscountPercentDateDriven($discountPercentDateDriven)
            ->setDueNextMonthIfWithinDays($dueNextMonthIfWithinDays)
            ->setExternalId($externalId)
            ->setInstallment($installment)
            ->setInternalId($internalId)
            ->setIsInactive($isInactive)
            ->setName($name)
            ->setPreferred($preferred)
            ->setRecurrenceCount($recurrenceCount)
            ->setRecurrenceFrequency($recurrenceFrequency)
            ->setRepeatEvery($repeatEvery)
            ->setSplitEvenly($splitEvenly);
    }
    /**
     * Get dateDriven value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getDateDriven()
    {
        return $this->dateDriven;
    }
    /**
     * This method is responsible for validating the values passed to the setDateDriven method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDateDriven method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDateDrivenForArrayConstraintsFromSetDateDriven(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDateDrivenItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDateDrivenItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($termSearchRowBasicDateDrivenItem) ? get_class($termSearchRowBasicDateDrivenItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDateDrivenItem), var_export($termSearchRowBasicDateDrivenItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The dateDriven 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 dateDriven value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $dateDriven
     * @return \StructType\TermSearchRowBasic
     */
    public function setDateDriven(array $dateDriven = array())
    {
        // validation for constraint: array
        if ('' !== ($dateDrivenArrayErrorMessage = self::validateDateDrivenForArrayConstraintsFromSetDateDriven($dateDriven))) {
            throw new \InvalidArgumentException($dateDrivenArrayErrorMessage, __LINE__);
        }
        $this->dateDriven = $dateDriven;
        return $this;
    }
    /**
     * Add item to dateDriven value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDateDriven(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The dateDriven 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->dateDriven[] = $item;
        return $this;
    }
    /**
     * Get dayDiscountExpires value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getDayDiscountExpires()
    {
        return $this->dayDiscountExpires;
    }
    /**
     * This method is responsible for validating the values passed to the setDayDiscountExpires method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDayDiscountExpires method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDayDiscountExpiresForArrayConstraintsFromSetDayDiscountExpires(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDayDiscountExpiresItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDayDiscountExpiresItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicDayDiscountExpiresItem) ? get_class($termSearchRowBasicDayDiscountExpiresItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDayDiscountExpiresItem), var_export($termSearchRowBasicDayDiscountExpiresItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The dayDiscountExpires property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set dayDiscountExpires value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $dayDiscountExpires
     * @return \StructType\TermSearchRowBasic
     */
    public function setDayDiscountExpires(array $dayDiscountExpires = array())
    {
        // validation for constraint: array
        if ('' !== ($dayDiscountExpiresArrayErrorMessage = self::validateDayDiscountExpiresForArrayConstraintsFromSetDayDiscountExpires($dayDiscountExpires))) {
            throw new \InvalidArgumentException($dayDiscountExpiresArrayErrorMessage, __LINE__);
        }
        $this->dayDiscountExpires = $dayDiscountExpires;
        return $this;
    }
    /**
     * Add item to dayDiscountExpires value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDayDiscountExpires(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The dayDiscountExpires property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->dayDiscountExpires[] = $item;
        return $this;
    }
    /**
     * Get dayOfMonthNetDue value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getDayOfMonthNetDue()
    {
        return $this->dayOfMonthNetDue;
    }
    /**
     * This method is responsible for validating the values passed to the setDayOfMonthNetDue method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDayOfMonthNetDue method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDayOfMonthNetDueForArrayConstraintsFromSetDayOfMonthNetDue(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDayOfMonthNetDueItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDayOfMonthNetDueItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicDayOfMonthNetDueItem) ? get_class($termSearchRowBasicDayOfMonthNetDueItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDayOfMonthNetDueItem), var_export($termSearchRowBasicDayOfMonthNetDueItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The dayOfMonthNetDue property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set dayOfMonthNetDue value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $dayOfMonthNetDue
     * @return \StructType\TermSearchRowBasic
     */
    public function setDayOfMonthNetDue(array $dayOfMonthNetDue = array())
    {
        // validation for constraint: array
        if ('' !== ($dayOfMonthNetDueArrayErrorMessage = self::validateDayOfMonthNetDueForArrayConstraintsFromSetDayOfMonthNetDue($dayOfMonthNetDue))) {
            throw new \InvalidArgumentException($dayOfMonthNetDueArrayErrorMessage, __LINE__);
        }
        $this->dayOfMonthNetDue = $dayOfMonthNetDue;
        return $this;
    }
    /**
     * Add item to dayOfMonthNetDue value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDayOfMonthNetDue(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The dayOfMonthNetDue property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->dayOfMonthNetDue[] = $item;
        return $this;
    }
    /**
     * Get daysUntilExpiry value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getDaysUntilExpiry()
    {
        return $this->daysUntilExpiry;
    }
    /**
     * This method is responsible for validating the values passed to the setDaysUntilExpiry method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDaysUntilExpiry method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDaysUntilExpiryForArrayConstraintsFromSetDaysUntilExpiry(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDaysUntilExpiryItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDaysUntilExpiryItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicDaysUntilExpiryItem) ? get_class($termSearchRowBasicDaysUntilExpiryItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDaysUntilExpiryItem), var_export($termSearchRowBasicDaysUntilExpiryItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The daysUntilExpiry property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set daysUntilExpiry value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $daysUntilExpiry
     * @return \StructType\TermSearchRowBasic
     */
    public function setDaysUntilExpiry(array $daysUntilExpiry = array())
    {
        // validation for constraint: array
        if ('' !== ($daysUntilExpiryArrayErrorMessage = self::validateDaysUntilExpiryForArrayConstraintsFromSetDaysUntilExpiry($daysUntilExpiry))) {
            throw new \InvalidArgumentException($daysUntilExpiryArrayErrorMessage, __LINE__);
        }
        $this->daysUntilExpiry = $daysUntilExpiry;
        return $this;
    }
    /**
     * Add item to daysUntilExpiry value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDaysUntilExpiry(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The daysUntilExpiry property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->daysUntilExpiry[] = $item;
        return $this;
    }
    /**
     * Get daysUntilNetDue value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getDaysUntilNetDue()
    {
        return $this->daysUntilNetDue;
    }
    /**
     * This method is responsible for validating the values passed to the setDaysUntilNetDue method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDaysUntilNetDue method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDaysUntilNetDueForArrayConstraintsFromSetDaysUntilNetDue(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDaysUntilNetDueItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDaysUntilNetDueItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicDaysUntilNetDueItem) ? get_class($termSearchRowBasicDaysUntilNetDueItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDaysUntilNetDueItem), var_export($termSearchRowBasicDaysUntilNetDueItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The daysUntilNetDue property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set daysUntilNetDue value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $daysUntilNetDue
     * @return \StructType\TermSearchRowBasic
     */
    public function setDaysUntilNetDue(array $daysUntilNetDue = array())
    {
        // validation for constraint: array
        if ('' !== ($daysUntilNetDueArrayErrorMessage = self::validateDaysUntilNetDueForArrayConstraintsFromSetDaysUntilNetDue($daysUntilNetDue))) {
            throw new \InvalidArgumentException($daysUntilNetDueArrayErrorMessage, __LINE__);
        }
        $this->daysUntilNetDue = $daysUntilNetDue;
        return $this;
    }
    /**
     * Add item to daysUntilNetDue value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDaysUntilNetDue(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The daysUntilNetDue property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->daysUntilNetDue[] = $item;
        return $this;
    }
    /**
     * Get discountPercent value
     * @return \StructType\SearchColumnDoubleField[]|null
     */
    public function getDiscountPercent()
    {
        return $this->discountPercent;
    }
    /**
     * This method is responsible for validating the values passed to the setDiscountPercent method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDiscountPercent method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDiscountPercentForArrayConstraintsFromSetDiscountPercent(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDiscountPercentItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDiscountPercentItem instanceof \StructType\SearchColumnDoubleField) {
                $invalidValues[] = is_object($termSearchRowBasicDiscountPercentItem) ? get_class($termSearchRowBasicDiscountPercentItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDiscountPercentItem), var_export($termSearchRowBasicDiscountPercentItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The discountPercent property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set discountPercent value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField[] $discountPercent
     * @return \StructType\TermSearchRowBasic
     */
    public function setDiscountPercent(array $discountPercent = array())
    {
        // validation for constraint: array
        if ('' !== ($discountPercentArrayErrorMessage = self::validateDiscountPercentForArrayConstraintsFromSetDiscountPercent($discountPercent))) {
            throw new \InvalidArgumentException($discountPercentArrayErrorMessage, __LINE__);
        }
        $this->discountPercent = $discountPercent;
        return $this;
    }
    /**
     * Add item to discountPercent value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDiscountPercent(\StructType\SearchColumnDoubleField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDoubleField) {
            throw new \InvalidArgumentException(sprintf('The discountPercent property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->discountPercent[] = $item;
        return $this;
    }
    /**
     * Get discountPercentDateDriven value
     * @return \StructType\SearchColumnDoubleField[]|null
     */
    public function getDiscountPercentDateDriven()
    {
        return $this->discountPercentDateDriven;
    }
    /**
     * This method is responsible for validating the values passed to the setDiscountPercentDateDriven method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDiscountPercentDateDriven method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDiscountPercentDateDrivenForArrayConstraintsFromSetDiscountPercentDateDriven(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDiscountPercentDateDrivenItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDiscountPercentDateDrivenItem instanceof \StructType\SearchColumnDoubleField) {
                $invalidValues[] = is_object($termSearchRowBasicDiscountPercentDateDrivenItem) ? get_class($termSearchRowBasicDiscountPercentDateDrivenItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDiscountPercentDateDrivenItem), var_export($termSearchRowBasicDiscountPercentDateDrivenItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The discountPercentDateDriven property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set discountPercentDateDriven value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField[] $discountPercentDateDriven
     * @return \StructType\TermSearchRowBasic
     */
    public function setDiscountPercentDateDriven(array $discountPercentDateDriven = array())
    {
        // validation for constraint: array
        if ('' !== ($discountPercentDateDrivenArrayErrorMessage = self::validateDiscountPercentDateDrivenForArrayConstraintsFromSetDiscountPercentDateDriven($discountPercentDateDriven))) {
            throw new \InvalidArgumentException($discountPercentDateDrivenArrayErrorMessage, __LINE__);
        }
        $this->discountPercentDateDriven = $discountPercentDateDriven;
        return $this;
    }
    /**
     * Add item to discountPercentDateDriven value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDiscountPercentDateDriven(\StructType\SearchColumnDoubleField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDoubleField) {
            throw new \InvalidArgumentException(sprintf('The discountPercentDateDriven property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->discountPercentDateDriven[] = $item;
        return $this;
    }
    /**
     * Get dueNextMonthIfWithinDays value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getDueNextMonthIfWithinDays()
    {
        return $this->dueNextMonthIfWithinDays;
    }
    /**
     * This method is responsible for validating the values passed to the setDueNextMonthIfWithinDays method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDueNextMonthIfWithinDays method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDueNextMonthIfWithinDaysForArrayConstraintsFromSetDueNextMonthIfWithinDays(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicDueNextMonthIfWithinDaysItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicDueNextMonthIfWithinDaysItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicDueNextMonthIfWithinDaysItem) ? get_class($termSearchRowBasicDueNextMonthIfWithinDaysItem) : sprintf('%s(%s)', gettype($termSearchRowBasicDueNextMonthIfWithinDaysItem), var_export($termSearchRowBasicDueNextMonthIfWithinDaysItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The dueNextMonthIfWithinDays property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set dueNextMonthIfWithinDays value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $dueNextMonthIfWithinDays
     * @return \StructType\TermSearchRowBasic
     */
    public function setDueNextMonthIfWithinDays(array $dueNextMonthIfWithinDays = array())
    {
        // validation for constraint: array
        if ('' !== ($dueNextMonthIfWithinDaysArrayErrorMessage = self::validateDueNextMonthIfWithinDaysForArrayConstraintsFromSetDueNextMonthIfWithinDays($dueNextMonthIfWithinDays))) {
            throw new \InvalidArgumentException($dueNextMonthIfWithinDaysArrayErrorMessage, __LINE__);
        }
        $this->dueNextMonthIfWithinDays = $dueNextMonthIfWithinDays;
        return $this;
    }
    /**
     * Add item to dueNextMonthIfWithinDays value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToDueNextMonthIfWithinDays(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The dueNextMonthIfWithinDays property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->dueNextMonthIfWithinDays[] = $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 $termSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($termSearchRowBasicExternalIdItem) ? get_class($termSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($termSearchRowBasicExternalIdItem), var_export($termSearchRowBasicExternalIdItem, 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\TermSearchRowBasic
     */
    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\TermSearchRowBasic
     */
    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 installment value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getInstallment()
    {
        return $this->installment;
    }
    /**
     * This method is responsible for validating the values passed to the setInstallment method
     * This method is willingly generated in order to preserve the one-line inline validation within the setInstallment method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateInstallmentForArrayConstraintsFromSetInstallment(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicInstallmentItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicInstallmentItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($termSearchRowBasicInstallmentItem) ? get_class($termSearchRowBasicInstallmentItem) : sprintf('%s(%s)', gettype($termSearchRowBasicInstallmentItem), var_export($termSearchRowBasicInstallmentItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The installment 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 installment value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $installment
     * @return \StructType\TermSearchRowBasic
     */
    public function setInstallment(array $installment = array())
    {
        // validation for constraint: array
        if ('' !== ($installmentArrayErrorMessage = self::validateInstallmentForArrayConstraintsFromSetInstallment($installment))) {
            throw new \InvalidArgumentException($installmentArrayErrorMessage, __LINE__);
        }
        $this->installment = $installment;
        return $this;
    }
    /**
     * Add item to installment value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToInstallment(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The installment 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->installment[] = $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 $termSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($termSearchRowBasicInternalIdItem) ? get_class($termSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($termSearchRowBasicInternalIdItem), var_export($termSearchRowBasicInternalIdItem, 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\TermSearchRowBasic
     */
    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\TermSearchRowBasic
     */
    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\SearchColumnBooleanField[]|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 $termSearchRowBasicIsInactiveItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicIsInactiveItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($termSearchRowBasicIsInactiveItem) ? get_class($termSearchRowBasicIsInactiveItem) : sprintf('%s(%s)', gettype($termSearchRowBasicIsInactiveItem), var_export($termSearchRowBasicIsInactiveItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The isInactive 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 isInactive value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $isInactive
     * @return \StructType\TermSearchRowBasic
     */
    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\SearchColumnBooleanField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToIsInactive(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The isInactive 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->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 $termSearchRowBasicNameItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($termSearchRowBasicNameItem) ? get_class($termSearchRowBasicNameItem) : sprintf('%s(%s)', gettype($termSearchRowBasicNameItem), var_export($termSearchRowBasicNameItem, 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\TermSearchRowBasic
     */
    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\TermSearchRowBasic
     */
    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 preferred value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getPreferred()
    {
        return $this->preferred;
    }
    /**
     * This method is responsible for validating the values passed to the setPreferred method
     * This method is willingly generated in order to preserve the one-line inline validation within the setPreferred method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validatePreferredForArrayConstraintsFromSetPreferred(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicPreferredItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicPreferredItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($termSearchRowBasicPreferredItem) ? get_class($termSearchRowBasicPreferredItem) : sprintf('%s(%s)', gettype($termSearchRowBasicPreferredItem), var_export($termSearchRowBasicPreferredItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The preferred 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 preferred value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $preferred
     * @return \StructType\TermSearchRowBasic
     */
    public function setPreferred(array $preferred = array())
    {
        // validation for constraint: array
        if ('' !== ($preferredArrayErrorMessage = self::validatePreferredForArrayConstraintsFromSetPreferred($preferred))) {
            throw new \InvalidArgumentException($preferredArrayErrorMessage, __LINE__);
        }
        $this->preferred = $preferred;
        return $this;
    }
    /**
     * Add item to preferred value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToPreferred(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The preferred 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->preferred[] = $item;
        return $this;
    }
    /**
     * Get recurrenceCount value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getRecurrenceCount()
    {
        return $this->recurrenceCount;
    }
    /**
     * This method is responsible for validating the values passed to the setRecurrenceCount method
     * This method is willingly generated in order to preserve the one-line inline validation within the setRecurrenceCount method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateRecurrenceCountForArrayConstraintsFromSetRecurrenceCount(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicRecurrenceCountItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicRecurrenceCountItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicRecurrenceCountItem) ? get_class($termSearchRowBasicRecurrenceCountItem) : sprintf('%s(%s)', gettype($termSearchRowBasicRecurrenceCountItem), var_export($termSearchRowBasicRecurrenceCountItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The recurrenceCount property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set recurrenceCount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $recurrenceCount
     * @return \StructType\TermSearchRowBasic
     */
    public function setRecurrenceCount(array $recurrenceCount = array())
    {
        // validation for constraint: array
        if ('' !== ($recurrenceCountArrayErrorMessage = self::validateRecurrenceCountForArrayConstraintsFromSetRecurrenceCount($recurrenceCount))) {
            throw new \InvalidArgumentException($recurrenceCountArrayErrorMessage, __LINE__);
        }
        $this->recurrenceCount = $recurrenceCount;
        return $this;
    }
    /**
     * Add item to recurrenceCount value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToRecurrenceCount(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The recurrenceCount property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->recurrenceCount[] = $item;
        return $this;
    }
    /**
     * Get recurrenceFrequency value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getRecurrenceFrequency()
    {
        return $this->recurrenceFrequency;
    }
    /**
     * This method is responsible for validating the values passed to the setRecurrenceFrequency method
     * This method is willingly generated in order to preserve the one-line inline validation within the setRecurrenceFrequency method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateRecurrenceFrequencyForArrayConstraintsFromSetRecurrenceFrequency(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicRecurrenceFrequencyItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicRecurrenceFrequencyItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($termSearchRowBasicRecurrenceFrequencyItem) ? get_class($termSearchRowBasicRecurrenceFrequencyItem) : sprintf('%s(%s)', gettype($termSearchRowBasicRecurrenceFrequencyItem), var_export($termSearchRowBasicRecurrenceFrequencyItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The recurrenceFrequency 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 recurrenceFrequency value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $recurrenceFrequency
     * @return \StructType\TermSearchRowBasic
     */
    public function setRecurrenceFrequency(array $recurrenceFrequency = array())
    {
        // validation for constraint: array
        if ('' !== ($recurrenceFrequencyArrayErrorMessage = self::validateRecurrenceFrequencyForArrayConstraintsFromSetRecurrenceFrequency($recurrenceFrequency))) {
            throw new \InvalidArgumentException($recurrenceFrequencyArrayErrorMessage, __LINE__);
        }
        $this->recurrenceFrequency = $recurrenceFrequency;
        return $this;
    }
    /**
     * Add item to recurrenceFrequency value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToRecurrenceFrequency(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The recurrenceFrequency 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->recurrenceFrequency[] = $item;
        return $this;
    }
    /**
     * Get repeatEvery value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getRepeatEvery()
    {
        return $this->repeatEvery;
    }
    /**
     * This method is responsible for validating the values passed to the setRepeatEvery method
     * This method is willingly generated in order to preserve the one-line inline validation within the setRepeatEvery method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateRepeatEveryForArrayConstraintsFromSetRepeatEvery(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicRepeatEveryItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicRepeatEveryItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($termSearchRowBasicRepeatEveryItem) ? get_class($termSearchRowBasicRepeatEveryItem) : sprintf('%s(%s)', gettype($termSearchRowBasicRepeatEveryItem), var_export($termSearchRowBasicRepeatEveryItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The repeatEvery property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set repeatEvery value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $repeatEvery
     * @return \StructType\TermSearchRowBasic
     */
    public function setRepeatEvery(array $repeatEvery = array())
    {
        // validation for constraint: array
        if ('' !== ($repeatEveryArrayErrorMessage = self::validateRepeatEveryForArrayConstraintsFromSetRepeatEvery($repeatEvery))) {
            throw new \InvalidArgumentException($repeatEveryArrayErrorMessage, __LINE__);
        }
        $this->repeatEvery = $repeatEvery;
        return $this;
    }
    /**
     * Add item to repeatEvery value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToRepeatEvery(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The repeatEvery property can only contain items of type \StructType\SearchColumnLongField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->repeatEvery[] = $item;
        return $this;
    }
    /**
     * Get splitEvenly value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getSplitEvenly()
    {
        return $this->splitEvenly;
    }
    /**
     * This method is responsible for validating the values passed to the setSplitEvenly method
     * This method is willingly generated in order to preserve the one-line inline validation within the setSplitEvenly method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateSplitEvenlyForArrayConstraintsFromSetSplitEvenly(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $termSearchRowBasicSplitEvenlyItem) {
            // validation for constraint: itemType
            if (!$termSearchRowBasicSplitEvenlyItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($termSearchRowBasicSplitEvenlyItem) ? get_class($termSearchRowBasicSplitEvenlyItem) : sprintf('%s(%s)', gettype($termSearchRowBasicSplitEvenlyItem), var_export($termSearchRowBasicSplitEvenlyItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The splitEvenly 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 splitEvenly value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $splitEvenly
     * @return \StructType\TermSearchRowBasic
     */
    public function setSplitEvenly(array $splitEvenly = array())
    {
        // validation for constraint: array
        if ('' !== ($splitEvenlyArrayErrorMessage = self::validateSplitEvenlyForArrayConstraintsFromSetSplitEvenly($splitEvenly))) {
            throw new \InvalidArgumentException($splitEvenlyArrayErrorMessage, __LINE__);
        }
        $this->splitEvenly = $splitEvenly;
        return $this;
    }
    /**
     * Add item to splitEvenly value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\TermSearchRowBasic
     */
    public function addToSplitEvenly(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The splitEvenly 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->splitEvenly[] = $item;
        return $this;
    }
}
