<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_PackageCalendarPriceParameter StructType
 * @subpackage Structs
 */
class JP_PackageCalendarPriceParameter extends AbstractStructBase
{
    /**
     * The Start
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Start;
    /**
     * The End
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $End;
    /**
     * The PackageCodes
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_PackagesCodeList
     */
    public $PackageCodes;
    /**
     * The OriginZone
     * @var int
     */
    public $OriginZone;
    /**
     * The DestinationZone
     * @var int
     */
    public $DestinationZone;
    /**
     * Constructor method for JP_PackageCalendarPriceParameter
     * @uses JP_PackageCalendarPriceParameter::setStart()
     * @uses JP_PackageCalendarPriceParameter::setEnd()
     * @uses JP_PackageCalendarPriceParameter::setPackageCodes()
     * @uses JP_PackageCalendarPriceParameter::setOriginZone()
     * @uses JP_PackageCalendarPriceParameter::setDestinationZone()
     * @param string $start
     * @param string $end
     * @param \ArrayType\ArrayOfJP_PackagesCodeList $packageCodes
     * @param int $originZone
     * @param int $destinationZone
     */
    public function __construct($start = null, $end = null, \ArrayType\ArrayOfJP_PackagesCodeList $packageCodes = null, $originZone = null, $destinationZone = null)
    {
        $this
            ->setStart($start)
            ->setEnd($end)
            ->setPackageCodes($packageCodes)
            ->setOriginZone($originZone)
            ->setDestinationZone($destinationZone);
    }
    /**
     * Get Start value
     * @return string
     */
    public function getStart()
    {
        return $this->Start;
    }
    /**
     * Set Start value
     * @param string $start
     * @return \StructType\JP_PackageCalendarPriceParameter
     */
    public function setStart($start = null)
    {
        // validation for constraint: string
        if (!is_null($start) && !is_string($start)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($start)), __LINE__);
        }
        $this->Start = $start;
        return $this;
    }
    /**
     * Get End value
     * @return string
     */
    public function getEnd()
    {
        return $this->End;
    }
    /**
     * Set End value
     * @param string $end
     * @return \StructType\JP_PackageCalendarPriceParameter
     */
    public function setEnd($end = null)
    {
        // validation for constraint: string
        if (!is_null($end) && !is_string($end)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($end)), __LINE__);
        }
        $this->End = $end;
        return $this;
    }
    /**
     * Get PackageCodes value
     * @return \ArrayType\ArrayOfJP_PackagesCodeList|null
     */
    public function getPackageCodes()
    {
        return $this->PackageCodes;
    }
    /**
     * Set PackageCodes value
     * @param \ArrayType\ArrayOfJP_PackagesCodeList $packageCodes
     * @return \StructType\JP_PackageCalendarPriceParameter
     */
    public function setPackageCodes(\ArrayType\ArrayOfJP_PackagesCodeList $packageCodes = null)
    {
        $this->PackageCodes = $packageCodes;
        return $this;
    }
    /**
     * Get OriginZone value
     * @return int|null
     */
    public function getOriginZone()
    {
        return $this->OriginZone;
    }
    /**
     * Set OriginZone value
     * @param int $originZone
     * @return \StructType\JP_PackageCalendarPriceParameter
     */
    public function setOriginZone($originZone = null)
    {
        // validation for constraint: int
        if (!is_null($originZone) && !is_numeric($originZone)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($originZone)), __LINE__);
        }
        $this->OriginZone = $originZone;
        return $this;
    }
    /**
     * Get DestinationZone value
     * @return int|null
     */
    public function getDestinationZone()
    {
        return $this->DestinationZone;
    }
    /**
     * Set DestinationZone value
     * @param int $destinationZone
     * @return \StructType\JP_PackageCalendarPriceParameter
     */
    public function setDestinationZone($destinationZone = null)
    {
        // validation for constraint: int
        if (!is_null($destinationZone) && !is_numeric($destinationZone)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($destinationZone)), __LINE__);
        }
        $this->DestinationZone = $destinationZone;
        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_PackageCalendarPriceParameter
     */
    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__;
    }
}
