<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OriginLocation StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOriginLocation extends AbstractStructBase
{
    /**
     * The _
     * @var \dgsoft\StructType\DgLocationType
     */
    public $_;
    /**
     * The MultiAirportCityInd
     * @var bool
     */
    public $MultiAirportCityInd;
    /**
     * The AlternateLocationInd
     * @var bool
     */
    public $AlternateLocationInd;
    /**
     * Constructor method for OriginLocation
     * @uses DgOriginLocation::set_()
     * @uses DgOriginLocation::setMultiAirportCityInd()
     * @uses DgOriginLocation::setAlternateLocationInd()
     * @param \dgsoft\StructType\DgLocationType $_
     * @param bool $multiAirportCityInd
     * @param bool $alternateLocationInd
     */
    public function __construct(\dgsoft\StructType\DgLocationType $_ = null, $multiAirportCityInd = null, $alternateLocationInd = null)
    {
        $this
            ->set_($_)
            ->setMultiAirportCityInd($multiAirportCityInd)
            ->setAlternateLocationInd($alternateLocationInd);
    }
    /**
     * Get _ value
     * @return \dgsoft\StructType\DgLocationType|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param \dgsoft\StructType\DgLocationType $_
     * @return \dgsoft\StructType\DgOriginLocation
     */
    public function set_(\dgsoft\StructType\DgLocationType $_ = null)
    {
        $this->_ = $_;
        return $this;
    }
    /**
     * Get MultiAirportCityInd value
     * @return bool|null
     */
    public function getMultiAirportCityInd()
    {
        return $this->MultiAirportCityInd;
    }
    /**
     * Set MultiAirportCityInd value
     * @param bool $multiAirportCityInd
     * @return \dgsoft\StructType\DgOriginLocation
     */
    public function setMultiAirportCityInd($multiAirportCityInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($multiAirportCityInd) && !is_bool($multiAirportCityInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($multiAirportCityInd)), __LINE__);
        }
        $this->MultiAirportCityInd = $multiAirportCityInd;
        return $this;
    }
    /**
     * Get AlternateLocationInd value
     * @return bool|null
     */
    public function getAlternateLocationInd()
    {
        return $this->AlternateLocationInd;
    }
    /**
     * Set AlternateLocationInd value
     * @param bool $alternateLocationInd
     * @return \dgsoft\StructType\DgOriginLocation
     */
    public function setAlternateLocationInd($alternateLocationInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($alternateLocationInd) && !is_bool($alternateLocationInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($alternateLocationInd)), __LINE__);
        }
        $this->AlternateLocationInd = $alternateLocationInd;
        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\DgOriginLocation
     */
    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__;
    }
}
