<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_hotelRatePlanTax StructType
 * @subpackage Structs
 */
class JPSOAP_hotelRatePlanTax extends AbstractStructBase
{
    /**
     * The Code
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Code;
    /**
     * The Type
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Type;
    /**
     * The Amount
     * Meta informations extracted from the WSDL
     * - use: required
     * @var float
     */
    public $Amount;
    /**
     * The IsFix
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $IsFix;
    /**
     * The Comissionable
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $Comissionable;
    /**
     * The CancellationCharges
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $CancellationCharges;
    /**
     * The IncludedTaxes
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $IncludedTaxes;
    /**
     * The Name
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Date
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JPSOAP_DateIntervals
     */
    public $Date;
    /**
     * The SupplementTypes
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJPSOAP_IntCodeAttr1
     */
    public $SupplementTypes;
    /**
     * The Ages
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JPSOAP_Ages
     */
    public $Ages;
    /**
     * The Currency
     * @var string
     */
    public $Currency;
    /**
     * The InfantAmount
     * @var float
     */
    public $InfantAmount;
    /**
     * The ChildAAmount
     * @var float
     */
    public $ChildAAmount;
    /**
     * The ChildBAmount
     * @var float
     */
    public $ChildBAmount;
    /**
     * Constructor method for JPSOAP_hotelRatePlanTax
     * @uses JPSOAP_hotelRatePlanTax::setCode()
     * @uses JPSOAP_hotelRatePlanTax::setType()
     * @uses JPSOAP_hotelRatePlanTax::setAmount()
     * @uses JPSOAP_hotelRatePlanTax::setIsFix()
     * @uses JPSOAP_hotelRatePlanTax::setComissionable()
     * @uses JPSOAP_hotelRatePlanTax::setCancellationCharges()
     * @uses JPSOAP_hotelRatePlanTax::setIncludedTaxes()
     * @uses JPSOAP_hotelRatePlanTax::setName()
     * @uses JPSOAP_hotelRatePlanTax::setDate()
     * @uses JPSOAP_hotelRatePlanTax::setSupplementTypes()
     * @uses JPSOAP_hotelRatePlanTax::setAges()
     * @uses JPSOAP_hotelRatePlanTax::setCurrency()
     * @uses JPSOAP_hotelRatePlanTax::setInfantAmount()
     * @uses JPSOAP_hotelRatePlanTax::setChildAAmount()
     * @uses JPSOAP_hotelRatePlanTax::setChildBAmount()
     * @param int $code
     * @param string $type
     * @param float $amount
     * @param bool $isFix
     * @param bool $comissionable
     * @param bool $cancellationCharges
     * @param bool $includedTaxes
     * @param string $name
     * @param \StructType\JPSOAP_DateIntervals $date
     * @param \ArrayType\ArrayOfJPSOAP_IntCodeAttr1 $supplementTypes
     * @param \StructType\JPSOAP_Ages $ages
     * @param string $currency
     * @param float $infantAmount
     * @param float $childAAmount
     * @param float $childBAmount
     */
    public function __construct($code = null, $type = null, $amount = null, $isFix = null, $comissionable = null, $cancellationCharges = null, $includedTaxes = null, $name = null, \StructType\JPSOAP_DateIntervals $date = null, \ArrayType\ArrayOfJPSOAP_IntCodeAttr1 $supplementTypes = null, \StructType\JPSOAP_Ages $ages = null, $currency = null, $infantAmount = null, $childAAmount = null, $childBAmount = null)
    {
        $this
            ->setCode($code)
            ->setType($type)
            ->setAmount($amount)
            ->setIsFix($isFix)
            ->setComissionable($comissionable)
            ->setCancellationCharges($cancellationCharges)
            ->setIncludedTaxes($includedTaxes)
            ->setName($name)
            ->setDate($date)
            ->setSupplementTypes($supplementTypes)
            ->setAges($ages)
            ->setCurrency($currency)
            ->setInfantAmount($infantAmount)
            ->setChildAAmount($childAAmount)
            ->setChildBAmount($childBAmount);
    }
    /**
     * Get Code value
     * @return int
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param int $code
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setCode($code = null)
    {
        // validation for constraint: int
        if (!is_null($code) && !is_numeric($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get Type value
     * @return string
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @uses \EnumType\JPSOAP_TaxTypes::valueIsValid()
     * @uses \EnumType\JPSOAP_TaxTypes::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $type
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setType($type = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\JPSOAP_TaxTypes::valueIsValid($type)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $type, implode(', ', \EnumType\JPSOAP_TaxTypes::getValidValues())), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
    /**
     * Get Amount value
     * @return float
     */
    public function getAmount()
    {
        return $this->Amount;
    }
    /**
     * Set Amount value
     * @param float $amount
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setAmount($amount = null)
    {
        $this->Amount = $amount;
        return $this;
    }
    /**
     * Get IsFix value
     * @return bool
     */
    public function getIsFix()
    {
        return $this->IsFix;
    }
    /**
     * Set IsFix value
     * @param bool $isFix
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setIsFix($isFix = null)
    {
        // validation for constraint: boolean
        if (!is_null($isFix) && !is_bool($isFix)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($isFix)), __LINE__);
        }
        $this->IsFix = $isFix;
        return $this;
    }
    /**
     * Get Comissionable value
     * @return bool
     */
    public function getComissionable()
    {
        return $this->Comissionable;
    }
    /**
     * Set Comissionable value
     * @param bool $comissionable
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setComissionable($comissionable = null)
    {
        // validation for constraint: boolean
        if (!is_null($comissionable) && !is_bool($comissionable)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($comissionable)), __LINE__);
        }
        $this->Comissionable = $comissionable;
        return $this;
    }
    /**
     * Get CancellationCharges value
     * @return bool
     */
    public function getCancellationCharges()
    {
        return $this->CancellationCharges;
    }
    /**
     * Set CancellationCharges value
     * @param bool $cancellationCharges
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setCancellationCharges($cancellationCharges = null)
    {
        // validation for constraint: boolean
        if (!is_null($cancellationCharges) && !is_bool($cancellationCharges)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($cancellationCharges)), __LINE__);
        }
        $this->CancellationCharges = $cancellationCharges;
        return $this;
    }
    /**
     * Get IncludedTaxes value
     * @return bool
     */
    public function getIncludedTaxes()
    {
        return $this->IncludedTaxes;
    }
    /**
     * Set IncludedTaxes value
     * @param bool $includedTaxes
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setIncludedTaxes($includedTaxes = null)
    {
        // validation for constraint: boolean
        if (!is_null($includedTaxes) && !is_bool($includedTaxes)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($includedTaxes)), __LINE__);
        }
        $this->IncludedTaxes = $includedTaxes;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
    /**
     * Get Date value
     * @return \StructType\JPSOAP_DateIntervals|null
     */
    public function getDate()
    {
        return $this->Date;
    }
    /**
     * Set Date value
     * @param \StructType\JPSOAP_DateIntervals $date
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setDate(\StructType\JPSOAP_DateIntervals $date = null)
    {
        $this->Date = $date;
        return $this;
    }
    /**
     * Get SupplementTypes value
     * @return \ArrayType\ArrayOfJPSOAP_IntCodeAttr1|null
     */
    public function getSupplementTypes()
    {
        return $this->SupplementTypes;
    }
    /**
     * Set SupplementTypes value
     * @param \ArrayType\ArrayOfJPSOAP_IntCodeAttr1 $supplementTypes
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setSupplementTypes(\ArrayType\ArrayOfJPSOAP_IntCodeAttr1 $supplementTypes = null)
    {
        $this->SupplementTypes = $supplementTypes;
        return $this;
    }
    /**
     * Get Ages value
     * @return \StructType\JPSOAP_Ages|null
     */
    public function getAges()
    {
        return $this->Ages;
    }
    /**
     * Set Ages value
     * @param \StructType\JPSOAP_Ages $ages
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setAges(\StructType\JPSOAP_Ages $ages = null)
    {
        $this->Ages = $ages;
        return $this;
    }
    /**
     * Get Currency value
     * @return string|null
     */
    public function getCurrency()
    {
        return $this->Currency;
    }
    /**
     * Set Currency value
     * @param string $currency
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setCurrency($currency = null)
    {
        // validation for constraint: string
        if (!is_null($currency) && !is_string($currency)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($currency)), __LINE__);
        }
        $this->Currency = $currency;
        return $this;
    }
    /**
     * Get InfantAmount value
     * @return float|null
     */
    public function getInfantAmount()
    {
        return $this->InfantAmount;
    }
    /**
     * Set InfantAmount value
     * @param float $infantAmount
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setInfantAmount($infantAmount = null)
    {
        $this->InfantAmount = $infantAmount;
        return $this;
    }
    /**
     * Get ChildAAmount value
     * @return float|null
     */
    public function getChildAAmount()
    {
        return $this->ChildAAmount;
    }
    /**
     * Set ChildAAmount value
     * @param float $childAAmount
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setChildAAmount($childAAmount = null)
    {
        $this->ChildAAmount = $childAAmount;
        return $this;
    }
    /**
     * Get ChildBAmount value
     * @return float|null
     */
    public function getChildBAmount()
    {
        return $this->ChildBAmount;
    }
    /**
     * Set ChildBAmount value
     * @param float $childBAmount
     * @return \StructType\JPSOAP_hotelRatePlanTax
     */
    public function setChildBAmount($childBAmount = null)
    {
        $this->ChildBAmount = $childBAmount;
        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 \StructType\JPSOAP_hotelRatePlanTax
     */
    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__;
    }
}
