<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_hotelRatePlanTax StructType
 * @subpackage Structs
 */
class JPSOAP_hotelRatePlanTax extends AbstractStructBase
{
    /**
     * The Code
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $Code;
    /**
     * The Type
     * Meta information extracted from the WSDL
     * - use: required
     * @var string
     */
    public $Type;
    /**
     * The Amount
     * Meta information extracted from the WSDL
     * - use: required
     * @var float
     */
    public $Amount;
    /**
     * The IsFix
     * Meta information extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $IsFix;
    /**
     * The Comissionable
     * Meta information extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $Comissionable;
    /**
     * The CancellationCharges
     * Meta information extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $CancellationCharges;
    /**
     * The IncludedTaxes
     * Meta information extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $IncludedTaxes;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Date
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JPSOAP_DateIntervals
     */
    public $Date;
    /**
     * The Ages
     * Meta information 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::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 \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, \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)
            ->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_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 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('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\JPSOAP_TaxTypes', is_array($type) ? implode(', ', $type) : var_export($type, true), 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)
    {
        // validation for constraint: float
        if (!is_null($amount) && !(is_float($amount) || is_numeric($amount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($amount, true), gettype($amount)), __LINE__);
        }
        $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 %s, please provide a bool, %s given', var_export($isFix, true), 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 %s, please provide a bool, %s given', var_export($comissionable, true), 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 %s, please provide a bool, %s given', var_export($cancellationCharges, true), 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 %s, please provide a bool, %s given', var_export($includedTaxes, true), 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 %s, please provide a string, %s given', var_export($name, true), 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 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 %s, please provide a string, %s given', var_export($currency, true), 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)
    {
        // validation for constraint: float
        if (!is_null($infantAmount) && !(is_float($infantAmount) || is_numeric($infantAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($infantAmount, true), gettype($infantAmount)), __LINE__);
        }
        $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)
    {
        // validation for constraint: float
        if (!is_null($childAAmount) && !(is_float($childAAmount) || is_numeric($childAAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($childAAmount, true), gettype($childAAmount)), __LINE__);
        }
        $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)
    {
        // validation for constraint: float
        if (!is_null($childBAmount) && !(is_float($childBAmount) || is_numeric($childBAmount))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($childBAmount, true), gettype($childBAmount)), __LINE__);
        }
        $this->ChildBAmount = $childBAmount;
        return $this;
    }
}
