<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OtherChargePurchaseItemHierarchyVersions StructType
 * @subpackage Structs
 */
class OtherChargePurchaseItemHierarchyVersions extends AbstractStructBase
{
    /**
     * The isIncluded
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $isIncluded;
    /**
     * The hierarchyVersion
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $hierarchyVersion;
    /**
     * The startDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $startDate;
    /**
     * The endDate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $endDate;
    /**
     * The hierarchyNode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $hierarchyNode;
    /**
     * Constructor method for OtherChargePurchaseItemHierarchyVersions
     * @uses OtherChargePurchaseItemHierarchyVersions::setIsIncluded()
     * @uses OtherChargePurchaseItemHierarchyVersions::setHierarchyVersion()
     * @uses OtherChargePurchaseItemHierarchyVersions::setStartDate()
     * @uses OtherChargePurchaseItemHierarchyVersions::setEndDate()
     * @uses OtherChargePurchaseItemHierarchyVersions::setHierarchyNode()
     * @param bool $isIncluded
     * @param \StructType\RecordRef $hierarchyVersion
     * @param string $startDate
     * @param string $endDate
     * @param \StructType\RecordRef $hierarchyNode
     */
    public function __construct($isIncluded = null, \StructType\RecordRef $hierarchyVersion = null, $startDate = null, $endDate = null, \StructType\RecordRef $hierarchyNode = null)
    {
        $this
            ->setIsIncluded($isIncluded)
            ->setHierarchyVersion($hierarchyVersion)
            ->setStartDate($startDate)
            ->setEndDate($endDate)
            ->setHierarchyNode($hierarchyNode);
    }
    /**
     * Get isIncluded value
     * @return bool|null
     */
    public function getIsIncluded()
    {
        return $this->isIncluded;
    }
    /**
     * Set isIncluded value
     * @param bool $isIncluded
     * @return \StructType\OtherChargePurchaseItemHierarchyVersions
     */
    public function setIsIncluded($isIncluded = null)
    {
        // validation for constraint: boolean
        if (!is_null($isIncluded) && !is_bool($isIncluded)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isIncluded, true), gettype($isIncluded)), __LINE__);
        }
        $this->isIncluded = $isIncluded;
        return $this;
    }
    /**
     * Get hierarchyVersion value
     * @return \StructType\RecordRef|null
     */
    public function getHierarchyVersion()
    {
        return $this->hierarchyVersion;
    }
    /**
     * Set hierarchyVersion value
     * @param \StructType\RecordRef $hierarchyVersion
     * @return \StructType\OtherChargePurchaseItemHierarchyVersions
     */
    public function setHierarchyVersion(\StructType\RecordRef $hierarchyVersion = null)
    {
        $this->hierarchyVersion = $hierarchyVersion;
        return $this;
    }
    /**
     * Get startDate value
     * @return string|null
     */
    public function getStartDate()
    {
        return $this->startDate;
    }
    /**
     * Set startDate value
     * @param string $startDate
     * @return \StructType\OtherChargePurchaseItemHierarchyVersions
     */
    public function setStartDate($startDate = null)
    {
        // validation for constraint: string
        if (!is_null($startDate) && !is_string($startDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($startDate, true), gettype($startDate)), __LINE__);
        }
        $this->startDate = $startDate;
        return $this;
    }
    /**
     * Get endDate value
     * @return string|null
     */
    public function getEndDate()
    {
        return $this->endDate;
    }
    /**
     * Set endDate value
     * @param string $endDate
     * @return \StructType\OtherChargePurchaseItemHierarchyVersions
     */
    public function setEndDate($endDate = null)
    {
        // validation for constraint: string
        if (!is_null($endDate) && !is_string($endDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($endDate, true), gettype($endDate)), __LINE__);
        }
        $this->endDate = $endDate;
        return $this;
    }
    /**
     * Get hierarchyNode value
     * @return \StructType\RecordRef|null
     */
    public function getHierarchyNode()
    {
        return $this->hierarchyNode;
    }
    /**
     * Set hierarchyNode value
     * @param \StructType\RecordRef $hierarchyNode
     * @return \StructType\OtherChargePurchaseItemHierarchyVersions
     */
    public function setHierarchyNode(\StructType\RecordRef $hierarchyNode = null)
    {
        $this->hierarchyNode = $hierarchyNode;
        return $this;
    }
}
