<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VehicleReservationTypeVehSegmentCore StructType
 * @package Dg
 * @subpackage Structs
 */
class DgVehicleReservationTypeVehSegmentCore extends DgVehicleSegmentCoreType
{
    /**
     * The OptionChangeAllowedIndicator
     * @var bool
     */
    public $OptionChangeAllowedIndicator;
    /**
     * Constructor method for VehicleReservationTypeVehSegmentCore
     * @uses DgVehicleReservationTypeVehSegmentCore::setOptionChangeAllowedIndicator()
     * @param bool $optionChangeAllowedIndicator
     */
    public function __construct($optionChangeAllowedIndicator = null)
    {
        $this
            ->setOptionChangeAllowedIndicator($optionChangeAllowedIndicator);
    }
    /**
     * Get OptionChangeAllowedIndicator value
     * @return bool|null
     */
    public function getOptionChangeAllowedIndicator()
    {
        return $this->OptionChangeAllowedIndicator;
    }
    /**
     * Set OptionChangeAllowedIndicator value
     * @param bool $optionChangeAllowedIndicator
     * @return \dgsoft\StructType\DgVehicleReservationTypeVehSegmentCore
     */
    public function setOptionChangeAllowedIndicator($optionChangeAllowedIndicator = null)
    {
        // validation for constraint: boolean
        if (!is_null($optionChangeAllowedIndicator) && !is_bool($optionChangeAllowedIndicator)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($optionChangeAllowedIndicator)), __LINE__);
        }
        $this->OptionChangeAllowedIndicator = $optionChangeAllowedIndicator;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \dgsoft\StructType\DgVehicleReservationTypeVehSegmentCore
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
