<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_AirScheduleRSAirItineraryType StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_AirScheduleRSAirItineraryType extends AbstractStructBase
{
    /**
     * The AirITIndex
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var int
     */
    public $AirITIndex;
    /**
     * The OriginDestinationOptions
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_AirScheduleRSOriginDestinationOptions
     */
    public $OriginDestinationOptions;
    /**
     * Constructor method for OTA_AirScheduleRSAirItineraryType
     * @uses DgOTA_AirScheduleRSAirItineraryType::setAirITIndex()
     * @uses DgOTA_AirScheduleRSAirItineraryType::setOriginDestinationOptions()
     * @param int $airITIndex
     * @param \dgsoft\StructType\DgOTA_AirScheduleRSOriginDestinationOptions $originDestinationOptions
     */
    public function __construct($airITIndex = null, \dgsoft\StructType\DgOTA_AirScheduleRSOriginDestinationOptions $originDestinationOptions = null)
    {
        $this
            ->setAirITIndex($airITIndex)
            ->setOriginDestinationOptions($originDestinationOptions);
    }
    /**
     * Get AirITIndex value
     * @return int
     */
    public function getAirITIndex()
    {
        return $this->AirITIndex;
    }
    /**
     * Set AirITIndex value
     * @param int $airITIndex
     * @return \dgsoft\StructType\DgOTA_AirScheduleRSAirItineraryType
     */
    public function setAirITIndex($airITIndex = null)
    {
        // validation for constraint: int
        if (!is_null($airITIndex) && !is_numeric($airITIndex)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($airITIndex)), __LINE__);
        }
        $this->AirITIndex = $airITIndex;
        return $this;
    }
    /**
     * Get OriginDestinationOptions value
     * @return \dgsoft\StructType\DgOTA_AirScheduleRSOriginDestinationOptions|null
     */
    public function getOriginDestinationOptions()
    {
        return $this->OriginDestinationOptions;
    }
    /**
     * Set OriginDestinationOptions value
     * @param \dgsoft\StructType\DgOTA_AirScheduleRSOriginDestinationOptions $originDestinationOptions
     * @return \dgsoft\StructType\DgOTA_AirScheduleRSAirItineraryType
     */
    public function setOriginDestinationOptions(\dgsoft\StructType\DgOTA_AirScheduleRSOriginDestinationOptions $originDestinationOptions = null)
    {
        $this->OriginDestinationOptions = $originDestinationOptions;
        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_AirScheduleRSAirItineraryType
     */
    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__;
    }
}
