<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for FileSearchRowBasic StructType
 * @subpackage Structs
 */
class FileSearchRowBasic extends SearchRowBasic
{
    /**
     * The availableWithoutLogin
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $availableWithoutLogin;
    /**
     * The created
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $created;
    /**
     * The dateViewed
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $dateViewed;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $description;
    /**
     * The documentSize
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $documentSize;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The fileType
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnEnumSelectField[]
     */
    public $fileType;
    /**
     * The folder
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $folder;
    /**
     * The hits
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $hits;
    /**
     * The hostedPath
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $hostedPath;
    /**
     * The internalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $internalId;
    /**
     * The isAvailable
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $isAvailable;
    /**
     * The modified
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $modified;
    /**
     * 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 url
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $url;
    /**
     * Constructor method for FileSearchRowBasic
     * @uses FileSearchRowBasic::setAvailableWithoutLogin()
     * @uses FileSearchRowBasic::setCreated()
     * @uses FileSearchRowBasic::setDateViewed()
     * @uses FileSearchRowBasic::setDescription()
     * @uses FileSearchRowBasic::setDocumentSize()
     * @uses FileSearchRowBasic::setExternalId()
     * @uses FileSearchRowBasic::setFileType()
     * @uses FileSearchRowBasic::setFolder()
     * @uses FileSearchRowBasic::setHits()
     * @uses FileSearchRowBasic::setHostedPath()
     * @uses FileSearchRowBasic::setInternalId()
     * @uses FileSearchRowBasic::setIsAvailable()
     * @uses FileSearchRowBasic::setModified()
     * @uses FileSearchRowBasic::setName()
     * @uses FileSearchRowBasic::setOwner()
     * @uses FileSearchRowBasic::setUrl()
     * @param \StructType\SearchColumnBooleanField[] $availableWithoutLogin
     * @param \StructType\SearchColumnDateField[] $created
     * @param \StructType\SearchColumnDateField[] $dateViewed
     * @param \StructType\SearchColumnStringField[] $description
     * @param \StructType\SearchColumnLongField[] $documentSize
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnEnumSelectField[] $fileType
     * @param \StructType\SearchColumnSelectField[] $folder
     * @param \StructType\SearchColumnLongField[] $hits
     * @param \StructType\SearchColumnStringField[] $hostedPath
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnBooleanField[] $isAvailable
     * @param \StructType\SearchColumnDateField[] $modified
     * @param \StructType\SearchColumnStringField[] $name
     * @param \StructType\SearchColumnSelectField[] $owner
     * @param \StructType\SearchColumnStringField[] $url
     */
    public function __construct(array $availableWithoutLogin = array(), array $created = array(), array $dateViewed = array(), array $description = array(), array $documentSize = array(), array $externalId = array(), array $fileType = array(), array $folder = array(), array $hits = array(), array $hostedPath = array(), array $internalId = array(), array $isAvailable = array(), array $modified = array(), array $name = array(), array $owner = array(), array $url = array())
    {
        $this
            ->setAvailableWithoutLogin($availableWithoutLogin)
            ->setCreated($created)
            ->setDateViewed($dateViewed)
            ->setDescription($description)
            ->setDocumentSize($documentSize)
            ->setExternalId($externalId)
            ->setFileType($fileType)
            ->setFolder($folder)
            ->setHits($hits)
            ->setHostedPath($hostedPath)
            ->setInternalId($internalId)
            ->setIsAvailable($isAvailable)
            ->setModified($modified)
            ->setName($name)
            ->setOwner($owner)
            ->setUrl($url);
    }
    /**
     * Get availableWithoutLogin value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getAvailableWithoutLogin()
    {
        return $this->availableWithoutLogin;
    }
    /**
     * This method is responsible for validating the values passed to the setAvailableWithoutLogin method
     * This method is willingly generated in order to preserve the one-line inline validation within the setAvailableWithoutLogin method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateAvailableWithoutLoginForArrayConstraintsFromSetAvailableWithoutLogin(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicAvailableWithoutLoginItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicAvailableWithoutLoginItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($fileSearchRowBasicAvailableWithoutLoginItem) ? get_class($fileSearchRowBasicAvailableWithoutLoginItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicAvailableWithoutLoginItem), var_export($fileSearchRowBasicAvailableWithoutLoginItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The availableWithoutLogin 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 availableWithoutLogin value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $availableWithoutLogin
     * @return \StructType\FileSearchRowBasic
     */
    public function setAvailableWithoutLogin(array $availableWithoutLogin = array())
    {
        // validation for constraint: array
        if ('' !== ($availableWithoutLoginArrayErrorMessage = self::validateAvailableWithoutLoginForArrayConstraintsFromSetAvailableWithoutLogin($availableWithoutLogin))) {
            throw new \InvalidArgumentException($availableWithoutLoginArrayErrorMessage, __LINE__);
        }
        $this->availableWithoutLogin = $availableWithoutLogin;
        return $this;
    }
    /**
     * Add item to availableWithoutLogin value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToAvailableWithoutLogin(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The availableWithoutLogin 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->availableWithoutLogin[] = $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 $fileSearchRowBasicCreatedItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicCreatedItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($fileSearchRowBasicCreatedItem) ? get_class($fileSearchRowBasicCreatedItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicCreatedItem), var_export($fileSearchRowBasicCreatedItem, 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\FileSearchRowBasic
     */
    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\FileSearchRowBasic
     */
    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 dateViewed value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getDateViewed()
    {
        return $this->dateViewed;
    }
    /**
     * This method is responsible for validating the values passed to the setDateViewed method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDateViewed method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDateViewedForArrayConstraintsFromSetDateViewed(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicDateViewedItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicDateViewedItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($fileSearchRowBasicDateViewedItem) ? get_class($fileSearchRowBasicDateViewedItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicDateViewedItem), var_export($fileSearchRowBasicDateViewedItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The dateViewed 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 dateViewed value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $dateViewed
     * @return \StructType\FileSearchRowBasic
     */
    public function setDateViewed(array $dateViewed = array())
    {
        // validation for constraint: array
        if ('' !== ($dateViewedArrayErrorMessage = self::validateDateViewedForArrayConstraintsFromSetDateViewed($dateViewed))) {
            throw new \InvalidArgumentException($dateViewedArrayErrorMessage, __LINE__);
        }
        $this->dateViewed = $dateViewed;
        return $this;
    }
    /**
     * Add item to dateViewed value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToDateViewed(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The dateViewed 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->dateViewed[] = $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 $fileSearchRowBasicDescriptionItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicDescriptionItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($fileSearchRowBasicDescriptionItem) ? get_class($fileSearchRowBasicDescriptionItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicDescriptionItem), var_export($fileSearchRowBasicDescriptionItem, 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\FileSearchRowBasic
     */
    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\FileSearchRowBasic
     */
    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 documentSize value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getDocumentSize()
    {
        return $this->documentSize;
    }
    /**
     * This method is responsible for validating the values passed to the setDocumentSize method
     * This method is willingly generated in order to preserve the one-line inline validation within the setDocumentSize method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateDocumentSizeForArrayConstraintsFromSetDocumentSize(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicDocumentSizeItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicDocumentSizeItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($fileSearchRowBasicDocumentSizeItem) ? get_class($fileSearchRowBasicDocumentSizeItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicDocumentSizeItem), var_export($fileSearchRowBasicDocumentSizeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The documentSize 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 documentSize value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $documentSize
     * @return \StructType\FileSearchRowBasic
     */
    public function setDocumentSize(array $documentSize = array())
    {
        // validation for constraint: array
        if ('' !== ($documentSizeArrayErrorMessage = self::validateDocumentSizeForArrayConstraintsFromSetDocumentSize($documentSize))) {
            throw new \InvalidArgumentException($documentSizeArrayErrorMessage, __LINE__);
        }
        $this->documentSize = $documentSize;
        return $this;
    }
    /**
     * Add item to documentSize value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToDocumentSize(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The documentSize 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->documentSize[] = $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 $fileSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($fileSearchRowBasicExternalIdItem) ? get_class($fileSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicExternalIdItem), var_export($fileSearchRowBasicExternalIdItem, 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\FileSearchRowBasic
     */
    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\FileSearchRowBasic
     */
    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 fileType value
     * @return \StructType\SearchColumnEnumSelectField[]|null
     */
    public function getFileType()
    {
        return $this->fileType;
    }
    /**
     * This method is responsible for validating the values passed to the setFileType method
     * This method is willingly generated in order to preserve the one-line inline validation within the setFileType method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateFileTypeForArrayConstraintsFromSetFileType(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicFileTypeItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicFileTypeItem instanceof \StructType\SearchColumnEnumSelectField) {
                $invalidValues[] = is_object($fileSearchRowBasicFileTypeItem) ? get_class($fileSearchRowBasicFileTypeItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicFileTypeItem), var_export($fileSearchRowBasicFileTypeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The fileType property can only contain items of type \StructType\SearchColumnEnumSelectField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set fileType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField[] $fileType
     * @return \StructType\FileSearchRowBasic
     */
    public function setFileType(array $fileType = array())
    {
        // validation for constraint: array
        if ('' !== ($fileTypeArrayErrorMessage = self::validateFileTypeForArrayConstraintsFromSetFileType($fileType))) {
            throw new \InvalidArgumentException($fileTypeArrayErrorMessage, __LINE__);
        }
        $this->fileType = $fileType;
        return $this;
    }
    /**
     * Add item to fileType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToFileType(\StructType\SearchColumnEnumSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnEnumSelectField) {
            throw new \InvalidArgumentException(sprintf('The fileType property can only contain items of type \StructType\SearchColumnEnumSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->fileType[] = $item;
        return $this;
    }
    /**
     * Get folder value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getFolder()
    {
        return $this->folder;
    }
    /**
     * This method is responsible for validating the values passed to the setFolder method
     * This method is willingly generated in order to preserve the one-line inline validation within the setFolder method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateFolderForArrayConstraintsFromSetFolder(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicFolderItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicFolderItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($fileSearchRowBasicFolderItem) ? get_class($fileSearchRowBasicFolderItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicFolderItem), var_export($fileSearchRowBasicFolderItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The folder 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 folder value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $folder
     * @return \StructType\FileSearchRowBasic
     */
    public function setFolder(array $folder = array())
    {
        // validation for constraint: array
        if ('' !== ($folderArrayErrorMessage = self::validateFolderForArrayConstraintsFromSetFolder($folder))) {
            throw new \InvalidArgumentException($folderArrayErrorMessage, __LINE__);
        }
        $this->folder = $folder;
        return $this;
    }
    /**
     * Add item to folder value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToFolder(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The folder 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->folder[] = $item;
        return $this;
    }
    /**
     * Get hits value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getHits()
    {
        return $this->hits;
    }
    /**
     * This method is responsible for validating the values passed to the setHits method
     * This method is willingly generated in order to preserve the one-line inline validation within the setHits method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateHitsForArrayConstraintsFromSetHits(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicHitsItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicHitsItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($fileSearchRowBasicHitsItem) ? get_class($fileSearchRowBasicHitsItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicHitsItem), var_export($fileSearchRowBasicHitsItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The hits 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 hits value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $hits
     * @return \StructType\FileSearchRowBasic
     */
    public function setHits(array $hits = array())
    {
        // validation for constraint: array
        if ('' !== ($hitsArrayErrorMessage = self::validateHitsForArrayConstraintsFromSetHits($hits))) {
            throw new \InvalidArgumentException($hitsArrayErrorMessage, __LINE__);
        }
        $this->hits = $hits;
        return $this;
    }
    /**
     * Add item to hits value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToHits(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The hits 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->hits[] = $item;
        return $this;
    }
    /**
     * Get hostedPath value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getHostedPath()
    {
        return $this->hostedPath;
    }
    /**
     * This method is responsible for validating the values passed to the setHostedPath method
     * This method is willingly generated in order to preserve the one-line inline validation within the setHostedPath method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateHostedPathForArrayConstraintsFromSetHostedPath(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicHostedPathItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicHostedPathItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($fileSearchRowBasicHostedPathItem) ? get_class($fileSearchRowBasicHostedPathItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicHostedPathItem), var_export($fileSearchRowBasicHostedPathItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The hostedPath 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 hostedPath value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $hostedPath
     * @return \StructType\FileSearchRowBasic
     */
    public function setHostedPath(array $hostedPath = array())
    {
        // validation for constraint: array
        if ('' !== ($hostedPathArrayErrorMessage = self::validateHostedPathForArrayConstraintsFromSetHostedPath($hostedPath))) {
            throw new \InvalidArgumentException($hostedPathArrayErrorMessage, __LINE__);
        }
        $this->hostedPath = $hostedPath;
        return $this;
    }
    /**
     * Add item to hostedPath value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToHostedPath(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The hostedPath 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->hostedPath[] = $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 $fileSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($fileSearchRowBasicInternalIdItem) ? get_class($fileSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicInternalIdItem), var_export($fileSearchRowBasicInternalIdItem, 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\FileSearchRowBasic
     */
    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\FileSearchRowBasic
     */
    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 isAvailable value
     * @return \StructType\SearchColumnBooleanField[]|null
     */
    public function getIsAvailable()
    {
        return $this->isAvailable;
    }
    /**
     * This method is responsible for validating the values passed to the setIsAvailable method
     * This method is willingly generated in order to preserve the one-line inline validation within the setIsAvailable method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateIsAvailableForArrayConstraintsFromSetIsAvailable(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicIsAvailableItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicIsAvailableItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($fileSearchRowBasicIsAvailableItem) ? get_class($fileSearchRowBasicIsAvailableItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicIsAvailableItem), var_export($fileSearchRowBasicIsAvailableItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The isAvailable 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 isAvailable value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField[] $isAvailable
     * @return \StructType\FileSearchRowBasic
     */
    public function setIsAvailable(array $isAvailable = array())
    {
        // validation for constraint: array
        if ('' !== ($isAvailableArrayErrorMessage = self::validateIsAvailableForArrayConstraintsFromSetIsAvailable($isAvailable))) {
            throw new \InvalidArgumentException($isAvailableArrayErrorMessage, __LINE__);
        }
        $this->isAvailable = $isAvailable;
        return $this;
    }
    /**
     * Add item to isAvailable value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnBooleanField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToIsAvailable(\StructType\SearchColumnBooleanField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnBooleanField) {
            throw new \InvalidArgumentException(sprintf('The isAvailable 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->isAvailable[] = $item;
        return $this;
    }
    /**
     * Get modified value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getModified()
    {
        return $this->modified;
    }
    /**
     * This method is responsible for validating the values passed to the setModified method
     * This method is willingly generated in order to preserve the one-line inline validation within the setModified method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateModifiedForArrayConstraintsFromSetModified(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicModifiedItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicModifiedItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($fileSearchRowBasicModifiedItem) ? get_class($fileSearchRowBasicModifiedItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicModifiedItem), var_export($fileSearchRowBasicModifiedItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The modified 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 modified value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $modified
     * @return \StructType\FileSearchRowBasic
     */
    public function setModified(array $modified = array())
    {
        // validation for constraint: array
        if ('' !== ($modifiedArrayErrorMessage = self::validateModifiedForArrayConstraintsFromSetModified($modified))) {
            throw new \InvalidArgumentException($modifiedArrayErrorMessage, __LINE__);
        }
        $this->modified = $modified;
        return $this;
    }
    /**
     * Add item to modified value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToModified(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The modified 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->modified[] = $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 $fileSearchRowBasicNameItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($fileSearchRowBasicNameItem) ? get_class($fileSearchRowBasicNameItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicNameItem), var_export($fileSearchRowBasicNameItem, 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\FileSearchRowBasic
     */
    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\FileSearchRowBasic
     */
    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 $fileSearchRowBasicOwnerItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicOwnerItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($fileSearchRowBasicOwnerItem) ? get_class($fileSearchRowBasicOwnerItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicOwnerItem), var_export($fileSearchRowBasicOwnerItem, 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\FileSearchRowBasic
     */
    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\FileSearchRowBasic
     */
    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 url value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getUrl()
    {
        return $this->url;
    }
    /**
     * This method is responsible for validating the values passed to the setUrl method
     * This method is willingly generated in order to preserve the one-line inline validation within the setUrl method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateUrlForArrayConstraintsFromSetUrl(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $fileSearchRowBasicUrlItem) {
            // validation for constraint: itemType
            if (!$fileSearchRowBasicUrlItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($fileSearchRowBasicUrlItem) ? get_class($fileSearchRowBasicUrlItem) : sprintf('%s(%s)', gettype($fileSearchRowBasicUrlItem), var_export($fileSearchRowBasicUrlItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The url 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 url value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $url
     * @return \StructType\FileSearchRowBasic
     */
    public function setUrl(array $url = array())
    {
        // validation for constraint: array
        if ('' !== ($urlArrayErrorMessage = self::validateUrlForArrayConstraintsFromSetUrl($url))) {
            throw new \InvalidArgumentException($urlArrayErrorMessage, __LINE__);
        }
        $this->url = $url;
        return $this;
    }
    /**
     * Add item to url value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\FileSearchRowBasic
     */
    public function addToUrl(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The url 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->url[] = $item;
        return $this;
    }
}
