<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CustomRecordSearchRowBasic StructType
 * @subpackage Structs
 */
class CustomRecordSearchRowBasic extends SearchRowBasic
{
    /**
     * The recType
     * @var \StructType\RecordRef
     */
    public $recType;
    /**
     * The altName
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $altName;
    /**
     * The availableOffline
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $availableOffline;
    /**
     * The created
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $created;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The id
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $id;
    /**
     * 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 lastModified
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $lastModified;
    /**
     * The lastModifiedBy
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $lastModifiedBy;
    /**
     * The name
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $name;
    /**
     * The owner
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $owner;
    /**
     * The parent
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $parent;
    /**
     * The customFieldList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SearchColumnCustomFieldList
     */
    public $customFieldList;
    /**
     * Constructor method for CustomRecordSearchRowBasic
     * @uses CustomRecordSearchRowBasic::setRecType()
     * @uses CustomRecordSearchRowBasic::setAltName()
     * @uses CustomRecordSearchRowBasic::setAvailableOffline()
     * @uses CustomRecordSearchRowBasic::setCreated()
     * @uses CustomRecordSearchRowBasic::setExternalId()
     * @uses CustomRecordSearchRowBasic::setId()
     * @uses CustomRecordSearchRowBasic::setInternalId()
     * @uses CustomRecordSearchRowBasic::setIsInactive()
     * @uses CustomRecordSearchRowBasic::setLastModified()
     * @uses CustomRecordSearchRowBasic::setLastModifiedBy()
     * @uses CustomRecordSearchRowBasic::setName()
     * @uses CustomRecordSearchRowBasic::setOwner()
     * @uses CustomRecordSearchRowBasic::setParent()
     * @uses CustomRecordSearchRowBasic::setCustomFieldList()
     * @param \StructType\RecordRef $recType
     * @param \StructType\SearchColumnStringField[] $altName
     * @param \StructType\SearchColumnBooleanField[] $availableOffline
     * @param \StructType\SearchColumnDateField[] $created
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnLongField[] $id
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnBooleanField[] $isInactive
     * @param \StructType\SearchColumnDateField[] $lastModified
     * @param \StructType\SearchColumnSelectField[] $lastModifiedBy
     * @param \StructType\SearchColumnStringField[] $name
     * @param \StructType\SearchColumnSelectField[] $owner
     * @param \StructType\SearchColumnSelectField[] $parent
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     */
    public function __construct(\StructType\RecordRef $recType = null, array $altName = array(), array $availableOffline = array(), array $created = array(), array $externalId = array(), array $id = array(), array $internalId = array(), array $isInactive = array(), array $lastModified = array(), array $lastModifiedBy = array(), array $name = array(), array $owner = array(), array $parent = array(), \StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this
            ->setRecType($recType)
            ->setAltName($altName)
            ->setAvailableOffline($availableOffline)
            ->setCreated($created)
            ->setExternalId($externalId)
            ->setId($id)
            ->setInternalId($internalId)
            ->setIsInactive($isInactive)
            ->setLastModified($lastModified)
            ->setLastModifiedBy($lastModifiedBy)
            ->setName($name)
            ->setOwner($owner)
            ->setParent($parent)
            ->setCustomFieldList($customFieldList);
    }
    /**
     * Get recType value
     * @return \StructType\RecordRef|null
     */
    public function getRecType()
    {
        return $this->recType;
    }
    /**
     * Set recType value
     * @param \StructType\RecordRef $recType
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setRecType(\StructType\RecordRef $recType = null)
    {
        $this->recType = $recType;
        return $this;
    }
    /**
     * Get altName value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getAltName()
    {
        return $this->altName;
    }
    /**
     * This method is responsible for validating the values passed to the setAltName method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAltName method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAltNameForArrayConstraintsFromSetAltName(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicAltNameItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicAltNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicAltNameItem) ? get_class($customRecordSearchRowBasicAltNameItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicAltNameItem), var_export($customRecordSearchRowBasicAltNameItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The altName 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 altName value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $altName
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setAltName(array $altName = array())
    {
        // validation for constraint: array
        if ('' !== ($altNameArrayErrorMessage = self::validateAltNameForArrayConstraintsFromSetAltName($altName))) {
            throw new \InvalidArgumentException($altNameArrayErrorMessage, __LINE__);
        }
        $this->altName = $altName;
        return $this;
    }
    /**
     * Add item to altName value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToAltName(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The altName 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->altName[] = $item;
        return $this;
    }
    /**
     * Get availableOffline value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getAvailableOffline()
    {
        return $this->availableOffline;
    }
    /**
     * This method is responsible for validating the values passed to the setAvailableOffline method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAvailableOffline method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAvailableOfflineForArrayConstraintsFromSetAvailableOffline(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicAvailableOfflineItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicAvailableOfflineItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicAvailableOfflineItem) ? get_class($customRecordSearchRowBasicAvailableOfflineItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicAvailableOfflineItem), var_export($customRecordSearchRowBasicAvailableOfflineItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The availableOffline 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 availableOffline value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $availableOffline
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setAvailableOffline(array $availableOffline = array())
    {
        // validation for constraint: array
        if ('' !== ($availableOfflineArrayErrorMessage = self::validateAvailableOfflineForArrayConstraintsFromSetAvailableOffline($availableOffline))) {
            throw new \InvalidArgumentException($availableOfflineArrayErrorMessage, __LINE__);
        }
        $this->availableOffline = $availableOffline;
        return $this;
    }
    /**
     * Add item to availableOffline value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToAvailableOffline(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The availableOffline 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->availableOffline[] = $item;
        return $this;
    }
    /**
     * Get created value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getCreated()
    {
        return $this->created;
    }
    /**
     * This method is responsible for validating the values passed to the setCreated method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCreated method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateCreatedForArrayConstraintsFromSetCreated(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicCreatedItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicCreatedItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicCreatedItem) ? get_class($customRecordSearchRowBasicCreatedItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicCreatedItem), var_export($customRecordSearchRowBasicCreatedItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The created property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set created value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $created
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setCreated(array $created = array())
    {
        // validation for constraint: array
        if ('' !== ($createdArrayErrorMessage = self::validateCreatedForArrayConstraintsFromSetCreated($created))) {
            throw new \InvalidArgumentException($createdArrayErrorMessage, __LINE__);
        }
        $this->created = $created;
        return $this;
    }
    /**
     * Add item to created value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToCreated(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The created property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->created[] = $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 $customRecordSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicExternalIdItem) ? get_class($customRecordSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicExternalIdItem), var_export($customRecordSearchRowBasicExternalIdItem, 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\CustomRecordSearchRowBasic
     */
    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\CustomRecordSearchRowBasic
     */
    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 id value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * This method is responsible for validating the values passed to the setId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateIdForArrayConstraintsFromSetId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicIdItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicIdItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicIdItem) ? get_class($customRecordSearchRowBasicIdItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicIdItem), var_export($customRecordSearchRowBasicIdItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The id 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 id value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $id
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setId(array $id = array())
    {
        // validation for constraint: array
        if ('' !== ($idArrayErrorMessage = self::validateIdForArrayConstraintsFromSetId($id))) {
            throw new \InvalidArgumentException($idArrayErrorMessage, __LINE__);
        }
        $this->id = $id;
        return $this;
    }
    /**
     * Add item to id value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToId(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The id 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->id[] = $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 $customRecordSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicInternalIdItem) ? get_class($customRecordSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicInternalIdItem), var_export($customRecordSearchRowBasicInternalIdItem, 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\CustomRecordSearchRowBasic
     */
    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\CustomRecordSearchRowBasic
     */
    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 $customRecordSearchRowBasicIsInactiveItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicIsInactiveItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicIsInactiveItem) ? get_class($customRecordSearchRowBasicIsInactiveItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicIsInactiveItem), var_export($customRecordSearchRowBasicIsInactiveItem, 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\CustomRecordSearchRowBasic
     */
    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\CustomRecordSearchRowBasic
     */
    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 lastModified value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getLastModified()
    {
        return $this->lastModified;
    }
    /**
     * This method is responsible for validating the values passed to the setLastModified method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLastModified method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLastModifiedForArrayConstraintsFromSetLastModified(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicLastModifiedItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicLastModifiedItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicLastModifiedItem) ? get_class($customRecordSearchRowBasicLastModifiedItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicLastModifiedItem), var_export($customRecordSearchRowBasicLastModifiedItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The lastModified property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set lastModified value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $lastModified
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setLastModified(array $lastModified = array())
    {
        // validation for constraint: array
        if ('' !== ($lastModifiedArrayErrorMessage = self::validateLastModifiedForArrayConstraintsFromSetLastModified($lastModified))) {
            throw new \InvalidArgumentException($lastModifiedArrayErrorMessage, __LINE__);
        }
        $this->lastModified = $lastModified;
        return $this;
    }
    /**
     * Add item to lastModified value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToLastModified(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The lastModified property can only contain items of type \StructType\SearchColumnDateField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->lastModified[] = $item;
        return $this;
    }
    /**
     * Get lastModifiedBy value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getLastModifiedBy()
    {
        return $this->lastModifiedBy;
    }
    /**
     * This method is responsible for validating the values passed to the setLastModifiedBy method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLastModifiedBy method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLastModifiedByForArrayConstraintsFromSetLastModifiedBy(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicLastModifiedByItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicLastModifiedByItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicLastModifiedByItem) ? get_class($customRecordSearchRowBasicLastModifiedByItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicLastModifiedByItem), var_export($customRecordSearchRowBasicLastModifiedByItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The lastModifiedBy 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 lastModifiedBy value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $lastModifiedBy
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setLastModifiedBy(array $lastModifiedBy = array())
    {
        // validation for constraint: array
        if ('' !== ($lastModifiedByArrayErrorMessage = self::validateLastModifiedByForArrayConstraintsFromSetLastModifiedBy($lastModifiedBy))) {
            throw new \InvalidArgumentException($lastModifiedByArrayErrorMessage, __LINE__);
        }
        $this->lastModifiedBy = $lastModifiedBy;
        return $this;
    }
    /**
     * Add item to lastModifiedBy value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToLastModifiedBy(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The lastModifiedBy 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->lastModifiedBy[] = $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 $customRecordSearchRowBasicNameItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicNameItem) ? get_class($customRecordSearchRowBasicNameItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicNameItem), var_export($customRecordSearchRowBasicNameItem, 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\CustomRecordSearchRowBasic
     */
    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\CustomRecordSearchRowBasic
     */
    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 owner value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getOwner()
    {
        return $this->owner;
    }
    /**
     * This method is responsible for validating the values passed to the setOwner method
     * This method is willingly generated in order to preserve the one-line inline validation within the setOwner method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateOwnerForArrayConstraintsFromSetOwner(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicOwnerItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicOwnerItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicOwnerItem) ? get_class($customRecordSearchRowBasicOwnerItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicOwnerItem), var_export($customRecordSearchRowBasicOwnerItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The owner 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 owner value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $owner
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setOwner(array $owner = array())
    {
        // validation for constraint: array
        if ('' !== ($ownerArrayErrorMessage = self::validateOwnerForArrayConstraintsFromSetOwner($owner))) {
            throw new \InvalidArgumentException($ownerArrayErrorMessage, __LINE__);
        }
        $this->owner = $owner;
        return $this;
    }
    /**
     * Add item to owner value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToOwner(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The owner 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->owner[] = $item;
        return $this;
    }
    /**
     * Get parent value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getParent()
    {
        return $this->parent;
    }
    /**
     * This method is responsible for validating the values passed to the setParent method
     * This method is willingly generated in order to preserve the one-line inline validation within the setParent method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateParentForArrayConstraintsFromSetParent(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $customRecordSearchRowBasicParentItem) {
            // validation for constraint: itemType
            if (!$customRecordSearchRowBasicParentItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($customRecordSearchRowBasicParentItem) ? get_class($customRecordSearchRowBasicParentItem) : sprintf('%s(%s)', gettype($customRecordSearchRowBasicParentItem), var_export($customRecordSearchRowBasicParentItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The parent 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 parent value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $parent
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setParent(array $parent = array())
    {
        // validation for constraint: array
        if ('' !== ($parentArrayErrorMessage = self::validateParentForArrayConstraintsFromSetParent($parent))) {
            throw new \InvalidArgumentException($parentArrayErrorMessage, __LINE__);
        }
        $this->parent = $parent;
        return $this;
    }
    /**
     * Add item to parent value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function addToParent(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The parent 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->parent[] = $item;
        return $this;
    }
    /**
     * Get customFieldList value
     * @return \StructType\SearchColumnCustomFieldList|null
     */
    public function getCustomFieldList()
    {
        return $this->customFieldList;
    }
    /**
     * Set customFieldList value
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     * @return \StructType\CustomRecordSearchRowBasic
     */
    public function setCustomFieldList(\StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this->customFieldList = $customFieldList;
        return $this;
    }
}
