<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_hotelRatePlanCancellationPolicy StructType
 * @subpackage Structs
 */
class JPSOAP_hotelRatePlanCancellationPolicy extends AbstractStructBase
{
    /**
     * The Code
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Code;
    /**
     * The Priority
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Priority;
    /**
     * The OnlyEarlyBooking
     * Meta information extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $OnlyEarlyBooking;
    /**
     * The NonRefundable
     * Meta information extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $NonRefundable;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Description
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Description;
    /**
     * The BookingDate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JPSOAP_DateIntervals
     */
    public $BookingDate;
    /**
     * The CheckInDates
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JPSOAP_DateIntervalsGroupsStayDates
     */
    public $CheckInDates;
    /**
     * The StayDates
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JPSOAP_DateIntervalsGroupsStayDates
     */
    public $StayDates;
    /**
     * The Rules
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJPSOAP_hotelRatePlanCancellationPolicyRule
     */
    public $Rules;
    /**
     * The Currency
     * @var string
     */
    public $Currency;
    /**
     * Constructor method for JPSOAP_hotelRatePlanCancellationPolicy
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setCode()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setPriority()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setOnlyEarlyBooking()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setNonRefundable()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setName()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setDescription()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setBookingDate()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setCheckInDates()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setStayDates()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setRules()
     * @uses JPSOAP_hotelRatePlanCancellationPolicy::setCurrency()
     * @param int $code
     * @param int $priority
     * @param bool $onlyEarlyBooking
     * @param bool $nonRefundable
     * @param string $name
     * @param string $description
     * @param \StructType\JPSOAP_DateIntervals $bookingDate
     * @param \StructType\JPSOAP_DateIntervalsGroupsStayDates $checkInDates
     * @param \StructType\JPSOAP_DateIntervalsGroupsStayDates $stayDates
     * @param \ArrayType\ArrayOfJPSOAP_hotelRatePlanCancellationPolicyRule $rules
     * @param string $currency
     */
    public function __construct($code = null, $priority = null, $onlyEarlyBooking = null, $nonRefundable = null, $name = null, $description = null, \StructType\JPSOAP_DateIntervals $bookingDate = null, \StructType\JPSOAP_DateIntervalsGroupsStayDates $checkInDates = null, \StructType\JPSOAP_DateIntervalsGroupsStayDates $stayDates = null, \ArrayType\ArrayOfJPSOAP_hotelRatePlanCancellationPolicyRule $rules = null, $currency = null)
    {
        $this
            ->setCode($code)
            ->setPriority($priority)
            ->setOnlyEarlyBooking($onlyEarlyBooking)
            ->setNonRefundable($nonRefundable)
            ->setName($name)
            ->setDescription($description)
            ->setBookingDate($bookingDate)
            ->setCheckInDates($checkInDates)
            ->setStayDates($stayDates)
            ->setRules($rules)
            ->setCurrency($currency);
    }
    /**
     * Get Code value
     * @return int
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param int $code
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setCode($code = null)
    {
        // validation for constraint: int
        if (!is_null($code) && !(is_int($code) || ctype_digit($code))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($code, true), gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get Priority value
     * @return int
     */
    public function getPriority()
    {
        return $this->Priority;
    }
    /**
     * Set Priority value
     * @param int $priority
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setPriority($priority = null)
    {
        // validation for constraint: int
        if (!is_null($priority) && !(is_int($priority) || ctype_digit($priority))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($priority, true), gettype($priority)), __LINE__);
        }
        $this->Priority = $priority;
        return $this;
    }
    /**
     * Get OnlyEarlyBooking value
     * @return bool
     */
    public function getOnlyEarlyBooking()
    {
        return $this->OnlyEarlyBooking;
    }
    /**
     * Set OnlyEarlyBooking value
     * @param bool $onlyEarlyBooking
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setOnlyEarlyBooking($onlyEarlyBooking = null)
    {
        // validation for constraint: boolean
        if (!is_null($onlyEarlyBooking) && !is_bool($onlyEarlyBooking)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($onlyEarlyBooking, true), gettype($onlyEarlyBooking)), __LINE__);
        }
        $this->OnlyEarlyBooking = $onlyEarlyBooking;
        return $this;
    }
    /**
     * Get NonRefundable value
     * @return bool
     */
    public function getNonRefundable()
    {
        return $this->NonRefundable;
    }
    /**
     * Set NonRefundable value
     * @param bool $nonRefundable
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setNonRefundable($nonRefundable = null)
    {
        // validation for constraint: boolean
        if (!is_null($nonRefundable) && !is_bool($nonRefundable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($nonRefundable, true), gettype($nonRefundable)), __LINE__);
        }
        $this->NonRefundable = $nonRefundable;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
    /**
     * Get Description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->Description;
    }
    /**
     * Set Description value
     * @param string $description
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setDescription($description = null)
    {
        // validation for constraint: string
        if (!is_null($description) && !is_string($description)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($description, true), gettype($description)), __LINE__);
        }
        $this->Description = $description;
        return $this;
    }
    /**
     * Get BookingDate value
     * @return \StructType\JPSOAP_DateIntervals|null
     */
    public function getBookingDate()
    {
        return $this->BookingDate;
    }
    /**
     * Set BookingDate value
     * @param \StructType\JPSOAP_DateIntervals $bookingDate
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setBookingDate(\StructType\JPSOAP_DateIntervals $bookingDate = null)
    {
        $this->BookingDate = $bookingDate;
        return $this;
    }
    /**
     * Get CheckInDates value
     * @return \StructType\JPSOAP_DateIntervalsGroupsStayDates|null
     */
    public function getCheckInDates()
    {
        return $this->CheckInDates;
    }
    /**
     * Set CheckInDates value
     * @param \StructType\JPSOAP_DateIntervalsGroupsStayDates $checkInDates
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setCheckInDates(\StructType\JPSOAP_DateIntervalsGroupsStayDates $checkInDates = null)
    {
        $this->CheckInDates = $checkInDates;
        return $this;
    }
    /**
     * Get StayDates value
     * @return \StructType\JPSOAP_DateIntervalsGroupsStayDates|null
     */
    public function getStayDates()
    {
        return $this->StayDates;
    }
    /**
     * Set StayDates value
     * @param \StructType\JPSOAP_DateIntervalsGroupsStayDates $stayDates
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setStayDates(\StructType\JPSOAP_DateIntervalsGroupsStayDates $stayDates = null)
    {
        $this->StayDates = $stayDates;
        return $this;
    }
    /**
     * Get Rules value
     * @return \ArrayType\ArrayOfJPSOAP_hotelRatePlanCancellationPolicyRule|null
     */
    public function getRules()
    {
        return $this->Rules;
    }
    /**
     * Set Rules value
     * @param \ArrayType\ArrayOfJPSOAP_hotelRatePlanCancellationPolicyRule $rules
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setRules(\ArrayType\ArrayOfJPSOAP_hotelRatePlanCancellationPolicyRule $rules = null)
    {
        $this->Rules = $rules;
        return $this;
    }
    /**
     * Get Currency value
     * @return string|null
     */
    public function getCurrency()
    {
        return $this->Currency;
    }
    /**
     * Set Currency value
     * @param string $currency
     * @return \StructType\JPSOAP_hotelRatePlanCancellationPolicy
     */
    public function setCurrency($currency = null)
    {
        // validation for constraint: string
        if (!is_null($currency) && !is_string($currency)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($currency, true), gettype($currency)), __LINE__);
        }
        $this->Currency = $currency;
        return $this;
    }
}
