<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_OptionalElements StructType
 * @subpackage Structs
 */
class JP_OptionalElements extends AbstractStructBase
{
    /**
     * The Bags
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_Bag
     */
    public $Bags;
    /**
     * The CreditCardsFee
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_CreditCardFee
     */
    public $CreditCardsFee;
    /**
     * The FlightSupplements
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_FlightSupplement
     */
    public $FlightSupplements;
    /**
     * Constructor method for JP_OptionalElements
     * @uses JP_OptionalElements::setBags()
     * @uses JP_OptionalElements::setCreditCardsFee()
     * @uses JP_OptionalElements::setFlightSupplements()
     * @param \ArrayType\ArrayOfJP_Bag $bags
     * @param \ArrayType\ArrayOfJP_CreditCardFee $creditCardsFee
     * @param \ArrayType\ArrayOfJP_FlightSupplement $flightSupplements
     */
    public function __construct(\ArrayType\ArrayOfJP_Bag $bags = null, \ArrayType\ArrayOfJP_CreditCardFee $creditCardsFee = null, \ArrayType\ArrayOfJP_FlightSupplement $flightSupplements = null)
    {
        $this
            ->setBags($bags)
            ->setCreditCardsFee($creditCardsFee)
            ->setFlightSupplements($flightSupplements);
    }
    /**
     * Get Bags value
     * @return \ArrayType\ArrayOfJP_Bag|null
     */
    public function getBags()
    {
        return $this->Bags;
    }
    /**
     * Set Bags value
     * @param \ArrayType\ArrayOfJP_Bag $bags
     * @return \StructType\JP_OptionalElements
     */
    public function setBags(\ArrayType\ArrayOfJP_Bag $bags = null)
    {
        $this->Bags = $bags;
        return $this;
    }
    /**
     * Get CreditCardsFee value
     * @return \ArrayType\ArrayOfJP_CreditCardFee|null
     */
    public function getCreditCardsFee()
    {
        return $this->CreditCardsFee;
    }
    /**
     * Set CreditCardsFee value
     * @param \ArrayType\ArrayOfJP_CreditCardFee $creditCardsFee
     * @return \StructType\JP_OptionalElements
     */
    public function setCreditCardsFee(\ArrayType\ArrayOfJP_CreditCardFee $creditCardsFee = null)
    {
        $this->CreditCardsFee = $creditCardsFee;
        return $this;
    }
    /**
     * Get FlightSupplements value
     * @return \ArrayType\ArrayOfJP_FlightSupplement|null
     */
    public function getFlightSupplements()
    {
        return $this->FlightSupplements;
    }
    /**
     * Set FlightSupplements value
     * @param \ArrayType\ArrayOfJP_FlightSupplement $flightSupplements
     * @return \StructType\JP_OptionalElements
     */
    public function setFlightSupplements(\ArrayType\ArrayOfJP_FlightSupplement $flightSupplements = null)
    {
        $this->FlightSupplements = $flightSupplements;
        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_OptionalElements
     */
    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__;
    }
}
