<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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