<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_AirScheduleRQFlightTypePref StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_AirScheduleRQFlightTypePref extends AbstractStructBase
{
    /**
     * The FlightType
     * @var string
     */
    public $FlightType;
    /**
     * The MaxConnections
     * @var int
     */
    public $MaxConnections;
    /**
     * The NonScheduledFltInfo
     * @var string
     */
    public $NonScheduledFltInfo;
    /**
     * The BackhaulIndicator
     * @var bool
     */
    public $BackhaulIndicator;
    /**
     * The GroundTransportIndicator
     * @var bool
     */
    public $GroundTransportIndicator;
    /**
     * The DirectAndNonStopOnlyInd
     * @var bool
     */
    public $DirectAndNonStopOnlyInd;
    /**
     * The NonStopsOnlyInd
     * @var bool
     */
    public $NonStopsOnlyInd;
    /**
     * The OnlineConnectionsOnlyInd
     * @var bool
     */
    public $OnlineConnectionsOnlyInd;
    /**
     * The RoutingType
     * @var string
     */
    public $RoutingType;
    /**
     * The ExcludeTrainInd
     * @var bool
     */
    public $ExcludeTrainInd;
    /**
     * Constructor method for OTA_AirScheduleRQFlightTypePref
     * @uses DgOTA_AirScheduleRQFlightTypePref::setFlightType()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setMaxConnections()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setNonScheduledFltInfo()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setBackhaulIndicator()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setGroundTransportIndicator()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setDirectAndNonStopOnlyInd()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setNonStopsOnlyInd()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setOnlineConnectionsOnlyInd()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setRoutingType()
     * @uses DgOTA_AirScheduleRQFlightTypePref::setExcludeTrainInd()
     * @param string $flightType
     * @param int $maxConnections
     * @param string $nonScheduledFltInfo
     * @param bool $backhaulIndicator
     * @param bool $groundTransportIndicator
     * @param bool $directAndNonStopOnlyInd
     * @param bool $nonStopsOnlyInd
     * @param bool $onlineConnectionsOnlyInd
     * @param string $routingType
     * @param bool $excludeTrainInd
     */
    public function __construct($flightType = null, $maxConnections = null, $nonScheduledFltInfo = null, $backhaulIndicator = null, $groundTransportIndicator = null, $directAndNonStopOnlyInd = null, $nonStopsOnlyInd = null, $onlineConnectionsOnlyInd = null, $routingType = null, $excludeTrainInd = null)
    {
        $this
            ->setFlightType($flightType)
            ->setMaxConnections($maxConnections)
            ->setNonScheduledFltInfo($nonScheduledFltInfo)
            ->setBackhaulIndicator($backhaulIndicator)
            ->setGroundTransportIndicator($groundTransportIndicator)
            ->setDirectAndNonStopOnlyInd($directAndNonStopOnlyInd)
            ->setNonStopsOnlyInd($nonStopsOnlyInd)
            ->setOnlineConnectionsOnlyInd($onlineConnectionsOnlyInd)
            ->setRoutingType($routingType)
            ->setExcludeTrainInd($excludeTrainInd);
    }
    /**
     * Get FlightType value
     * @return string|null
     */
    public function getFlightType()
    {
        return $this->FlightType;
    }
    /**
     * Set FlightType value
     * @uses \dgsoft\EnumType\DgFlightTypeType::valueIsValid()
     * @uses \dgsoft\EnumType\DgFlightTypeType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $flightType
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setFlightType($flightType = null)
    {
        // validation for constraint: enumeration
        if (!\dgsoft\EnumType\DgFlightTypeType::valueIsValid($flightType)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $flightType, implode(', ', \dgsoft\EnumType\DgFlightTypeType::getValidValues())), __LINE__);
        }
        $this->FlightType = $flightType;
        return $this;
    }
    /**
     * Get MaxConnections value
     * @return int|null
     */
    public function getMaxConnections()
    {
        return $this->MaxConnections;
    }
    /**
     * Set MaxConnections value
     * @param int $maxConnections
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setMaxConnections($maxConnections = null)
    {
        // validation for constraint: int
        if (!is_null($maxConnections) && !is_numeric($maxConnections)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxConnections)), __LINE__);
        }
        $this->MaxConnections = $maxConnections;
        return $this;
    }
    /**
     * Get NonScheduledFltInfo value
     * @return string|null
     */
    public function getNonScheduledFltInfo()
    {
        return $this->NonScheduledFltInfo;
    }
    /**
     * Set NonScheduledFltInfo value
     * @uses \dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefNonScheduledFltInfo::valueIsValid()
     * @uses \dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefNonScheduledFltInfo::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $nonScheduledFltInfo
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setNonScheduledFltInfo($nonScheduledFltInfo = null)
    {
        // validation for constraint: enumeration
        if (!\dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefNonScheduledFltInfo::valueIsValid($nonScheduledFltInfo)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $nonScheduledFltInfo, implode(', ', \dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefNonScheduledFltInfo::getValidValues())), __LINE__);
        }
        $this->NonScheduledFltInfo = $nonScheduledFltInfo;
        return $this;
    }
    /**
     * Get BackhaulIndicator value
     * @return bool|null
     */
    public function getBackhaulIndicator()
    {
        return $this->BackhaulIndicator;
    }
    /**
     * Set BackhaulIndicator value
     * @param bool $backhaulIndicator
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setBackhaulIndicator($backhaulIndicator = null)
    {
        // validation for constraint: boolean
        if (!is_null($backhaulIndicator) && !is_bool($backhaulIndicator)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($backhaulIndicator)), __LINE__);
        }
        $this->BackhaulIndicator = $backhaulIndicator;
        return $this;
    }
    /**
     * Get GroundTransportIndicator value
     * @return bool|null
     */
    public function getGroundTransportIndicator()
    {
        return $this->GroundTransportIndicator;
    }
    /**
     * Set GroundTransportIndicator value
     * @param bool $groundTransportIndicator
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setGroundTransportIndicator($groundTransportIndicator = null)
    {
        // validation for constraint: boolean
        if (!is_null($groundTransportIndicator) && !is_bool($groundTransportIndicator)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($groundTransportIndicator)), __LINE__);
        }
        $this->GroundTransportIndicator = $groundTransportIndicator;
        return $this;
    }
    /**
     * Get DirectAndNonStopOnlyInd value
     * @return bool|null
     */
    public function getDirectAndNonStopOnlyInd()
    {
        return $this->DirectAndNonStopOnlyInd;
    }
    /**
     * Set DirectAndNonStopOnlyInd value
     * @param bool $directAndNonStopOnlyInd
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setDirectAndNonStopOnlyInd($directAndNonStopOnlyInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($directAndNonStopOnlyInd) && !is_bool($directAndNonStopOnlyInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($directAndNonStopOnlyInd)), __LINE__);
        }
        $this->DirectAndNonStopOnlyInd = $directAndNonStopOnlyInd;
        return $this;
    }
    /**
     * Get NonStopsOnlyInd value
     * @return bool|null
     */
    public function getNonStopsOnlyInd()
    {
        return $this->NonStopsOnlyInd;
    }
    /**
     * Set NonStopsOnlyInd value
     * @param bool $nonStopsOnlyInd
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setNonStopsOnlyInd($nonStopsOnlyInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($nonStopsOnlyInd) && !is_bool($nonStopsOnlyInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($nonStopsOnlyInd)), __LINE__);
        }
        $this->NonStopsOnlyInd = $nonStopsOnlyInd;
        return $this;
    }
    /**
     * Get OnlineConnectionsOnlyInd value
     * @return bool|null
     */
    public function getOnlineConnectionsOnlyInd()
    {
        return $this->OnlineConnectionsOnlyInd;
    }
    /**
     * Set OnlineConnectionsOnlyInd value
     * @param bool $onlineConnectionsOnlyInd
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setOnlineConnectionsOnlyInd($onlineConnectionsOnlyInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($onlineConnectionsOnlyInd) && !is_bool($onlineConnectionsOnlyInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($onlineConnectionsOnlyInd)), __LINE__);
        }
        $this->OnlineConnectionsOnlyInd = $onlineConnectionsOnlyInd;
        return $this;
    }
    /**
     * Get RoutingType value
     * @return string|null
     */
    public function getRoutingType()
    {
        return $this->RoutingType;
    }
    /**
     * Set RoutingType value
     * @uses \dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefRoutingType::valueIsValid()
     * @uses \dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefRoutingType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $routingType
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setRoutingType($routingType = null)
    {
        // validation for constraint: enumeration
        if (!\dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefRoutingType::valueIsValid($routingType)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $routingType, implode(', ', \dgsoft\EnumType\DgOTA_AirScheduleRQFlightTypePrefRoutingType::getValidValues())), __LINE__);
        }
        $this->RoutingType = $routingType;
        return $this;
    }
    /**
     * Get ExcludeTrainInd value
     * @return bool|null
     */
    public function getExcludeTrainInd()
    {
        return $this->ExcludeTrainInd;
    }
    /**
     * Set ExcludeTrainInd value
     * @param bool $excludeTrainInd
     * @return \dgsoft\StructType\DgOTA_AirScheduleRQFlightTypePref
     */
    public function setExcludeTrainInd($excludeTrainInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($excludeTrainInd) && !is_bool($excludeTrainInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($excludeTrainInd)), __LINE__);
        }
        $this->ExcludeTrainInd = $excludeTrainInd;
        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_AirScheduleRQFlightTypePref
     */
    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__;
    }
}
