<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsuranceReservation StructType
 * @package Dg
 * @subpackage Structs
 */
class DgInsuranceReservation extends AbstractStructBase
{
    /**
     * The PlanID
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $PlanID;
    /**
     * Constructor method for InsuranceReservation
     * @uses DgInsuranceReservation::setPlanID()
     * @param int $planID
     */
    public function __construct($planID = null)
    {
        $this
            ->setPlanID($planID);
    }
    /**
     * Get PlanID value
     * @return int
     */
    public function getPlanID()
    {
        return $this->PlanID;
    }
    /**
     * Set PlanID value
     * @param int $planID
     * @return \dgsoft\StructType\DgInsuranceReservation
     */
    public function setPlanID($planID = null)
    {
        // validation for constraint: int
        if (!is_null($planID) && !is_numeric($planID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($planID)), __LINE__);
        }
        $this->PlanID = $planID;
        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\DgInsuranceReservation
     */
    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__;
    }
}
