<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_PickUpPoint StructType
 * @subpackage Structs
 */
class JPSOAP_PickUpPoint extends AbstractStructBase
{
    /**
     * The AreaCode
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $AreaCode;
    /**
     * The Area
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Area;
    /**
     * The Address
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Address;
    /**
     * The Hour
     * @var string
     */
    public $Hour;
    /**
     * Constructor method for JPSOAP_PickUpPoint
     * @uses JPSOAP_PickUpPoint::setAreaCode()
     * @uses JPSOAP_PickUpPoint::setArea()
     * @uses JPSOAP_PickUpPoint::setAddress()
     * @uses JPSOAP_PickUpPoint::setHour()
     * @param int $areaCode
     * @param string $area
     * @param string $address
     * @param string $hour
     */
    public function __construct($areaCode = null, $area = null, $address = null, $hour = null)
    {
        $this
            ->setAreaCode($areaCode)
            ->setArea($area)
            ->setAddress($address)
            ->setHour($hour);
    }
    /**
     * Get AreaCode value
     * @return int
     */
    public function getAreaCode()
    {
        return $this->AreaCode;
    }
    /**
     * Set AreaCode value
     * @param int $areaCode
     * @return \StructType\JPSOAP_PickUpPoint
     */
    public function setAreaCode($areaCode = null)
    {
        // validation for constraint: int
        if (!is_null($areaCode) && !is_numeric($areaCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($areaCode)), __LINE__);
        }
        $this->AreaCode = $areaCode;
        return $this;
    }
    /**
     * Get Area value
     * @return string|null
     */
    public function getArea()
    {
        return $this->Area;
    }
    /**
     * Set Area value
     * @param string $area
     * @return \StructType\JPSOAP_PickUpPoint
     */
    public function setArea($area = null)
    {
        // validation for constraint: string
        if (!is_null($area) && !is_string($area)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($area)), __LINE__);
        }
        $this->Area = $area;
        return $this;
    }
    /**
     * Get Address value
     * @return string|null
     */
    public function getAddress()
    {
        return $this->Address;
    }
    /**
     * Set Address value
     * @param string $address
     * @return \StructType\JPSOAP_PickUpPoint
     */
    public function setAddress($address = null)
    {
        // validation for constraint: string
        if (!is_null($address) && !is_string($address)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($address)), __LINE__);
        }
        $this->Address = $address;
        return $this;
    }
    /**
     * Get Hour value
     * @return string|null
     */
    public function getHour()
    {
        return $this->Hour;
    }
    /**
     * Set Hour value
     * @param string $hour
     * @return \StructType\JPSOAP_PickUpPoint
     */
    public function setHour($hour = null)
    {
        // validation for constraint: string
        if (!is_null($hour) && !is_string($hour)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($hour)), __LINE__);
        }
        $this->Hour = $hour;
        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\JPSOAP_PickUpPoint
     */
    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__;
    }
}
