<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_TransferBookingInfoExtended StructType
 * @subpackage Structs
 */
class JP_TransferBookingInfoExtended extends JP_TransferBookingInfo
{
    /**
     * The PackageContracts
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $PackageContracts;
    /**
     * Constructor method for JP_TransferBookingInfoExtended
     * @uses JP_TransferBookingInfoExtended::setPackageContracts()
     * @param string $packageContracts
     */
    public function __construct($packageContracts = null)
    {
        $this
            ->setPackageContracts($packageContracts);
    }
    /**
     * Get PackageContracts value
     * @return string|null
     */
    public function getPackageContracts()
    {
        return $this->PackageContracts;
    }
    /**
     * Set PackageContracts value
     * @uses \EnumType\JP_PackageContractsTransfers::valueIsValid()
     * @uses \EnumType\JP_PackageContractsTransfers::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $packageContracts
     * @return \StructType\JP_TransferBookingInfoExtended
     */
    public function setPackageContracts($packageContracts = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\JP_PackageContractsTransfers::valueIsValid($packageContracts)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\JP_PackageContractsTransfers', is_array($packageContracts) ? implode(', ', $packageContracts) : var_export($packageContracts, true), implode(', ', \EnumType\JP_PackageContractsTransfers::getValidValues())), __LINE__);
        }
        $this->PackageContracts = $packageContracts;
        return $this;
    }
}
