<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_VehResRQVehResRQCore StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_VehResRQVehResRQCore extends DgVehicleReservationRQCoreType
{
    /**
     * The OptionChangeIndicator
     * @var bool
     */
    public $OptionChangeIndicator;
    /**
     * Constructor method for OTA_VehResRQVehResRQCore
     * @uses DgOTA_VehResRQVehResRQCore::setOptionChangeIndicator()
     * @param bool $optionChangeIndicator
     */
    public function __construct($optionChangeIndicator = null)
    {
        $this
            ->setOptionChangeIndicator($optionChangeIndicator);
    }
    /**
     * Get OptionChangeIndicator value
     * @return bool|null
     */
    public function getOptionChangeIndicator()
    {
        return $this->OptionChangeIndicator;
    }
    /**
     * Set OptionChangeIndicator value
     * @param bool $optionChangeIndicator
     * @return \dgsoft\StructType\DgOTA_VehResRQVehResRQCore
     */
    public function setOptionChangeIndicator($optionChangeIndicator = null)
    {
        // validation for constraint: boolean
        if (!is_null($optionChangeIndicator) && !is_bool($optionChangeIndicator)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($optionChangeIndicator)), __LINE__);
        }
        $this->OptionChangeIndicator = $optionChangeIndicator;
        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\DgOTA_VehResRQVehResRQCore
     */
    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__;
    }
}
