<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UnitsType StructType
 * Meta information extracted from the WSDL
 * - type: listAcct:UnitsType
 * @subpackage Structs
 */
class UnitsType extends Record
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $name;
    /**
     * The isInactive
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $isInactive;
    /**
     * The uomList
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\UnitsTypeUomList
     */
    public $uomList;
    /**
     * The internalId
     * @var string
     */
    public $internalId;
    /**
     * The externalId
     * @var string
     */
    public $externalId;
    /**
     * Constructor method for UnitsType
     * @uses UnitsType::setName()
     * @uses UnitsType::setIsInactive()
     * @uses UnitsType::setUomList()
     * @uses UnitsType::setInternalId()
     * @uses UnitsType::setExternalId()
     * @param string $name
     * @param bool $isInactive
     * @param \StructType\UnitsTypeUomList $uomList
     * @param string $internalId
     * @param string $externalId
     */
    public function __construct($name = null, $isInactive = null, \StructType\UnitsTypeUomList $uomList = null, $internalId = null, $externalId = null)
    {
        $this
            ->setName($name)
            ->setIsInactive($isInactive)
            ->setUomList($uomList)
            ->setInternalId($internalId)
            ->setExternalId($externalId);
    }
    /**
     * Get name value
     * @return string|null
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \StructType\UnitsType
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->name = $name;
        return $this;
    }
    /**
     * Get isInactive value
     * @return bool|null
     */
    public function getIsInactive()
    {
        return $this->isInactive;
    }
    /**
     * Set isInactive value
     * @param bool $isInactive
     * @return \StructType\UnitsType
     */
    public function setIsInactive($isInactive = null)
    {
        // validation for constraint: boolean
        if (!is_null($isInactive) && !is_bool($isInactive)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isInactive, true), gettype($isInactive)), __LINE__);
        }
        $this->isInactive = $isInactive;
        return $this;
    }
    /**
     * Get uomList value
     * @return \StructType\UnitsTypeUomList|null
     */
    public function getUomList()
    {
        return $this->uomList;
    }
    /**
     * Set uomList value
     * @param \StructType\UnitsTypeUomList $uomList
     * @return \StructType\UnitsType
     */
    public function setUomList(\StructType\UnitsTypeUomList $uomList = null)
    {
        $this->uomList = $uomList;
        return $this;
    }
    /**
     * Get internalId value
     * @return string|null
     */
    public function getInternalId()
    {
        return $this->internalId;
    }
    /**
     * Set internalId value
     * @param string $internalId
     * @return \StructType\UnitsType
     */
    public function setInternalId($internalId = null)
    {
        // validation for constraint: string
        if (!is_null($internalId) && !is_string($internalId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($internalId, true), gettype($internalId)), __LINE__);
        }
        $this->internalId = $internalId;
        return $this;
    }
    /**
     * Get externalId value
     * @return string|null
     */
    public function getExternalId()
    {
        return $this->externalId;
    }
    /**
     * Set externalId value
     * @param string $externalId
     * @return \StructType\UnitsType
     */
    public function setExternalId($externalId = null)
    {
        // validation for constraint: string
        if (!is_null($externalId) && !is_string($externalId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($externalId, true), gettype($externalId)), __LINE__);
        }
        $this->externalId = $externalId;
        return $this;
    }
}
