<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BomRevisionComponentSearchRowBasic StructType
 * @subpackage Structs
 */
class BomRevisionComponentSearchRowBasic extends SearchRowBasic
{
    /**
     * The bomQuantity
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDoubleField[]
     */
    public $bomQuantity;
    /**
     * The bomRevision
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $bomRevision;
    /**
     * The componentYield
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDoubleField[]
     */
    public $componentYield;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $description;
    /**
     * The internalId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $internalId;
    /**
     * The item
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $item;
    /**
     * The itemSource
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnEnumSelectField[]
     */
    public $itemSource;
    /**
     * The itemSubtype
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $itemSubtype;
    /**
     * The itemType
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnSelectField[]
     */
    public $itemType;
    /**
     * The lineId
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnLongField[]
     */
    public $lineId;
    /**
     * The quantity
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDoubleField[]
     */
    public $quantity;
    /**
     * The units
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnStringField[]
     */
    public $units;
    /**
     * The weight
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\SearchColumnDoubleField[]
     */
    public $weight;
    /**
     * The customFieldList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\SearchColumnCustomFieldList
     */
    public $customFieldList;
    /**
     * Constructor method for BomRevisionComponentSearchRowBasic
     * @uses BomRevisionComponentSearchRowBasic::setBomQuantity()
     * @uses BomRevisionComponentSearchRowBasic::setBomRevision()
     * @uses BomRevisionComponentSearchRowBasic::setComponentYield()
     * @uses BomRevisionComponentSearchRowBasic::setDescription()
     * @uses BomRevisionComponentSearchRowBasic::setInternalId()
     * @uses BomRevisionComponentSearchRowBasic::setItem()
     * @uses BomRevisionComponentSearchRowBasic::setItemSource()
     * @uses BomRevisionComponentSearchRowBasic::setItemSubtype()
     * @uses BomRevisionComponentSearchRowBasic::setItemType()
     * @uses BomRevisionComponentSearchRowBasic::setLineId()
     * @uses BomRevisionComponentSearchRowBasic::setQuantity()
     * @uses BomRevisionComponentSearchRowBasic::setUnits()
     * @uses BomRevisionComponentSearchRowBasic::setWeight()
     * @uses BomRevisionComponentSearchRowBasic::setCustomFieldList()
     * @param \StructType\SearchColumnDoubleField[] $bomQuantity
     * @param \StructType\SearchColumnSelectField[] $bomRevision
     * @param \StructType\SearchColumnDoubleField[] $componentYield
     * @param \StructType\SearchColumnStringField[] $description
     * @param \StructType\SearchColumnSelectField[] $internalId
     * @param \StructType\SearchColumnSelectField[] $item
     * @param \StructType\SearchColumnEnumSelectField[] $itemSource
     * @param \StructType\SearchColumnStringField[] $itemSubtype
     * @param \StructType\SearchColumnSelectField[] $itemType
     * @param \StructType\SearchColumnLongField[] $lineId
     * @param \StructType\SearchColumnDoubleField[] $quantity
     * @param \StructType\SearchColumnStringField[] $units
     * @param \StructType\SearchColumnDoubleField[] $weight
     * @param \StructType\SearchColumnCustomFieldList $customFieldList
     */
    public function __construct(array $bomQuantity = array(), array $bomRevision = array(), array $componentYield = array(), array $description = array(), array $internalId = array(), array $item = array(), array $itemSource = array(), array $itemSubtype = array(), array $itemType = array(), array $lineId = array(), array $quantity = array(), array $units = array(), array $weight = array(), \StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this
            ->setBomQuantity($bomQuantity)
            ->setBomRevision($bomRevision)
            ->setComponentYield($componentYield)
            ->setDescription($description)
            ->setInternalId($internalId)
            ->setItem($item)
            ->setItemSource($itemSource)
            ->setItemSubtype($itemSubtype)
            ->setItemType($itemType)
            ->setLineId($lineId)
            ->setQuantity($quantity)
            ->setUnits($units)
            ->setWeight($weight)
            ->setCustomFieldList($customFieldList);
    }
    /**
     * Get bomQuantity value
     * @return \StructType\SearchColumnDoubleField[]|null
     */
    public function getBomQuantity()
    {
        return $this->bomQuantity;
    }
    /**
     * This method is responsible for validating the values passed to the setBomQuantity method
     * This method is willingly generated in order to preserve the one-line inline validation within the setBomQuantity method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateBomQuantityForArrayConstraintsFromSetBomQuantity(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicBomQuantityItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicBomQuantityItem instanceof \StructType\SearchColumnDoubleField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicBomQuantityItem) ? get_class($bomRevisionComponentSearchRowBasicBomQuantityItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicBomQuantityItem), var_export($bomRevisionComponentSearchRowBasicBomQuantityItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The bomQuantity property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set bomQuantity value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField[] $bomQuantity
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setBomQuantity(array $bomQuantity = array())
    {
        // validation for constraint: array
        if ('' !== ($bomQuantityArrayErrorMessage = self::validateBomQuantityForArrayConstraintsFromSetBomQuantity($bomQuantity))) {
            throw new \InvalidArgumentException($bomQuantityArrayErrorMessage, __LINE__);
        }
        $this->bomQuantity = $bomQuantity;
        return $this;
    }
    /**
     * Add item to bomQuantity value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToBomQuantity(\StructType\SearchColumnDoubleField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDoubleField) {
            throw new \InvalidArgumentException(sprintf('The bomQuantity property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->bomQuantity[] = $item;
        return $this;
    }
    /**
     * Get bomRevision value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getBomRevision()
    {
        return $this->bomRevision;
    }
    /**
     * This method is responsible for validating the values passed to the setBomRevision method
     * This method is willingly generated in order to preserve the one-line inline validation within the setBomRevision method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateBomRevisionForArrayConstraintsFromSetBomRevision(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicBomRevisionItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicBomRevisionItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicBomRevisionItem) ? get_class($bomRevisionComponentSearchRowBasicBomRevisionItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicBomRevisionItem), var_export($bomRevisionComponentSearchRowBasicBomRevisionItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The bomRevision 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 bomRevision value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $bomRevision
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setBomRevision(array $bomRevision = array())
    {
        // validation for constraint: array
        if ('' !== ($bomRevisionArrayErrorMessage = self::validateBomRevisionForArrayConstraintsFromSetBomRevision($bomRevision))) {
            throw new \InvalidArgumentException($bomRevisionArrayErrorMessage, __LINE__);
        }
        $this->bomRevision = $bomRevision;
        return $this;
    }
    /**
     * Add item to bomRevision value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToBomRevision(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The bomRevision 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->bomRevision[] = $item;
        return $this;
    }
    /**
     * Get componentYield value
     * @return \StructType\SearchColumnDoubleField[]|null
     */
    public function getComponentYield()
    {
        return $this->componentYield;
    }
    /**
     * This method is responsible for validating the values passed to the setComponentYield method
     * This method is willingly generated in order to preserve the one-line inline validation within the setComponentYield method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateComponentYieldForArrayConstraintsFromSetComponentYield(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicComponentYieldItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicComponentYieldItem instanceof \StructType\SearchColumnDoubleField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicComponentYieldItem) ? get_class($bomRevisionComponentSearchRowBasicComponentYieldItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicComponentYieldItem), var_export($bomRevisionComponentSearchRowBasicComponentYieldItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The componentYield property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set componentYield value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField[] $componentYield
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setComponentYield(array $componentYield = array())
    {
        // validation for constraint: array
        if ('' !== ($componentYieldArrayErrorMessage = self::validateComponentYieldForArrayConstraintsFromSetComponentYield($componentYield))) {
            throw new \InvalidArgumentException($componentYieldArrayErrorMessage, __LINE__);
        }
        $this->componentYield = $componentYield;
        return $this;
    }
    /**
     * Add item to componentYield value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToComponentYield(\StructType\SearchColumnDoubleField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDoubleField) {
            throw new \InvalidArgumentException(sprintf('The componentYield property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->componentYield[] = $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 $bomRevisionComponentSearchRowBasicDescriptionItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicDescriptionItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicDescriptionItem) ? get_class($bomRevisionComponentSearchRowBasicDescriptionItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicDescriptionItem), var_export($bomRevisionComponentSearchRowBasicDescriptionItem, 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\BomRevisionComponentSearchRowBasic
     */
    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\BomRevisionComponentSearchRowBasic
     */
    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 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 $bomRevisionComponentSearchRowBasicInternalIdItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicInternalIdItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicInternalIdItem) ? get_class($bomRevisionComponentSearchRowBasicInternalIdItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicInternalIdItem), var_export($bomRevisionComponentSearchRowBasicInternalIdItem, 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\BomRevisionComponentSearchRowBasic
     */
    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\BomRevisionComponentSearchRowBasic
     */
    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 item value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getItem()
    {
        return $this->item;
    }
    /**
     * This method is responsible for validating the values passed to the setItem method
     * This method is willingly generated in order to preserve the one-line inline validation within the setItem method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateItemForArrayConstraintsFromSetItem(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicItemItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicItemItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicItemItem) ? get_class($bomRevisionComponentSearchRowBasicItemItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicItemItem), var_export($bomRevisionComponentSearchRowBasicItemItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The item 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 item value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setItem(array $item = array())
    {
        // validation for constraint: array
        if ('' !== ($itemArrayErrorMessage = self::validateItemForArrayConstraintsFromSetItem($item))) {
            throw new \InvalidArgumentException($itemArrayErrorMessage, __LINE__);
        }
        $this->item = $item;
        return $this;
    }
    /**
     * Add item to item value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToItem(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The item 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->item[] = $item;
        return $this;
    }
    /**
     * Get itemSource value
     * @return \StructType\SearchColumnEnumSelectField[]|null
     */
    public function getItemSource()
    {
        return $this->itemSource;
    }
    /**
     * This method is responsible for validating the values passed to the setItemSource method
     * This method is willingly generated in order to preserve the one-line inline validation within the setItemSource method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateItemSourceForArrayConstraintsFromSetItemSource(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicItemSourceItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicItemSourceItem instanceof \StructType\SearchColumnEnumSelectField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicItemSourceItem) ? get_class($bomRevisionComponentSearchRowBasicItemSourceItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicItemSourceItem), var_export($bomRevisionComponentSearchRowBasicItemSourceItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The itemSource 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 itemSource value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField[] $itemSource
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setItemSource(array $itemSource = array())
    {
        // validation for constraint: array
        if ('' !== ($itemSourceArrayErrorMessage = self::validateItemSourceForArrayConstraintsFromSetItemSource($itemSource))) {
            throw new \InvalidArgumentException($itemSourceArrayErrorMessage, __LINE__);
        }
        $this->itemSource = $itemSource;
        return $this;
    }
    /**
     * Add item to itemSource value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnEnumSelectField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToItemSource(\StructType\SearchColumnEnumSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnEnumSelectField) {
            throw new \InvalidArgumentException(sprintf('The itemSource 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->itemSource[] = $item;
        return $this;
    }
    /**
     * Get itemSubtype value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getItemSubtype()
    {
        return $this->itemSubtype;
    }
    /**
     * This method is responsible for validating the values passed to the setItemSubtype method
     * This method is willingly generated in order to preserve the one-line inline validation within the setItemSubtype method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateItemSubtypeForArrayConstraintsFromSetItemSubtype(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicItemSubtypeItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicItemSubtypeItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicItemSubtypeItem) ? get_class($bomRevisionComponentSearchRowBasicItemSubtypeItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicItemSubtypeItem), var_export($bomRevisionComponentSearchRowBasicItemSubtypeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The itemSubtype 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 itemSubtype value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $itemSubtype
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setItemSubtype(array $itemSubtype = array())
    {
        // validation for constraint: array
        if ('' !== ($itemSubtypeArrayErrorMessage = self::validateItemSubtypeForArrayConstraintsFromSetItemSubtype($itemSubtype))) {
            throw new \InvalidArgumentException($itemSubtypeArrayErrorMessage, __LINE__);
        }
        $this->itemSubtype = $itemSubtype;
        return $this;
    }
    /**
     * Add item to itemSubtype value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToItemSubtype(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The itemSubtype 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->itemSubtype[] = $item;
        return $this;
    }
    /**
     * Get itemType value
     * @return \StructType\SearchColumnSelectField[]|null
     */
    public function getItemType()
    {
        return $this->itemType;
    }
    /**
     * This method is responsible for validating the values passed to the setItemType method
     * This method is willingly generated in order to preserve the one-line inline validation within the setItemType method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateItemTypeForArrayConstraintsFromSetItemType(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicItemTypeItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicItemTypeItem instanceof \StructType\SearchColumnSelectField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicItemTypeItem) ? get_class($bomRevisionComponentSearchRowBasicItemTypeItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicItemTypeItem), var_export($bomRevisionComponentSearchRowBasicItemTypeItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The itemType 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 itemType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField[] $itemType
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setItemType(array $itemType = array())
    {
        // validation for constraint: array
        if ('' !== ($itemTypeArrayErrorMessage = self::validateItemTypeForArrayConstraintsFromSetItemType($itemType))) {
            throw new \InvalidArgumentException($itemTypeArrayErrorMessage, __LINE__);
        }
        $this->itemType = $itemType;
        return $this;
    }
    /**
     * Add item to itemType value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnSelectField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToItemType(\StructType\SearchColumnSelectField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnSelectField) {
            throw new \InvalidArgumentException(sprintf('The itemType 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->itemType[] = $item;
        return $this;
    }
    /**
     * Get lineId value
     * @return \StructType\SearchColumnLongField[]|null
     */
    public function getLineId()
    {
        return $this->lineId;
    }
    /**
     * This method is responsible for validating the values passed to the setLineId method
     * This method is willingly generated in order to preserve the one-line inline validation within the setLineId method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateLineIdForArrayConstraintsFromSetLineId(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicLineIdItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicLineIdItem instanceof \StructType\SearchColumnLongField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicLineIdItem) ? get_class($bomRevisionComponentSearchRowBasicLineIdItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicLineIdItem), var_export($bomRevisionComponentSearchRowBasicLineIdItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The lineId 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 lineId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField[] $lineId
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setLineId(array $lineId = array())
    {
        // validation for constraint: array
        if ('' !== ($lineIdArrayErrorMessage = self::validateLineIdForArrayConstraintsFromSetLineId($lineId))) {
            throw new \InvalidArgumentException($lineIdArrayErrorMessage, __LINE__);
        }
        $this->lineId = $lineId;
        return $this;
    }
    /**
     * Add item to lineId value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnLongField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToLineId(\StructType\SearchColumnLongField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnLongField) {
            throw new \InvalidArgumentException(sprintf('The lineId 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->lineId[] = $item;
        return $this;
    }
    /**
     * Get quantity value
     * @return \StructType\SearchColumnDoubleField[]|null
     */
    public function getQuantity()
    {
        return $this->quantity;
    }
    /**
     * This method is responsible for validating the values passed to the setQuantity method
     * This method is willingly generated in order to preserve the one-line inline validation within the setQuantity method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateQuantityForArrayConstraintsFromSetQuantity(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicQuantityItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicQuantityItem instanceof \StructType\SearchColumnDoubleField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicQuantityItem) ? get_class($bomRevisionComponentSearchRowBasicQuantityItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicQuantityItem), var_export($bomRevisionComponentSearchRowBasicQuantityItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The quantity property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set quantity value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField[] $quantity
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setQuantity(array $quantity = array())
    {
        // validation for constraint: array
        if ('' !== ($quantityArrayErrorMessage = self::validateQuantityForArrayConstraintsFromSetQuantity($quantity))) {
            throw new \InvalidArgumentException($quantityArrayErrorMessage, __LINE__);
        }
        $this->quantity = $quantity;
        return $this;
    }
    /**
     * Add item to quantity value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToQuantity(\StructType\SearchColumnDoubleField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDoubleField) {
            throw new \InvalidArgumentException(sprintf('The quantity property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->quantity[] = $item;
        return $this;
    }
    /**
     * Get units value
     * @return \StructType\SearchColumnStringField[]|null
     */
    public function getUnits()
    {
        return $this->units;
    }
    /**
     * This method is responsible for validating the values passed to the setUnits method
     * This method is willingly generated in order to preserve the one-line inline validation within the setUnits method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateUnitsForArrayConstraintsFromSetUnits(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicUnitsItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicUnitsItem instanceof \StructType\SearchColumnStringField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicUnitsItem) ? get_class($bomRevisionComponentSearchRowBasicUnitsItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicUnitsItem), var_export($bomRevisionComponentSearchRowBasicUnitsItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The units 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 units value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField[] $units
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setUnits(array $units = array())
    {
        // validation for constraint: array
        if ('' !== ($unitsArrayErrorMessage = self::validateUnitsForArrayConstraintsFromSetUnits($units))) {
            throw new \InvalidArgumentException($unitsArrayErrorMessage, __LINE__);
        }
        $this->units = $units;
        return $this;
    }
    /**
     * Add item to units value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnStringField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToUnits(\StructType\SearchColumnStringField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnStringField) {
            throw new \InvalidArgumentException(sprintf('The units 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->units[] = $item;
        return $this;
    }
    /**
     * Get weight value
     * @return \StructType\SearchColumnDoubleField[]|null
     */
    public function getWeight()
    {
        return $this->weight;
    }
    /**
     * This method is responsible for validating the values passed to the setWeight method
     * This method is willingly generated in order to preserve the one-line inline validation within the setWeight method
     * @param array $values
     * @return string A non-empty message if the values does not match the validation rules
     */
    public static function validateWeightForArrayConstraintsFromSetWeight(array $values = array())
    {
        $message = '';
        $invalidValues = [];
        foreach ($values as $bomRevisionComponentSearchRowBasicWeightItem) {
            // validation for constraint: itemType
            if (!$bomRevisionComponentSearchRowBasicWeightItem instanceof \StructType\SearchColumnDoubleField) {
                $invalidValues[] = is_object($bomRevisionComponentSearchRowBasicWeightItem) ? get_class($bomRevisionComponentSearchRowBasicWeightItem) : sprintf('%s(%s)', gettype($bomRevisionComponentSearchRowBasicWeightItem), var_export($bomRevisionComponentSearchRowBasicWeightItem, true));
            }
        }
        if (!empty($invalidValues)) {
            $message = sprintf('The weight property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
        }
        unset($invalidValues);
        return $message;
    }
    /**
     * Set weight value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField[] $weight
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function setWeight(array $weight = array())
    {
        // validation for constraint: array
        if ('' !== ($weightArrayErrorMessage = self::validateWeightForArrayConstraintsFromSetWeight($weight))) {
            throw new \InvalidArgumentException($weightArrayErrorMessage, __LINE__);
        }
        $this->weight = $weight;
        return $this;
    }
    /**
     * Add item to weight value
     * @throws \InvalidArgumentException
     * @param \StructType\SearchColumnDoubleField $item
     * @return \StructType\BomRevisionComponentSearchRowBasic
     */
    public function addToWeight(\StructType\SearchColumnDoubleField $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\SearchColumnDoubleField) {
            throw new \InvalidArgumentException(sprintf('The weight property can only contain items of type \StructType\SearchColumnDoubleField, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
        }
        $this->weight[] = $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\BomRevisionComponentSearchRowBasic
     */
    public function setCustomFieldList(\StructType\SearchColumnCustomFieldList $customFieldList = null)
    {
        $this->customFieldList = $customFieldList;
        return $this;
    }
}
