<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_Items StructType
 * @subpackage Structs
 */
class JP_Items extends AbstractStructBase
{
    /**
     * The FlightItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_FlightItem[]
     */
    public $FlightItem;
    /**
     * The HotelItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_HotelItem[]
     */
    public $HotelItem;
    /**
     * The PackageItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_PackageItem[]
     */
    public $PackageItem;
    /**
     * The CarItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_RentacarItem[]
     */
    public $CarItem;
    /**
     * The InsuranceItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_InsuranceItem[]
     */
    public $InsuranceItem;
    /**
     * The CruiseItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_CruiseItem[]
     */
    public $CruiseItem;
    /**
     * The ServiceItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_ServiceItem[]
     */
    public $ServiceItem;
    /**
     * The TransferItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_TransferItem[]
     */
    public $TransferItem;
    /**
     * The VisaItem
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \StructType\JP_VisaItem[]
     */
    public $VisaItem;
    /**
     * Constructor method for JP_Items
     * @uses JP_Items::setFlightItem()
     * @uses JP_Items::setHotelItem()
     * @uses JP_Items::setPackageItem()
     * @uses JP_Items::setCarItem()
     * @uses JP_Items::setInsuranceItem()
     * @uses JP_Items::setCruiseItem()
     * @uses JP_Items::setServiceItem()
     * @uses JP_Items::setTransferItem()
     * @uses JP_Items::setVisaItem()
     * @param \StructType\JP_FlightItem[] $flightItem
     * @param \StructType\JP_HotelItem[] $hotelItem
     * @param \StructType\JP_PackageItem[] $packageItem
     * @param \StructType\JP_RentacarItem[] $carItem
     * @param \StructType\JP_InsuranceItem[] $insuranceItem
     * @param \StructType\JP_CruiseItem[] $cruiseItem
     * @param \StructType\JP_ServiceItem[] $serviceItem
     * @param \StructType\JP_TransferItem[] $transferItem
     * @param \StructType\JP_VisaItem[] $visaItem
     */
    public function __construct(array $flightItem = array(), array $hotelItem = array(), array $packageItem = array(), array $carItem = array(), array $insuranceItem = array(), array $cruiseItem = array(), array $serviceItem = array(), array $transferItem = array(), array $visaItem = array())
    {
        $this
            ->setFlightItem($flightItem)
            ->setHotelItem($hotelItem)
            ->setPackageItem($packageItem)
            ->setCarItem($carItem)
            ->setInsuranceItem($insuranceItem)
            ->setCruiseItem($cruiseItem)
            ->setServiceItem($serviceItem)
            ->setTransferItem($transferItem)
            ->setVisaItem($visaItem);
    }
    /**
     * Get FlightItem value
     * @return \StructType\JP_FlightItem[]|null
     */
    public function getFlightItem()
    {
        return $this->FlightItem;
    }
    /**
     * Set FlightItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_FlightItem[] $flightItem
     * @return \StructType\JP_Items
     */
    public function setFlightItem(array $flightItem = array())
    {
        foreach ($flightItem as $jP_ItemsFlightItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsFlightItemItem instanceof \StructType\JP_FlightItem) {
                throw new \InvalidArgumentException(sprintf('The FlightItem property can only contain items of \StructType\JP_FlightItem, "%s" given', is_object($jP_ItemsFlightItemItem) ? get_class($jP_ItemsFlightItemItem) : gettype($jP_ItemsFlightItemItem)), __LINE__);
            }
        }
        $this->FlightItem = $flightItem;
        return $this;
    }
    /**
     * Add item to FlightItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_FlightItem $item
     * @return \StructType\JP_Items
     */
    public function addToFlightItem(\StructType\JP_FlightItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_FlightItem) {
            throw new \InvalidArgumentException(sprintf('The FlightItem property can only contain items of \StructType\JP_FlightItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->FlightItem[] = $item;
        return $this;
    }
    /**
     * Get HotelItem value
     * @return \StructType\JP_HotelItem[]|null
     */
    public function getHotelItem()
    {
        return $this->HotelItem;
    }
    /**
     * Set HotelItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_HotelItem[] $hotelItem
     * @return \StructType\JP_Items
     */
    public function setHotelItem(array $hotelItem = array())
    {
        foreach ($hotelItem as $jP_ItemsHotelItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsHotelItemItem instanceof \StructType\JP_HotelItem) {
                throw new \InvalidArgumentException(sprintf('The HotelItem property can only contain items of \StructType\JP_HotelItem, "%s" given', is_object($jP_ItemsHotelItemItem) ? get_class($jP_ItemsHotelItemItem) : gettype($jP_ItemsHotelItemItem)), __LINE__);
            }
        }
        $this->HotelItem = $hotelItem;
        return $this;
    }
    /**
     * Add item to HotelItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_HotelItem $item
     * @return \StructType\JP_Items
     */
    public function addToHotelItem(\StructType\JP_HotelItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_HotelItem) {
            throw new \InvalidArgumentException(sprintf('The HotelItem property can only contain items of \StructType\JP_HotelItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->HotelItem[] = $item;
        return $this;
    }
    /**
     * Get PackageItem value
     * @return \StructType\JP_PackageItem[]|null
     */
    public function getPackageItem()
    {
        return $this->PackageItem;
    }
    /**
     * Set PackageItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_PackageItem[] $packageItem
     * @return \StructType\JP_Items
     */
    public function setPackageItem(array $packageItem = array())
    {
        foreach ($packageItem as $jP_ItemsPackageItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsPackageItemItem instanceof \StructType\JP_PackageItem) {
                throw new \InvalidArgumentException(sprintf('The PackageItem property can only contain items of \StructType\JP_PackageItem, "%s" given', is_object($jP_ItemsPackageItemItem) ? get_class($jP_ItemsPackageItemItem) : gettype($jP_ItemsPackageItemItem)), __LINE__);
            }
        }
        $this->PackageItem = $packageItem;
        return $this;
    }
    /**
     * Add item to PackageItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_PackageItem $item
     * @return \StructType\JP_Items
     */
    public function addToPackageItem(\StructType\JP_PackageItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_PackageItem) {
            throw new \InvalidArgumentException(sprintf('The PackageItem property can only contain items of \StructType\JP_PackageItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->PackageItem[] = $item;
        return $this;
    }
    /**
     * Get CarItem value
     * @return \StructType\JP_RentacarItem[]|null
     */
    public function getCarItem()
    {
        return $this->CarItem;
    }
    /**
     * Set CarItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_RentacarItem[] $carItem
     * @return \StructType\JP_Items
     */
    public function setCarItem(array $carItem = array())
    {
        foreach ($carItem as $jP_ItemsCarItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsCarItemItem instanceof \StructType\JP_RentacarItem) {
                throw new \InvalidArgumentException(sprintf('The CarItem property can only contain items of \StructType\JP_RentacarItem, "%s" given', is_object($jP_ItemsCarItemItem) ? get_class($jP_ItemsCarItemItem) : gettype($jP_ItemsCarItemItem)), __LINE__);
            }
        }
        $this->CarItem = $carItem;
        return $this;
    }
    /**
     * Add item to CarItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_RentacarItem $item
     * @return \StructType\JP_Items
     */
    public function addToCarItem(\StructType\JP_RentacarItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_RentacarItem) {
            throw new \InvalidArgumentException(sprintf('The CarItem property can only contain items of \StructType\JP_RentacarItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->CarItem[] = $item;
        return $this;
    }
    /**
     * Get InsuranceItem value
     * @return \StructType\JP_InsuranceItem[]|null
     */
    public function getInsuranceItem()
    {
        return $this->InsuranceItem;
    }
    /**
     * Set InsuranceItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_InsuranceItem[] $insuranceItem
     * @return \StructType\JP_Items
     */
    public function setInsuranceItem(array $insuranceItem = array())
    {
        foreach ($insuranceItem as $jP_ItemsInsuranceItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsInsuranceItemItem instanceof \StructType\JP_InsuranceItem) {
                throw new \InvalidArgumentException(sprintf('The InsuranceItem property can only contain items of \StructType\JP_InsuranceItem, "%s" given', is_object($jP_ItemsInsuranceItemItem) ? get_class($jP_ItemsInsuranceItemItem) : gettype($jP_ItemsInsuranceItemItem)), __LINE__);
            }
        }
        $this->InsuranceItem = $insuranceItem;
        return $this;
    }
    /**
     * Add item to InsuranceItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_InsuranceItem $item
     * @return \StructType\JP_Items
     */
    public function addToInsuranceItem(\StructType\JP_InsuranceItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_InsuranceItem) {
            throw new \InvalidArgumentException(sprintf('The InsuranceItem property can only contain items of \StructType\JP_InsuranceItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->InsuranceItem[] = $item;
        return $this;
    }
    /**
     * Get CruiseItem value
     * @return \StructType\JP_CruiseItem[]|null
     */
    public function getCruiseItem()
    {
        return $this->CruiseItem;
    }
    /**
     * Set CruiseItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_CruiseItem[] $cruiseItem
     * @return \StructType\JP_Items
     */
    public function setCruiseItem(array $cruiseItem = array())
    {
        foreach ($cruiseItem as $jP_ItemsCruiseItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsCruiseItemItem instanceof \StructType\JP_CruiseItem) {
                throw new \InvalidArgumentException(sprintf('The CruiseItem property can only contain items of \StructType\JP_CruiseItem, "%s" given', is_object($jP_ItemsCruiseItemItem) ? get_class($jP_ItemsCruiseItemItem) : gettype($jP_ItemsCruiseItemItem)), __LINE__);
            }
        }
        $this->CruiseItem = $cruiseItem;
        return $this;
    }
    /**
     * Add item to CruiseItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_CruiseItem $item
     * @return \StructType\JP_Items
     */
    public function addToCruiseItem(\StructType\JP_CruiseItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_CruiseItem) {
            throw new \InvalidArgumentException(sprintf('The CruiseItem property can only contain items of \StructType\JP_CruiseItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->CruiseItem[] = $item;
        return $this;
    }
    /**
     * Get ServiceItem value
     * @return \StructType\JP_ServiceItem[]|null
     */
    public function getServiceItem()
    {
        return $this->ServiceItem;
    }
    /**
     * Set ServiceItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_ServiceItem[] $serviceItem
     * @return \StructType\JP_Items
     */
    public function setServiceItem(array $serviceItem = array())
    {
        foreach ($serviceItem as $jP_ItemsServiceItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsServiceItemItem instanceof \StructType\JP_ServiceItem) {
                throw new \InvalidArgumentException(sprintf('The ServiceItem property can only contain items of \StructType\JP_ServiceItem, "%s" given', is_object($jP_ItemsServiceItemItem) ? get_class($jP_ItemsServiceItemItem) : gettype($jP_ItemsServiceItemItem)), __LINE__);
            }
        }
        $this->ServiceItem = $serviceItem;
        return $this;
    }
    /**
     * Add item to ServiceItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_ServiceItem $item
     * @return \StructType\JP_Items
     */
    public function addToServiceItem(\StructType\JP_ServiceItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_ServiceItem) {
            throw new \InvalidArgumentException(sprintf('The ServiceItem property can only contain items of \StructType\JP_ServiceItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->ServiceItem[] = $item;
        return $this;
    }
    /**
     * Get TransferItem value
     * @return \StructType\JP_TransferItem[]|null
     */
    public function getTransferItem()
    {
        return $this->TransferItem;
    }
    /**
     * Set TransferItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_TransferItem[] $transferItem
     * @return \StructType\JP_Items
     */
    public function setTransferItem(array $transferItem = array())
    {
        foreach ($transferItem as $jP_ItemsTransferItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsTransferItemItem instanceof \StructType\JP_TransferItem) {
                throw new \InvalidArgumentException(sprintf('The TransferItem property can only contain items of \StructType\JP_TransferItem, "%s" given', is_object($jP_ItemsTransferItemItem) ? get_class($jP_ItemsTransferItemItem) : gettype($jP_ItemsTransferItemItem)), __LINE__);
            }
        }
        $this->TransferItem = $transferItem;
        return $this;
    }
    /**
     * Add item to TransferItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_TransferItem $item
     * @return \StructType\JP_Items
     */
    public function addToTransferItem(\StructType\JP_TransferItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_TransferItem) {
            throw new \InvalidArgumentException(sprintf('The TransferItem property can only contain items of \StructType\JP_TransferItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->TransferItem[] = $item;
        return $this;
    }
    /**
     * Get VisaItem value
     * @return \StructType\JP_VisaItem[]|null
     */
    public function getVisaItem()
    {
        return $this->VisaItem;
    }
    /**
     * Set VisaItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_VisaItem[] $visaItem
     * @return \StructType\JP_Items
     */
    public function setVisaItem(array $visaItem = array())
    {
        foreach ($visaItem as $jP_ItemsVisaItemItem) {
            // validation for constraint: itemType
            if (!$jP_ItemsVisaItemItem instanceof \StructType\JP_VisaItem) {
                throw new \InvalidArgumentException(sprintf('The VisaItem property can only contain items of \StructType\JP_VisaItem, "%s" given', is_object($jP_ItemsVisaItemItem) ? get_class($jP_ItemsVisaItemItem) : gettype($jP_ItemsVisaItemItem)), __LINE__);
            }
        }
        $this->VisaItem = $visaItem;
        return $this;
    }
    /**
     * Add item to VisaItem value
     * @throws \InvalidArgumentException
     * @param \StructType\JP_VisaItem $item
     * @return \StructType\JP_Items
     */
    public function addToVisaItem(\StructType\JP_VisaItem $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \StructType\JP_VisaItem) {
            throw new \InvalidArgumentException(sprintf('The VisaItem property can only contain items of \StructType\JP_VisaItem, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->VisaItem[] = $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_Items
     */
    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__;
    }
}
