<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_InsuranceBookRSPlanForBookRS StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_InsuranceBookRSPlanForBookRS extends AbstractStructBase
{
    /**
     * The PolicyDetail
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRSPolicyDetail
     */
    public $PolicyDetail;
    /**
     * The CoveredTravelers
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\ArrayType\DgArrayOfCoveredTravelerType
     */
    public $CoveredTravelers;
    /**
     * The InsCoverageDetail
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgInsCoverageDetailType
     */
    public $InsCoverageDetail;
    /**
     * The PlanCost
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgPlanCostType
     */
    public $PlanCost;
    /**
     * The Contact
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgContactPersonType[]
     */
    public $Contact;
    /**
     * The PlanID
     * @var string
     */
    public $PlanID;
    /**
     * The Name
     * @var string
     */
    public $Name;
    /**
     * The Type
     * @var string
     */
    public $Type;
    /**
     * The TypeID
     * @var string
     */
    public $TypeID;
    /**
     * The RPH
     * @var string
     */
    public $RPH;
    /**
     * Constructor method for OTA_InsuranceBookRSPlanForBookRS
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setPolicyDetail()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setCoveredTravelers()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setInsCoverageDetail()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setPlanCost()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setContact()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setPlanID()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setName()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setType()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setTypeID()
     * @uses DgOTA_InsuranceBookRSPlanForBookRS::setRPH()
     * @param \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRSPolicyDetail $policyDetail
     * @param \dgsoft\ArrayType\DgArrayOfCoveredTravelerType $coveredTravelers
     * @param \dgsoft\StructType\DgInsCoverageDetailType $insCoverageDetail
     * @param \dgsoft\StructType\DgPlanCostType $planCost
     * @param \dgsoft\StructType\DgContactPersonType[] $contact
     * @param string $planID
     * @param string $name
     * @param string $type
     * @param string $typeID
     * @param string $rPH
     */
    public function __construct(\dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRSPolicyDetail $policyDetail = null, \dgsoft\ArrayType\DgArrayOfCoveredTravelerType $coveredTravelers = null, \dgsoft\StructType\DgInsCoverageDetailType $insCoverageDetail = null, \dgsoft\StructType\DgPlanCostType $planCost = null, array $contact = array(), $planID = null, $name = null, $type = null, $typeID = null, $rPH = null)
    {
        $this
            ->setPolicyDetail($policyDetail)
            ->setCoveredTravelers($coveredTravelers)
            ->setInsCoverageDetail($insCoverageDetail)
            ->setPlanCost($planCost)
            ->setContact($contact)
            ->setPlanID($planID)
            ->setName($name)
            ->setType($type)
            ->setTypeID($typeID)
            ->setRPH($rPH);
    }
    /**
     * Get PolicyDetail value
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRSPolicyDetail|null
     */
    public function getPolicyDetail()
    {
        return $this->PolicyDetail;
    }
    /**
     * Set PolicyDetail value
     * @param \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRSPolicyDetail $policyDetail
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setPolicyDetail(\dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRSPolicyDetail $policyDetail = null)
    {
        $this->PolicyDetail = $policyDetail;
        return $this;
    }
    /**
     * Get CoveredTravelers value
     * @return \dgsoft\ArrayType\DgArrayOfCoveredTravelerType|null
     */
    public function getCoveredTravelers()
    {
        return $this->CoveredTravelers;
    }
    /**
     * Set CoveredTravelers value
     * @param \dgsoft\ArrayType\DgArrayOfCoveredTravelerType $coveredTravelers
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setCoveredTravelers(\dgsoft\ArrayType\DgArrayOfCoveredTravelerType $coveredTravelers = null)
    {
        $this->CoveredTravelers = $coveredTravelers;
        return $this;
    }
    /**
     * Get InsCoverageDetail value
     * @return \dgsoft\StructType\DgInsCoverageDetailType|null
     */
    public function getInsCoverageDetail()
    {
        return $this->InsCoverageDetail;
    }
    /**
     * Set InsCoverageDetail value
     * @param \dgsoft\StructType\DgInsCoverageDetailType $insCoverageDetail
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setInsCoverageDetail(\dgsoft\StructType\DgInsCoverageDetailType $insCoverageDetail = null)
    {
        $this->InsCoverageDetail = $insCoverageDetail;
        return $this;
    }
    /**
     * Get PlanCost value
     * @return \dgsoft\StructType\DgPlanCostType|null
     */
    public function getPlanCost()
    {
        return $this->PlanCost;
    }
    /**
     * Set PlanCost value
     * @param \dgsoft\StructType\DgPlanCostType $planCost
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setPlanCost(\dgsoft\StructType\DgPlanCostType $planCost = null)
    {
        $this->PlanCost = $planCost;
        return $this;
    }
    /**
     * Get Contact value
     * @return \dgsoft\StructType\DgContactPersonType[]|null
     */
    public function getContact()
    {
        return $this->Contact;
    }
    /**
     * Set Contact value
     * @throws \InvalidArgumentException
     * @param \dgsoft\StructType\DgContactPersonType[] $contact
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setContact(array $contact = array())
    {
        foreach ($contact as $oTA_InsuranceBookRSPlanForBookRSContactItem) {
            // validation for constraint: itemType
            if (!$oTA_InsuranceBookRSPlanForBookRSContactItem instanceof \dgsoft\StructType\DgContactPersonType) {
                throw new \InvalidArgumentException(sprintf('The Contact property can only contain items of \dgsoft\StructType\DgContactPersonType, "%s" given', is_object($oTA_InsuranceBookRSPlanForBookRSContactItem) ? get_class($oTA_InsuranceBookRSPlanForBookRSContactItem) : gettype($oTA_InsuranceBookRSPlanForBookRSContactItem)), __LINE__);
            }
        }
        $this->Contact = $contact;
        return $this;
    }
    /**
     * Add item to Contact value
     * @throws \InvalidArgumentException
     * @param \dgsoft\StructType\DgContactPersonType $item
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function addToContact(\dgsoft\StructType\DgContactPersonType $item)
    {
        // validation for constraint: itemType
        if (!$item instanceof \dgsoft\StructType\DgContactPersonType) {
            throw new \InvalidArgumentException(sprintf('The Contact property can only contain items of \dgsoft\StructType\DgContactPersonType, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
        }
        $this->Contact[] = $item;
        return $this;
    }
    /**
     * Get PlanID value
     * @return string|null
     */
    public function getPlanID()
    {
        return $this->PlanID;
    }
    /**
     * Set PlanID value
     * @param string $planID
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setPlanID($planID = null)
    {
        // validation for constraint: string
        if (!is_null($planID) && !is_string($planID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($planID)), __LINE__);
        }
        $this->PlanID = $planID;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    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 Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setType($type = null)
    {
        // validation for constraint: string
        if (!is_null($type) && !is_string($type)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($type)), __LINE__);
        }
        $this->Type = $type;
        return $this;
    }
    /**
     * Get TypeID value
     * @return string|null
     */
    public function getTypeID()
    {
        return $this->TypeID;
    }
    /**
     * Set TypeID value
     * @param string $typeID
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setTypeID($typeID = null)
    {
        // validation for constraint: string
        if (!is_null($typeID) && !is_string($typeID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($typeID)), __LINE__);
        }
        $this->TypeID = $typeID;
        return $this;
    }
    /**
     * Get RPH value
     * @return string|null
     */
    public function getRPH()
    {
        return $this->RPH;
    }
    /**
     * Set RPH value
     * @param string $rPH
     * @return \dgsoft\StructType\DgOTA_InsuranceBookRSPlanForBookRS
     */
    public function setRPH($rPH = null)
    {
        // validation for constraint: string
        if (!is_null($rPH) && !is_string($rPH)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($rPH)), __LINE__);
        }
        $this->RPH = $rPH;
        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_InsuranceBookRSPlanForBookRS
     */
    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__;
    }
}
