<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_SupplementRelPaxDist StructType
 * @subpackage Structs
 */
class JP_SupplementRelPaxDist extends AbstractStructBase
{
    /**
     * The Source
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Source;
    /**
     * The SupplementRelPaxes
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_SupplementRelPax
     */
    public $SupplementRelPaxes;
    /**
     * Constructor method for JP_SupplementRelPaxDist
     * @uses JP_SupplementRelPaxDist::setSource()
     * @uses JP_SupplementRelPaxDist::setSupplementRelPaxes()
     * @param int $source
     * @param \ArrayType\ArrayOfJP_SupplementRelPax $supplementRelPaxes
     */
    public function __construct($source = null, \ArrayType\ArrayOfJP_SupplementRelPax $supplementRelPaxes = null)
    {
        $this
            ->setSource($source)
            ->setSupplementRelPaxes($supplementRelPaxes);
    }
    /**
     * Get Source value
     * @return int
     */
    public function getSource()
    {
        return $this->Source;
    }
    /**
     * Set Source value
     * @param int $source
     * @return \StructType\JP_SupplementRelPaxDist
     */
    public function setSource($source = null)
    {
        // validation for constraint: int
        if (!is_null($source) && !(is_int($source) || ctype_digit($source))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($source, true), gettype($source)), __LINE__);
        }
        $this->Source = $source;
        return $this;
    }
    /**
     * Get SupplementRelPaxes value
     * @return \ArrayType\ArrayOfJP_SupplementRelPax|null
     */
    public function getSupplementRelPaxes()
    {
        return $this->SupplementRelPaxes;
    }
    /**
     * Set SupplementRelPaxes value
     * @param \ArrayType\ArrayOfJP_SupplementRelPax $supplementRelPaxes
     * @return \StructType\JP_SupplementRelPaxDist
     */
    public function setSupplementRelPaxes(\ArrayType\ArrayOfJP_SupplementRelPax $supplementRelPaxes = null)
    {
        $this->SupplementRelPaxes = $supplementRelPaxes;
        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_SupplementRelPaxDist
     */
    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__;
    }
}
