<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_PackageBookingInfo StructType
 * @subpackage Structs
 */
class JP_PackageBookingInfo extends AbstractStructBase
{
    /**
     * The Start
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Start;
    /**
     * The End
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $End;
    /**
     * The Price
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_BookingPrice
     */
    public $Price;
    /**
     * The Status
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Status;
    /**
     * The PackageCode
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $PackageCode;
    /**
     * Constructor method for JP_PackageBookingInfo
     * @uses JP_PackageBookingInfo::setStart()
     * @uses JP_PackageBookingInfo::setEnd()
     * @uses JP_PackageBookingInfo::setPrice()
     * @uses JP_PackageBookingInfo::setStatus()
     * @uses JP_PackageBookingInfo::setPackageCode()
     * @param string $start
     * @param string $end
     * @param \StructType\JP_BookingPrice $price
     * @param string $status
     * @param string $packageCode
     */
    public function __construct($start = null, $end = null, \StructType\JP_BookingPrice $price = null, $status = null, $packageCode = null)
    {
        $this
            ->setStart($start)
            ->setEnd($end)
            ->setPrice($price)
            ->setStatus($status)
            ->setPackageCode($packageCode);
    }
    /**
     * Get Start value
     * @return string
     */
    public function getStart()
    {
        return $this->Start;
    }
    /**
     * Set Start value
     * @param string $start
     * @return \StructType\JP_PackageBookingInfo
     */
    public function setStart($start = null)
    {
        // validation for constraint: string
        if (!is_null($start) && !is_string($start)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($start, true), gettype($start)), __LINE__);
        }
        $this->Start = $start;
        return $this;
    }
    /**
     * Get End value
     * @return string
     */
    public function getEnd()
    {
        return $this->End;
    }
    /**
     * Set End value
     * @param string $end
     * @return \StructType\JP_PackageBookingInfo
     */
    public function setEnd($end = null)
    {
        // validation for constraint: string
        if (!is_null($end) && !is_string($end)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($end, true), gettype($end)), __LINE__);
        }
        $this->End = $end;
        return $this;
    }
    /**
     * Get Price value
     * @return \StructType\JP_BookingPrice|null
     */
    public function getPrice()
    {
        return $this->Price;
    }
    /**
     * Set Price value
     * @param \StructType\JP_BookingPrice $price
     * @return \StructType\JP_PackageBookingInfo
     */
    public function setPrice(\StructType\JP_BookingPrice $price = null)
    {
        $this->Price = $price;
        return $this;
    }
    /**
     * Get Status value
     * @return string|null
     */
    public function getStatus()
    {
        return $this->Status;
    }
    /**
     * Set Status value
     * @uses \EnumType\JP_AvailStatus::valueIsValid()
     * @uses \EnumType\JP_AvailStatus::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $status
     * @return \StructType\JP_PackageBookingInfo
     */
    public function setStatus($status = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\JP_AvailStatus::valueIsValid($status)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\JP_AvailStatus', is_array($status) ? implode(', ', $status) : var_export($status, true), implode(', ', \EnumType\JP_AvailStatus::getValidValues())), __LINE__);
        }
        $this->Status = $status;
        return $this;
    }
    /**
     * Get PackageCode value
     * @return string|null
     */
    public function getPackageCode()
    {
        return $this->PackageCode;
    }
    /**
     * Set PackageCode value
     * @param string $packageCode
     * @return \StructType\JP_PackageBookingInfo
     */
    public function setPackageCode($packageCode = null)
    {
        // validation for constraint: string
        if (!is_null($packageCode) && !is_string($packageCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($packageCode, true), gettype($packageCode)), __LINE__);
        }
        $this->PackageCode = $packageCode;
        return $this;
    }
}
