<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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