<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for NextStopCity StructType
 * @subpackage Structs
 */
class NextStopCity extends AbstractStructBase
{
    /**
     * The Level1
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Level1;
    /**
     * The Level2
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Level2;
    /**
     * The Level3
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Level3;
    /**
     * Constructor method for NextStopCity
     * @uses NextStopCity::setLevel1()
     * @uses NextStopCity::setLevel2()
     * @uses NextStopCity::setLevel3()
     * @param string $level1
     * @param string $level2
     * @param string $level3
     */
    public function __construct($level1 = null, $level2 = null, $level3 = null)
    {
        $this
            ->setLevel1($level1)
            ->setLevel2($level2)
            ->setLevel3($level3);
    }
    /**
     * Get Level1 value
     * @return string|null
     */
    public function getLevel1()
    {
        return $this->Level1;
    }
    /**
     * Set Level1 value
     * @param string $level1
     * @return \StructType\NextStopCity
     */
    public function setLevel1($level1 = null)
    {
        // validation for constraint: string
        if (!is_null($level1) && !is_string($level1)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($level1, true), gettype($level1)), __LINE__);
        }
        $this->Level1 = $level1;
        return $this;
    }
    /**
     * Get Level2 value
     * @return string|null
     */
    public function getLevel2()
    {
        return $this->Level2;
    }
    /**
     * Set Level2 value
     * @param string $level2
     * @return \StructType\NextStopCity
     */
    public function setLevel2($level2 = null)
    {
        // validation for constraint: string
        if (!is_null($level2) && !is_string($level2)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($level2, true), gettype($level2)), __LINE__);
        }
        $this->Level2 = $level2;
        return $this;
    }
    /**
     * Get Level3 value
     * @return string|null
     */
    public function getLevel3()
    {
        return $this->Level3;
    }
    /**
     * Set Level3 value
     * @param string $level3
     * @return \StructType\NextStopCity
     */
    public function setLevel3($level3 = null)
    {
        // validation for constraint: string
        if (!is_null($level3) && !is_string($level3)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($level3, true), gettype($level3)), __LINE__);
        }
        $this->Level3 = $level3;
        return $this;
    }
}
