<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for FolderSearchRowBasic StructType
 * @subpackage Structs
 */
class FolderSearchRowBasic extends SearchRowBasic
{
    /**
     * The class
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $class;
    /**
     * The department
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $department;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $description;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The folderSize
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $folderSize;
    /**
     * The group
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $group;
    /**
     * 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 lastModifiedDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $lastModifiedDate;
    /**
     * The location
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $location;
    /**
     * The name
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $name;
    /**
     * The numFiles
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $numFiles;
    /**
     * 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 subsidiary
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $subsidiary;
    /**
     * Constructor method for FolderSearchRowBasic
     * @uses FolderSearchRowBasic::setClass()
     * @uses FolderSearchRowBasic::setDepartment()
     * @uses FolderSearchRowBasic::setDescription()
     * @uses FolderSearchRowBasic::setExternalId()
     * @uses FolderSearchRowBasic::setFolderSize()
     * @uses FolderSearchRowBasic::setGroup()
     * @uses FolderSearchRowBasic::setInternalId()
     * @uses FolderSearchRowBasic::setIsInactive()
     * @uses FolderSearchRowBasic::setLastModifiedDate()
     * @uses FolderSearchRowBasic::setLocation()
     * @uses FolderSearchRowBasic::setName()
     * @uses FolderSearchRowBasic::setNumFiles()
     * @uses FolderSearchRowBasic::setOwner()
     * @uses FolderSearchRowBasic::setParent()
     * @uses FolderSearchRowBasic::setSubsidiary()
     * @param \StructType\SearchColumnSelectField[] $class
     * @param \StructType\SearchColumnSelectField[] $department
     * @param \StructType\SearchColumnStringField[] $description
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnLongField[] $folderSize
     * @param \StructType\SearchColumnSelectField[] $group
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnBooleanField[] $isInactive
     * @param \StructType\SearchColumnDateField[] $lastModifiedDate
     * @param \StructType\SearchColumnSelectField[] $location
     * @param \StructType\SearchColumnStringField[] $name
     * @param \StructType\SearchColumnLongField[] $numFiles
     * @param \StructType\SearchColumnSelectField[] $owner
     * @param \StructType\SearchColumnSelectField[] $parent
     * @param \StructType\SearchColumnSelectField[] $subsidiary
     */
    public function __construct(array $class = array(), array $department = array(), array $description = array(), array $externalId = array(), array $folderSize = array(), array $group = array(), array $internalId = array(), array $isInactive = array(), array $lastModifiedDate = array(), array $location = array(), array $name = array(), array $numFiles = array(), array $owner = array(), array $parent = array(), array $subsidiary = array())
    {
        $this
            ->setClass($class)
            ->setDepartment($department)
            ->setDescription($description)
            ->setExternalId($externalId)
            ->setFolderSize($folderSize)
            ->setGroup($group)
            ->setInternalId($internalId)
            ->setIsInactive($isInactive)
            ->setLastModifiedDate($lastModifiedDate)
            ->setLocation($location)
            ->setName($name)
            ->setNumFiles($numFiles)
            ->setOwner($owner)
            ->setParent($parent)
            ->setSubsidiary($subsidiary);
    }
    /**
     * Get class value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getClass()
    {
        return $this->class;
    }
    /**
     * This method is responsible for validating the values passed to the setClass method
     * This method is willingly generated in order to preserve the one-line inline validation within the setClass method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateClassForArrayConstraintsFromSetClass(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicClassItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicClassItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicClassItem) ? get_class($folderSearchRowBasicClassItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicClassItem), var_export($folderSearchRowBasicClassItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The class property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set class value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $class
     * @return \StructType\FolderSearchRowBasic
     */
    public function setClass(array $class = array())
    {
        // validation for constraint: array
        if ('' !== ($classArrayErrorMessage = self::validateClassForArrayConstraintsFromSetClass($class))) {
            throw new \InvalidArgumentException($classArrayErrorMessage, __LINE__);
        }
        $this->class = $class;
        return $this;
    }
    /**
     * Add item to class value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToClass(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The class property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->class[] = $item;
        return $this;
    }
    /**
     * Get department value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getDepartment()
    {
        return $this->department;
    }
    /**
     * This method is responsible for validating the values passed to the setDepartment method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDepartment method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDepartmentForArrayConstraintsFromSetDepartment(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicDepartmentItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicDepartmentItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicDepartmentItem) ? get_class($folderSearchRowBasicDepartmentItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicDepartmentItem), var_export($folderSearchRowBasicDepartmentItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The department property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set department value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $department
     * @return \StructType\FolderSearchRowBasic
     */
    public function setDepartment(array $department = array())
    {
        // validation for constraint: array
        if ('' !== ($departmentArrayErrorMessage = self::validateDepartmentForArrayConstraintsFromSetDepartment($department))) {
            throw new \InvalidArgumentException($departmentArrayErrorMessage, __LINE__);
        }
        $this->department = $department;
        return $this;
    }
    /**
     * Add item to department value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToDepartment(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The department property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->department[] = $item;
        return $this;
    }
    /**
     * Get description value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * This method is responsible for validating the values passed to the setDescription method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDescription method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDescriptionForArrayConstraintsFromSetDescription(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicDescriptionItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicDescriptionItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($folderSearchRowBasicDescriptionItem) ? get_class($folderSearchRowBasicDescriptionItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicDescriptionItem), var_export($folderSearchRowBasicDescriptionItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The description 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 description value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $description
     * @return \StructType\FolderSearchRowBasic
     */
    public function setDescription(array $description = array())
    {
        // validation for constraint: array
        if ('' !== ($descriptionArrayErrorMessage = self::validateDescriptionForArrayConstraintsFromSetDescription($description))) {
            throw new \InvalidArgumentException($descriptionArrayErrorMessage, __LINE__);
        }
        $this->description = $description;
        return $this;
    }
    /**
     * Add item to description value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToDescription(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The description 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->description[] = $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 $folderSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicExternalIdItem) ? get_class($folderSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicExternalIdItem), var_export($folderSearchRowBasicExternalIdItem, 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\FolderSearchRowBasic
     */
    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\FolderSearchRowBasic
     */
    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 folderSize value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getFolderSize()
    {
        return $this->folderSize;
    }
    /**
     * This method is responsible for validating the values passed to the setFolderSize method
     * This method is willingly generated in order to preserve the one-line inline validation within the setFolderSize method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateFolderSizeForArrayConstraintsFromSetFolderSize(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicFolderSizeItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicFolderSizeItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($folderSearchRowBasicFolderSizeItem) ? get_class($folderSearchRowBasicFolderSizeItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicFolderSizeItem), var_export($folderSearchRowBasicFolderSizeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The folderSize 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 folderSize value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $folderSize
     * @return \StructType\FolderSearchRowBasic
     */
    public function setFolderSize(array $folderSize = array())
    {
        // validation for constraint: array
        if ('' !== ($folderSizeArrayErrorMessage = self::validateFolderSizeForArrayConstraintsFromSetFolderSize($folderSize))) {
            throw new \InvalidArgumentException($folderSizeArrayErrorMessage, __LINE__);
        }
        $this->folderSize = $folderSize;
        return $this;
    }
    /**
     * Add item to folderSize value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToFolderSize(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The folderSize 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->folderSize[] = $item;
        return $this;
    }
    /**
     * Get group value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getGroup()
    {
        return $this->group;
    }
    /**
     * This method is responsible for validating the values passed to the setGroup method
     * This method is willingly generated in order to preserve the one-line inline validation within the setGroup method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateGroupForArrayConstraintsFromSetGroup(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicGroupItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicGroupItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicGroupItem) ? get_class($folderSearchRowBasicGroupItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicGroupItem), var_export($folderSearchRowBasicGroupItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The group 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 group value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $group
     * @return \StructType\FolderSearchRowBasic
     */
    public function setGroup(array $group = array())
    {
        // validation for constraint: array
        if ('' !== ($groupArrayErrorMessage = self::validateGroupForArrayConstraintsFromSetGroup($group))) {
            throw new \InvalidArgumentException($groupArrayErrorMessage, __LINE__);
        }
        $this->group = $group;
        return $this;
    }
    /**
     * Add item to group value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToGroup(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The group 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->group[] = $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 $folderSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicInternalIdItem) ? get_class($folderSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicInternalIdItem), var_export($folderSearchRowBasicInternalIdItem, 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\FolderSearchRowBasic
     */
    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\FolderSearchRowBasic
     */
    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 $folderSearchRowBasicIsInactiveItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicIsInactiveItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($folderSearchRowBasicIsInactiveItem) ? get_class($folderSearchRowBasicIsInactiveItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicIsInactiveItem), var_export($folderSearchRowBasicIsInactiveItem, 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\FolderSearchRowBasic
     */
    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\FolderSearchRowBasic
     */
    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 lastModifiedDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getLastModifiedDate()
    {
        return $this->lastModifiedDate;
    }
    /**
     * This method is responsible for validating the values passed to the setLastModifiedDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLastModifiedDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLastModifiedDateForArrayConstraintsFromSetLastModifiedDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicLastModifiedDateItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicLastModifiedDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($folderSearchRowBasicLastModifiedDateItem) ? get_class($folderSearchRowBasicLastModifiedDateItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicLastModifiedDateItem), var_export($folderSearchRowBasicLastModifiedDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The lastModifiedDate 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 lastModifiedDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $lastModifiedDate
     * @return \StructType\FolderSearchRowBasic
     */
    public function setLastModifiedDate(array $lastModifiedDate = array())
    {
        // validation for constraint: array
        if ('' !== ($lastModifiedDateArrayErrorMessage = self::validateLastModifiedDateForArrayConstraintsFromSetLastModifiedDate($lastModifiedDate))) {
            throw new \InvalidArgumentException($lastModifiedDateArrayErrorMessage, __LINE__);
        }
        $this->lastModifiedDate = $lastModifiedDate;
        return $this;
    }
    /**
     * Add item to lastModifiedDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToLastModifiedDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The lastModifiedDate 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->lastModifiedDate[] = $item;
        return $this;
    }
    /**
     * Get location value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getLocation()
    {
        return $this->location;
    }
    /**
     * This method is responsible for validating the values passed to the setLocation method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLocation method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLocationForArrayConstraintsFromSetLocation(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicLocationItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicLocationItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicLocationItem) ? get_class($folderSearchRowBasicLocationItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicLocationItem), var_export($folderSearchRowBasicLocationItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The location property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set location value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $location
     * @return \StructType\FolderSearchRowBasic
     */
    public function setLocation(array $location = array())
    {
        // validation for constraint: array
        if ('' !== ($locationArrayErrorMessage = self::validateLocationForArrayConstraintsFromSetLocation($location))) {
            throw new \InvalidArgumentException($locationArrayErrorMessage, __LINE__);
        }
        $this->location = $location;
        return $this;
    }
    /**
     * Add item to location value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToLocation(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The location property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->location[] = $item;
        return $this;
    }
    /**
     * Get 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 $folderSearchRowBasicNameItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($folderSearchRowBasicNameItem) ? get_class($folderSearchRowBasicNameItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicNameItem), var_export($folderSearchRowBasicNameItem, 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\FolderSearchRowBasic
     */
    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\FolderSearchRowBasic
     */
    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 numFiles value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getNumFiles()
    {
        return $this->numFiles;
    }
    /**
     * This method is responsible for validating the values passed to the setNumFiles method
     * This method is willingly generated in order to preserve the one-line inline validation within the setNumFiles method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateNumFilesForArrayConstraintsFromSetNumFiles(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicNumFilesItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicNumFilesItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($folderSearchRowBasicNumFilesItem) ? get_class($folderSearchRowBasicNumFilesItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicNumFilesItem), var_export($folderSearchRowBasicNumFilesItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The numFiles 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 numFiles value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $numFiles
     * @return \StructType\FolderSearchRowBasic
     */
    public function setNumFiles(array $numFiles = array())
    {
        // validation for constraint: array
        if ('' !== ($numFilesArrayErrorMessage = self::validateNumFilesForArrayConstraintsFromSetNumFiles($numFiles))) {
            throw new \InvalidArgumentException($numFilesArrayErrorMessage, __LINE__);
        }
        $this->numFiles = $numFiles;
        return $this;
    }
    /**
     * Add item to numFiles value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToNumFiles(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The numFiles 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->numFiles[] = $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 $folderSearchRowBasicOwnerItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicOwnerItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicOwnerItem) ? get_class($folderSearchRowBasicOwnerItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicOwnerItem), var_export($folderSearchRowBasicOwnerItem, 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\FolderSearchRowBasic
     */
    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\FolderSearchRowBasic
     */
    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 $folderSearchRowBasicParentItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicParentItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicParentItem) ? get_class($folderSearchRowBasicParentItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicParentItem), var_export($folderSearchRowBasicParentItem, 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\FolderSearchRowBasic
     */
    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\FolderSearchRowBasic
     */
    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 subsidiary value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getSubsidiary()
    {
        return $this->subsidiary;
    }
    /**
     * This method is responsible for validating the values passed to the setSubsidiary method
     * This method is willingly generated in order to preserve the one-line inline validation within the setSubsidiary method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateSubsidiaryForArrayConstraintsFromSetSubsidiary(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $folderSearchRowBasicSubsidiaryItem) {
            // validation for constraint: itemType
            if (!$folderSearchRowBasicSubsidiaryItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($folderSearchRowBasicSubsidiaryItem) ? get_class($folderSearchRowBasicSubsidiaryItem) : sprintf('%s(%s)', gettype($folderSearchRowBasicSubsidiaryItem), var_export($folderSearchRowBasicSubsidiaryItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The subsidiary property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set subsidiary value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $subsidiary
     * @return \StructType\FolderSearchRowBasic
     */
    public function setSubsidiary(array $subsidiary = array())
    {
        // validation for constraint: array
        if ('' !== ($subsidiaryArrayErrorMessage = self::validateSubsidiaryForArrayConstraintsFromSetSubsidiary($subsidiary))) {
            throw new \InvalidArgumentException($subsidiaryArrayErrorMessage, __LINE__);
        }
        $this->subsidiary = $subsidiary;
        return $this;
    }
    /**
     * Add item to subsidiary value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\FolderSearchRowBasic
     */
    public function addToSubsidiary(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The subsidiary property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->subsidiary[] = $item;
        return $this;
    }
}
