<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BomRevisionSearchRowBasic StructType
 * @subpackage Structs
 */
class BomRevisionSearchRowBasic extends SearchRowBasic
{
    /**
     * The billOfMaterials
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $billOfMaterials;
    /**
     * The createdDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $createdDate;
    /**
     * The effectiveEndDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $effectiveEndDate;
    /**
     * The effectiveStartDate
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDateField[]
     */
    public $effectiveStartDate;
    /**
     * The externalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $externalId;
    /**
     * The internalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $internalId;
    /**
     * The isInactive
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnBooleanField[]
     */
    public $isInactive;
    /**
     * The memo
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $memo;
    /**
     * The name
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $name;
    /**
     * The customFieldList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SearchColumnCustomFieldList
     */
    public $customFieldList;
    /**
     * Constructor method for BomRevisionSearchRowBasic
     * @uses BomRevisionSearchRowBasic::setBillOfMaterials()
     * @uses BomRevisionSearchRowBasic::setCreatedDate()
     * @uses BomRevisionSearchRowBasic::setEffectiveEndDate()
     * @uses BomRevisionSearchRowBasic::setEffectiveStartDate()
     * @uses BomRevisionSearchRowBasic::setExternalId()
     * @uses BomRevisionSearchRowBasic::setInternalId()
     * @uses BomRevisionSearchRowBasic::setIsInactive()
     * @uses BomRevisionSearchRowBasic::setMemo()
     * @uses BomRevisionSearchRowBasic::setName()
     * @uses BomRevisionSearchRowBasic::setCustomFieldList()
     * @param \StructType\SearchColumnSelectField[] $billOfMaterials
     * @param \StructType\SearchColumnDateField[] $createdDate
     * @param \StructType\SearchColumnDateField[] $effectiveEndDate
     * @param \StructType\SearchColumnDateField[] $effectiveStartDate
     * @param \StructType\SearchColumnSelectField[] $externalId
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnBooleanField[] $isInactive
     * @param \StructType\SearchColumnStringField[] $memo
     * @param \StructType\SearchColumnStringField[] $name
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     */
    public function __construct(array $billOfMaterials = array(), array $createdDate = array(), array $effectiveEndDate = array(), array $effectiveStartDate = array(), array $externalId = array(), array $internalId = array(), array $isInactive = array(), array $memo = array(), array $name = array(), \StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this
            ->setBillOfMaterials($billOfMaterials)
            ->setCreatedDate($createdDate)
            ->setEffectiveEndDate($effectiveEndDate)
            ->setEffectiveStartDate($effectiveStartDate)
            ->setExternalId($externalId)
            ->setInternalId($internalId)
            ->setIsInactive($isInactive)
            ->setMemo($memo)
            ->setName($name)
            ->setCustomFieldList($customFieldList);
    }
    /**
     * Get billOfMaterials value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getBillOfMaterials()
    {
        return $this->billOfMaterials;
    }
    /**
     * This method is responsible for validating the values passed to the setBillOfMaterials method
     * This method is willingly generated in order to preserve the one-line inline validation within the setBillOfMaterials method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateBillOfMaterialsForArrayConstraintsFromSetBillOfMaterials(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionSearchRowBasicBillOfMaterialsItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicBillOfMaterialsItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicBillOfMaterialsItem) ? get_class($bomRevisionSearchRowBasicBillOfMaterialsItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicBillOfMaterialsItem), var_export($bomRevisionSearchRowBasicBillOfMaterialsItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The billOfMaterials 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 billOfMaterials value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $billOfMaterials
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function setBillOfMaterials(array $billOfMaterials = array())
    {
        // validation for constraint: array
        if ('' !== ($billOfMaterialsArrayErrorMessage = self::validateBillOfMaterialsForArrayConstraintsFromSetBillOfMaterials($billOfMaterials))) {
            throw new \InvalidArgumentException($billOfMaterialsArrayErrorMessage, __LINE__);
        }
        $this->billOfMaterials = $billOfMaterials;
        return $this;
    }
    /**
     * Add item to billOfMaterials value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function addToBillOfMaterials(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The billOfMaterials 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->billOfMaterials[] = $item;
        return $this;
    }
    /**
     * Get createdDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getCreatedDate()
    {
        return $this->createdDate;
    }
    /**
     * This method is responsible for validating the values passed to the setCreatedDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setCreatedDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateCreatedDateForArrayConstraintsFromSetCreatedDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionSearchRowBasicCreatedDateItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicCreatedDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicCreatedDateItem) ? get_class($bomRevisionSearchRowBasicCreatedDateItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicCreatedDateItem), var_export($bomRevisionSearchRowBasicCreatedDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The createdDate 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 createdDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $createdDate
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function setCreatedDate(array $createdDate = array())
    {
        // validation for constraint: array
        if ('' !== ($createdDateArrayErrorMessage = self::validateCreatedDateForArrayConstraintsFromSetCreatedDate($createdDate))) {
            throw new \InvalidArgumentException($createdDateArrayErrorMessage, __LINE__);
        }
        $this->createdDate = $createdDate;
        return $this;
    }
    /**
     * Add item to createdDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function addToCreatedDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The createdDate 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->createdDate[] = $item;
        return $this;
    }
    /**
     * Get effectiveEndDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getEffectiveEndDate()
    {
        return $this->effectiveEndDate;
    }
    /**
     * This method is responsible for validating the values passed to the setEffectiveEndDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setEffectiveEndDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateEffectiveEndDateForArrayConstraintsFromSetEffectiveEndDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionSearchRowBasicEffectiveEndDateItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicEffectiveEndDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicEffectiveEndDateItem) ? get_class($bomRevisionSearchRowBasicEffectiveEndDateItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicEffectiveEndDateItem), var_export($bomRevisionSearchRowBasicEffectiveEndDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The effectiveEndDate 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 effectiveEndDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $effectiveEndDate
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function setEffectiveEndDate(array $effectiveEndDate = array())
    {
        // validation for constraint: array
        if ('' !== ($effectiveEndDateArrayErrorMessage = self::validateEffectiveEndDateForArrayConstraintsFromSetEffectiveEndDate($effectiveEndDate))) {
            throw new \InvalidArgumentException($effectiveEndDateArrayErrorMessage, __LINE__);
        }
        $this->effectiveEndDate = $effectiveEndDate;
        return $this;
    }
    /**
     * Add item to effectiveEndDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function addToEffectiveEndDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The effectiveEndDate 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->effectiveEndDate[] = $item;
        return $this;
    }
    /**
     * Get effectiveStartDate value
     * @return \StructType\SearchColumnDateField[]|null
     */
    public function getEffectiveStartDate()
    {
        return $this->effectiveStartDate;
    }
    /**
     * This method is responsible for validating the values passed to the setEffectiveStartDate method
     * This method is willingly generated in order to preserve the one-line inline validation within the setEffectiveStartDate method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateEffectiveStartDateForArrayConstraintsFromSetEffectiveStartDate(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionSearchRowBasicEffectiveStartDateItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicEffectiveStartDateItem instanceof \StructType\SearchColumnDateField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicEffectiveStartDateItem) ? get_class($bomRevisionSearchRowBasicEffectiveStartDateItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicEffectiveStartDateItem), var_export($bomRevisionSearchRowBasicEffectiveStartDateItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The effectiveStartDate 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 effectiveStartDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField[] $effectiveStartDate
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function setEffectiveStartDate(array $effectiveStartDate = array())
    {
        // validation for constraint: array
        if ('' !== ($effectiveStartDateArrayErrorMessage = self::validateEffectiveStartDateForArrayConstraintsFromSetEffectiveStartDate($effectiveStartDate))) {
            throw new \InvalidArgumentException($effectiveStartDateArrayErrorMessage, __LINE__);
        }
        $this->effectiveStartDate = $effectiveStartDate;
        return $this;
    }
    /**
     * Add item to effectiveStartDate value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDateField $item
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function addToEffectiveStartDate(\StructType\SearchColumnDateField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDateField) {
            throw new \InvalidArgumentException(sprintf('The effectiveStartDate 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->effectiveStartDate[] = $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 $bomRevisionSearchRowBasicExternalIdItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicExternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicExternalIdItem) ? get_class($bomRevisionSearchRowBasicExternalIdItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicExternalIdItem), var_export($bomRevisionSearchRowBasicExternalIdItem, 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\BomRevisionSearchRowBasic
     */
    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\BomRevisionSearchRowBasic
     */
    public function addToExternalId(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The externalId property can only contain items of type \StructType\SearchColumnSelectField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->externalId[] = $item;
        return $this;
    }
    /**
     * Get internalId value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getInternalId()
    {
        return $this->internalId;
    }
    /**
     * This method is responsible for validating the values passed to the setInternalId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setInternalId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateInternalIdForArrayConstraintsFromSetInternalId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicInternalIdItem) ? get_class($bomRevisionSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicInternalIdItem), var_export($bomRevisionSearchRowBasicInternalIdItem, 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\BomRevisionSearchRowBasic
     */
    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\BomRevisionSearchRowBasic
     */
    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 $bomRevisionSearchRowBasicIsInactiveItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicIsInactiveItem instanceof \StructType\SearchColumnBooleanField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicIsInactiveItem) ? get_class($bomRevisionSearchRowBasicIsInactiveItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicIsInactiveItem), var_export($bomRevisionSearchRowBasicIsInactiveItem, 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\BomRevisionSearchRowBasic
     */
    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\BomRevisionSearchRowBasic
     */
    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 memo value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getMemo()
    {
        return $this->memo;
    }
    /**
     * This method is responsible for validating the values passed to the setMemo method
     * This method is willingly generated in order to preserve the one-line inline validation within the setMemo method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateMemoForArrayConstraintsFromSetMemo(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionSearchRowBasicMemoItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicMemoItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicMemoItem) ? get_class($bomRevisionSearchRowBasicMemoItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicMemoItem), var_export($bomRevisionSearchRowBasicMemoItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The memo 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 memo value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $memo
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function setMemo(array $memo = array())
    {
        // validation for constraint: array
        if ('' !== ($memoArrayErrorMessage = self::validateMemoForArrayConstraintsFromSetMemo($memo))) {
            throw new \InvalidArgumentException($memoArrayErrorMessage, __LINE__);
        }
        $this->memo = $memo;
        return $this;
    }
    /**
     * Add item to memo value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function addToMemo(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The memo 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->memo[] = $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 $bomRevisionSearchRowBasicNameItem) {
            // validation for constraint: itemType
            if (!$bomRevisionSearchRowBasicNameItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($bomRevisionSearchRowBasicNameItem) ? get_class($bomRevisionSearchRowBasicNameItem) : sprintf('%s(%s)', gettype($bomRevisionSearchRowBasicNameItem), var_export($bomRevisionSearchRowBasicNameItem, 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\BomRevisionSearchRowBasic
     */
    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\BomRevisionSearchRowBasic
     */
    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 customFieldList value
     * @return \StructType\SearchColumnCustomFieldList|null
     */
    public function getCustomFieldList()
    {
        return $this->customFieldList;
    }
    /**
     * Set customFieldList value
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     * @return \StructType\BomRevisionSearchRowBasic
     */
    public function setCustomFieldList(\StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this->customFieldList = $customFieldList;
        return $this;
    }
}
