<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_CancellationPolicyRules StructType
 * @subpackage Structs
 */
class JP_CancellationPolicyRules extends AbstractStructBase
{
    /**
     * The FirstDayCostCancellation
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\JP_FirstDayCostCancellation
     */
    public $FirstDayCostCancellation;
    /**
     * The Description
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Description;
    /**
     * The Name
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The PolicyRules
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfJP_Rule
     */
    public $PolicyRules;
    /**
     * The CurrencyCode
     * @var string
     */
    public $CurrencyCode;
    /**
     * The Type
     * @var string
     */
    public $Type;
    /**
     * Constructor method for JP_CancellationPolicyRules
     * @uses JP_CancellationPolicyRules::setFirstDayCostCancellation()
     * @uses JP_CancellationPolicyRules::setDescription()
     * @uses JP_CancellationPolicyRules::setName()
     * @uses JP_CancellationPolicyRules::setPolicyRules()
     * @uses JP_CancellationPolicyRules::setCurrencyCode()
     * @uses JP_CancellationPolicyRules::setType()
     * @param \StructType\JP_FirstDayCostCancellation $firstDayCostCancellation
     * @param string $description
     * @param string $name
     * @param \ArrayType\ArrayOfJP_Rule $policyRules
     * @param string $currencyCode
     * @param string $type
     */
    public function __construct(\StructType\JP_FirstDayCostCancellation $firstDayCostCancellation = null, $description = null, $name = null, \ArrayType\ArrayOfJP_Rule $policyRules = null, $currencyCode = null, $type = null)
    {
        $this
            ->setFirstDayCostCancellation($firstDayCostCancellation)
            ->setDescription($description)
            ->setName($name)
            ->setPolicyRules($policyRules)
            ->setCurrencyCode($currencyCode)
            ->setType($type);
    }
    /**
     * Get FirstDayCostCancellation value
     * @return \StructType\JP_FirstDayCostCancellation|null
     */
    public function getFirstDayCostCancellation()
    {
        return $this->FirstDayCostCancellation;
    }
    /**
     * Set FirstDayCostCancellation value
     * @param \StructType\JP_FirstDayCostCancellation $firstDayCostCancellation
     * @return \StructType\JP_CancellationPolicyRules
     */
    public function setFirstDayCostCancellation(\StructType\JP_FirstDayCostCancellation $firstDayCostCancellation = null)
    {
        $this->FirstDayCostCancellation = $firstDayCostCancellation;
        return $this;
    }
    /**
     * Get Description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->Description;
    }
    /**
     * Set Description value
     * @param string $description
     * @return \StructType\JP_CancellationPolicyRules
     */
    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 Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \StructType\JP_CancellationPolicyRules
     */
    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 PolicyRules value
     * @return \ArrayType\ArrayOfJP_Rule|null
     */
    public function getPolicyRules()
    {
        return $this->PolicyRules;
    }
    /**
     * Set PolicyRules value
     * @param \ArrayType\ArrayOfJP_Rule $policyRules
     * @return \StructType\JP_CancellationPolicyRules
     */
    public function setPolicyRules(\ArrayType\ArrayOfJP_Rule $policyRules = null)
    {
        $this->PolicyRules = $policyRules;
        return $this;
    }
    /**
     * Get CurrencyCode value
     * @return string|null
     */
    public function getCurrencyCode()
    {
        return $this->CurrencyCode;
    }
    /**
     * Set CurrencyCode value
     * @param string $currencyCode
     * @return \StructType\JP_CancellationPolicyRules
     */
    public function setCurrencyCode($currencyCode = null)
    {
        // validation for constraint: string
        if (!is_null($currencyCode) && !is_string($currencyCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($currencyCode, true), gettype($currencyCode)), __LINE__);
        }
        $this->CurrencyCode = $currencyCode;
        return $this;
    }
    /**
     * Get Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \StructType\JP_CancellationPolicyRules
     */
    public function setType($type = null)
    {
        // validation for constraint: string
        if (!is_null($type) && !is_string($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($type, true), gettype($type)), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
}
