<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_Allotment StructType
 * @subpackage Structs
 */
class JPSOAP_Allotment extends AbstractStructBase
{
    /**
     * The From
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $From;
    /**
     * The To
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $To;
    /**
     * The Available
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Available;
    /**
     * The LastUpdated
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $LastUpdated;
    /**
     * Constructor method for JPSOAP_Allotment
     * @uses JPSOAP_Allotment::setFrom()
     * @uses JPSOAP_Allotment::setTo()
     * @uses JPSOAP_Allotment::setAvailable()
     * @uses JPSOAP_Allotment::setLastUpdated()
     * @param string $from
     * @param string $to
     * @param int $available
     * @param string $lastUpdated
     */
    public function __construct($from = null, $to = null, $available = null, $lastUpdated = null)
    {
        $this
            ->setFrom($from)
            ->setTo($to)
            ->setAvailable($available)
            ->setLastUpdated($lastUpdated);
    }
    /**
     * Get From value
     * @return string
     */
    public function getFrom()
    {
        return $this->From;
    }
    /**
     * Set From value
     * @param string $from
     * @return \StructType\JPSOAP_Allotment
     */
    public function setFrom($from = null)
    {
        // validation for constraint: string
        if (!is_null($from) && !is_string($from)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($from, true), gettype($from)), __LINE__);
        }
        $this->From = $from;
        return $this;
    }
    /**
     * Get To value
     * @return string
     */
    public function getTo()
    {
        return $this->To;
    }
    /**
     * Set To value
     * @param string $to
     * @return \StructType\JPSOAP_Allotment
     */
    public function setTo($to = null)
    {
        // validation for constraint: string
        if (!is_null($to) && !is_string($to)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($to, true), gettype($to)), __LINE__);
        }
        $this->To = $to;
        return $this;
    }
    /**
     * Get Available value
     * @return int
     */
    public function getAvailable()
    {
        return $this->Available;
    }
    /**
     * Set Available value
     * @param int $available
     * @return \StructType\JPSOAP_Allotment
     */
    public function setAvailable($available = null)
    {
        // validation for constraint: int
        if (!is_null($available) && !(is_int($available) || ctype_digit($available))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($available, true), gettype($available)), __LINE__);
        }
        $this->Available = $available;
        return $this;
    }
    /**
     * Get LastUpdated value
     * @return string
     */
    public function getLastUpdated()
    {
        return $this->LastUpdated;
    }
    /**
     * Set LastUpdated value
     * @param string $lastUpdated
     * @return \StructType\JPSOAP_Allotment
     */
    public function setLastUpdated($lastUpdated = null)
    {
        // validation for constraint: string
        if (!is_null($lastUpdated) && !is_string($lastUpdated)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($lastUpdated, true), gettype($lastUpdated)), __LINE__);
        }
        $this->LastUpdated = $lastUpdated;
        return $this;
    }
}
