<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_RelPaxesDist StructType
 * @subpackage Structs
 */
class JP_RelPaxesDist extends AbstractStructBase
{
    /**
     * The RelPaxDist
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_RelPaxDist[]
     */
    public $RelPaxDist;
    /**
     * Constructor method for JP_RelPaxesDist
     * @uses JP_RelPaxesDist::setRelPaxDist()
     * @param \StructType\JP_RelPaxDist[] $relPaxDist
     */
    public function __construct(array $relPaxDist = array())
    {
        $this
            ->setRelPaxDist($relPaxDist);
    }
    /**
     * Get RelPaxDist value
     * @return \StructType\JP_RelPaxDist[]|null
     */
    public function getRelPaxDist()
    {
        return $this->RelPaxDist;
    }
    /**
     * Set RelPaxDist value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_RelPaxDist[] $relPaxDist
     * @return \StructType\JP_RelPaxesDist
     */
    public function setRelPaxDist(array $relPaxDist = array())
    {
        foreach ($relPaxDist as $jP_RelPaxesDistRelPaxDistItem) {
            // validation for constraint: itemType
            if (!$jP_RelPaxesDistRelPaxDistItem instanceof \StructType\JP_RelPaxDist) {
                throw new \InvalidArgumentException(sprintf('The RelPaxDist property can only contain items of \StructType\JP_RelPaxDist, "%s" given', is_object($jP_RelPaxesDistRelPaxDistItem) ? get_class($jP_RelPaxesDistRelPaxDistItem) : gettype($jP_RelPaxesDistRelPaxDistItem)), __LINE__);
            }
        }
        $this->RelPaxDist = $relPaxDist;
        return $this;
    }
    /**
     * Add item to RelPaxDist value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_RelPaxDist $item
     * @return \StructType\JP_RelPaxesDist
     */
    public function addToRelPaxDist(\StructType\JP_RelPaxDist $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_RelPaxDist) {
            throw new \InvalidArgumentException(sprintf('The RelPaxDist property can only contain items of \StructType\JP_RelPaxDist, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->RelPaxDist[] = $item;
        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_RelPaxesDist
     */
    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__;
    }
}
