<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_Luggage StructType
 * @subpackage Structs
 */
class JP_Luggage extends AbstractStructBase
{
    /**
     * The Capacity
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Capacity;
    /**
     * Constructor method for JP_Luggage
     * @uses JP_Luggage::setCapacity()
     * @param int $capacity
     */
    public function __construct($capacity = null)
    {
        $this
            ->setCapacity($capacity);
    }
    /**
     * Get Capacity value
     * @return int
     */
    public function getCapacity()
    {
        return $this->Capacity;
    }
    /**
     * Set Capacity value
     * @param int $capacity
     * @return \StructType\JP_Luggage
     */
    public function setCapacity($capacity = null)
    {
        // validation for constraint: int
        if (!is_null($capacity) && !(is_int($capacity) || ctype_digit($capacity))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($capacity, true), gettype($capacity)), __LINE__);
        }
        $this->Capacity = $capacity;
        return $this;
    }
}
