<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_Zone StructType
 * @subpackage Structs
 */
class JP_Zone extends AbstractStructBase
{
    /**
     * The Name
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The JPDCode
     * @var string
     */
    public $JPDCode;
    /**
     * The ParentJPDCode
     * @var string
     */
    public $ParentJPDCode;
    /**
     * The IATA
     * @var string
     */
    public $IATA;
    /**
     * The AreaType
     * @var string
     */
    public $AreaType;
    /**
     * The Searchable
     * @var bool
     */
    public $Searchable;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The ParentCode
     * @var string
     */
    public $ParentCode;
    /**
     * Constructor method for JP_Zone
     * @uses JP_Zone::setName()
     * @uses JP_Zone::setJPDCode()
     * @uses JP_Zone::setParentJPDCode()
     * @uses JP_Zone::setIATA()
     * @uses JP_Zone::setAreaType()
     * @uses JP_Zone::setSearchable()
     * @uses JP_Zone::setCode()
     * @uses JP_Zone::setParentCode()
     * @param string $name
     * @param string $jPDCode
     * @param string $parentJPDCode
     * @param string $iATA
     * @param string $areaType
     * @param bool $searchable
     * @param string $code
     * @param string $parentCode
     */
    public function __construct($name = null, $jPDCode = null, $parentJPDCode = null, $iATA = null, $areaType = null, $searchable = null, $code = null, $parentCode = null)
    {
        $this
            ->setName($name)
            ->setJPDCode($jPDCode)
            ->setParentJPDCode($parentJPDCode)
            ->setIATA($iATA)
            ->setAreaType($areaType)
            ->setSearchable($searchable)
            ->setCode($code)
            ->setParentCode($parentCode);
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\JP_Zone
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
    /**
     * Get JPDCode value
     * @return string|null
     */
    public function getJPDCode()
    {
        return $this->JPDCode;
    }
    /**
     * Set JPDCode value
     * @param string $jPDCode
     * @return \StructType\JP_Zone
     */
    public function setJPDCode($jPDCode = null)
    {
        // validation for constraint: string
        if (!is_null($jPDCode) && !is_string($jPDCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($jPDCode)), __LINE__);
        }
        $this->JPDCode = $jPDCode;
        return $this;
    }
    /**
     * Get ParentJPDCode value
     * @return string|null
     */
    public function getParentJPDCode()
    {
        return $this->ParentJPDCode;
    }
    /**
     * Set ParentJPDCode value
     * @param string $parentJPDCode
     * @return \StructType\JP_Zone
     */
    public function setParentJPDCode($parentJPDCode = null)
    {
        // validation for constraint: string
        if (!is_null($parentJPDCode) && !is_string($parentJPDCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parentJPDCode)), __LINE__);
        }
        $this->ParentJPDCode = $parentJPDCode;
        return $this;
    }
    /**
     * Get IATA value
     * @return string|null
     */
    public function getIATA()
    {
        return $this->IATA;
    }
    /**
     * Set IATA value
     * @param string $iATA
     * @return \StructType\JP_Zone
     */
    public function setIATA($iATA = null)
    {
        // validation for constraint: string
        if (!is_null($iATA) && !is_string($iATA)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($iATA)), __LINE__);
        }
        $this->IATA = $iATA;
        return $this;
    }
    /**
     * Get AreaType value
     * @return string|null
     */
    public function getAreaType()
    {
        return $this->AreaType;
    }
    /**
     * Set AreaType value
     * @param string $areaType
     * @return \StructType\JP_Zone
     */
    public function setAreaType($areaType = null)
    {
        // validation for constraint: string
        if (!is_null($areaType) && !is_string($areaType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($areaType)), __LINE__);
        }
        $this->AreaType = $areaType;
        return $this;
    }
    /**
     * Get Searchable value
     * @return bool|null
     */
    public function getSearchable()
    {
        return $this->Searchable;
    }
    /**
     * Set Searchable value
     * @param bool $searchable
     * @return \StructType\JP_Zone
     */
    public function setSearchable($searchable = null)
    {
        // validation for constraint: boolean
        if (!is_null($searchable) && !is_bool($searchable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($searchable)), __LINE__);
        }
        $this->Searchable = $searchable;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_Zone
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get ParentCode value
     * @return string|null
     */
    public function getParentCode()
    {
        return $this->ParentCode;
    }
    /**
     * Set ParentCode value
     * @param string $parentCode
     * @return \StructType\JP_Zone
     */
    public function setParentCode($parentCode = null)
    {
        // validation for constraint: string
        if (!is_null($parentCode) && !is_string($parentCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($parentCode)), __LINE__);
        }
        $this->ParentCode = $parentCode;
        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 \StructType\JP_Zone
     */
    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__;
    }
}
