<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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