<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_SupplementRelPaxDist StructType
 * @subpackage Structs
 */
class JP_SupplementRelPaxDist extends AbstractStructBase
{
    /**
     * The Source
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Source;
    /**
     * The SupplementRelPaxes
     * Meta information 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;
    }
}
