<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for FlightOptionRQ StructType
 * @package Dg
 * @subpackage Structs
 */
class DgFlightOptionRQ extends DgGenericFlightRQ
{
    /**
     * The DirectionId
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $DirectionId;
    /**
     * Constructor method for FlightOptionRQ
     * @uses DgFlightOptionRQ::setDirectionId()
     * @param int $directionId
     */
    public function __construct($directionId = null)
    {
        $this
            ->setDirectionId($directionId);
    }
    /**
     * Get DirectionId value
     * @return int
     */
    public function getDirectionId()
    {
        return $this->DirectionId;
    }
    /**
     * Set DirectionId value
     * @param int $directionId
     * @return \dgsoft\StructType\DgFlightOptionRQ
     */
    public function setDirectionId($directionId = null)
    {
        // validation for constraint: int
        if (!is_null($directionId) && !is_numeric($directionId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($directionId)), __LINE__);
        }
        $this->DirectionId = $directionId;
        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\DgFlightOptionRQ
     */
    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__;
    }
}
