<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_VehRateRuleRSRateRules StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_VehRateRuleRSRateRules extends AbstractStructBase
{
    /**
     * The AdvanceBooking
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesAdvanceBooking
     */
    public $AdvanceBooking;
    /**
     * The PickupReturnRules
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPickupReturnRules
     */
    public $PickupReturnRules;
    /**
     * The RateGuarantee
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateGuarantee
     */
    public $RateGuarantee;
    /**
     * The PaymentRules
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPaymentRules
     */
    public $PaymentRules;
    /**
     * The CancelPenaltyInfo
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo[]
     */
    public $CancelPenaltyInfo;
    /**
     * The RateDeposit
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateDeposit
     */
    public $RateDeposit;
    /**
     * The MinimumKeep
     * @var string
     */
    public $MinimumKeep;
    /**
     * The MaximumKeep
     * @var string
     */
    public $MaximumKeep;
    /**
     * The MaximumRental
     * @var string
     */
    public $MaximumRental;
    /**
     * Constructor method for OTA_VehRateRuleRSRateRules
     * @uses DgOTA_VehRateRuleRSRateRules::setAdvanceBooking()
     * @uses DgOTA_VehRateRuleRSRateRules::setPickupReturnRules()
     * @uses DgOTA_VehRateRuleRSRateRules::setRateGuarantee()
     * @uses DgOTA_VehRateRuleRSRateRules::setPaymentRules()
     * @uses DgOTA_VehRateRuleRSRateRules::setCancelPenaltyInfo()
     * @uses DgOTA_VehRateRuleRSRateRules::setRateDeposit()
     * @uses DgOTA_VehRateRuleRSRateRules::setMinimumKeep()
     * @uses DgOTA_VehRateRuleRSRateRules::setMaximumKeep()
     * @uses DgOTA_VehRateRuleRSRateRules::setMaximumRental()
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesAdvanceBooking $advanceBooking
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPickupReturnRules $pickupReturnRules
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateGuarantee $rateGuarantee
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPaymentRules $paymentRules
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo[] $cancelPenaltyInfo
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateDeposit $rateDeposit
     * @param string $minimumKeep
     * @param string $maximumKeep
     * @param string $maximumRental
     */
    public function __construct(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesAdvanceBooking $advanceBooking = null, \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPickupReturnRules $pickupReturnRules = null, \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateGuarantee $rateGuarantee = null, \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPaymentRules $paymentRules = null, array $cancelPenaltyInfo = array(), \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateDeposit $rateDeposit = null, $minimumKeep = null, $maximumKeep = null, $maximumRental = null)
    {
        $this
            ->setAdvanceBooking($advanceBooking)
            ->setPickupReturnRules($pickupReturnRules)
            ->setRateGuarantee($rateGuarantee)
            ->setPaymentRules($paymentRules)
            ->setCancelPenaltyInfo($cancelPenaltyInfo)
            ->setRateDeposit($rateDeposit)
            ->setMinimumKeep($minimumKeep)
            ->setMaximumKeep($maximumKeep)
            ->setMaximumRental($maximumRental);
    }
    /**
     * Get AdvanceBooking value
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesAdvanceBooking|null
     */
    public function getAdvanceBooking()
    {
        return $this->AdvanceBooking;
    }
    /**
     * Set AdvanceBooking value
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesAdvanceBooking $advanceBooking
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setAdvanceBooking(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesAdvanceBooking $advanceBooking = null)
    {
        $this->AdvanceBooking = $advanceBooking;
        return $this;
    }
    /**
     * Get PickupReturnRules value
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPickupReturnRules|null
     */
    public function getPickupReturnRules()
    {
        return $this->PickupReturnRules;
    }
    /**
     * Set PickupReturnRules value
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPickupReturnRules $pickupReturnRules
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setPickupReturnRules(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPickupReturnRules $pickupReturnRules = null)
    {
        $this->PickupReturnRules = $pickupReturnRules;
        return $this;
    }
    /**
     * Get RateGuarantee value
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateGuarantee|null
     */
    public function getRateGuarantee()
    {
        return $this->RateGuarantee;
    }
    /**
     * Set RateGuarantee value
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateGuarantee $rateGuarantee
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setRateGuarantee(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateGuarantee $rateGuarantee = null)
    {
        $this->RateGuarantee = $rateGuarantee;
        return $this;
    }
    /**
     * Get PaymentRules value
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPaymentRules|null
     */
    public function getPaymentRules()
    {
        return $this->PaymentRules;
    }
    /**
     * Set PaymentRules value
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPaymentRules $paymentRules
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setPaymentRules(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesPaymentRules $paymentRules = null)
    {
        $this->PaymentRules = $paymentRules;
        return $this;
    }
    /**
     * Get CancelPenaltyInfo value
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo[]|null
     */
    public function getCancelPenaltyInfo()
    {
        return $this->CancelPenaltyInfo;
    }
    /**
     * Set CancelPenaltyInfo value
     * @throws \InvalidArgumentException
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo[] $cancelPenaltyInfo
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setCancelPenaltyInfo(array $cancelPenaltyInfo = array())
    {
        foreach ($cancelPenaltyInfo as $oTA_VehRateRuleRSRateRulesCancelPenaltyInfoItem) {
            // validation for constraint: itemType
            if (!$oTA_VehRateRuleRSRateRulesCancelPenaltyInfoItem instanceof \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo) {
                throw new \InvalidArgumentException(sprintf('The CancelPenaltyInfo property can only contain items of \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo, "%s" given', is_object($oTA_VehRateRuleRSRateRulesCancelPenaltyInfoItem) ? get_class($oTA_VehRateRuleRSRateRulesCancelPenaltyInfoItem) : gettype($oTA_VehRateRuleRSRateRulesCancelPenaltyInfoItem)), __LINE__);
            }
        }
        $this->CancelPenaltyInfo = $cancelPenaltyInfo;
        return $this;
    }
    /**
     * Add item to CancelPenaltyInfo value
     * @throws \InvalidArgumentException
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo $item
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function addToCancelPenaltyInfo(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo) {
            throw new \InvalidArgumentException(sprintf('The CancelPenaltyInfo property can only contain items of \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesCancelPenaltyInfo, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->CancelPenaltyInfo[] = $item;
        return $this;
    }
    /**
     * Get RateDeposit value
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateDeposit|null
     */
    public function getRateDeposit()
    {
        return $this->RateDeposit;
    }
    /**
     * Set RateDeposit value
     * @param \dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateDeposit $rateDeposit
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setRateDeposit(\dgsoft\StructType\DgOTA_VehRateRuleRSRateRulesRateDeposit $rateDeposit = null)
    {
        $this->RateDeposit = $rateDeposit;
        return $this;
    }
    /**
     * Get MinimumKeep value
     * @return string|null
     */
    public function getMinimumKeep()
    {
        return $this->MinimumKeep;
    }
    /**
     * Set MinimumKeep value
     * @param string $minimumKeep
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setMinimumKeep($minimumKeep = null)
    {
        // validation for constraint: string
        if (!is_null($minimumKeep) && !is_string($minimumKeep)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($minimumKeep)), __LINE__);
        }
        $this->MinimumKeep = $minimumKeep;
        return $this;
    }
    /**
     * Get MaximumKeep value
     * @return string|null
     */
    public function getMaximumKeep()
    {
        return $this->MaximumKeep;
    }
    /**
     * Set MaximumKeep value
     * @param string $maximumKeep
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setMaximumKeep($maximumKeep = null)
    {
        // validation for constraint: string
        if (!is_null($maximumKeep) && !is_string($maximumKeep)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($maximumKeep)), __LINE__);
        }
        $this->MaximumKeep = $maximumKeep;
        return $this;
    }
    /**
     * Get MaximumRental value
     * @return string|null
     */
    public function getMaximumRental()
    {
        return $this->MaximumRental;
    }
    /**
     * Set MaximumRental value
     * @param string $maximumRental
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public function setMaximumRental($maximumRental = null)
    {
        // validation for constraint: string
        if (!is_null($maximumRental) && !is_string($maximumRental)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($maximumRental)), __LINE__);
        }
        $this->MaximumRental = $maximumRental;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSRateRules
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
