<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsCoverageDetailTypeCoveredTrip StructType
 * @package Dg
 * @subpackage Structs
 */
class DgInsCoverageDetailTypeCoveredTrip extends DgTripFeaturesType
{
    /**
     * The Start
     * @var string
     */
    public $Start;
    /**
     * The Duration
     * @var string
     */
    public $Duration;
    /**
     * The End
     * @var string
     */
    public $End;
    /**
     * The DepositDate
     * @var string
     */
    public $DepositDate;
    /**
     * The FinalPayDate
     * @var string
     */
    public $FinalPayDate;
    /**
     * Constructor method for InsCoverageDetailTypeCoveredTrip
     * @uses DgInsCoverageDetailTypeCoveredTrip::setStart()
     * @uses DgInsCoverageDetailTypeCoveredTrip::setDuration()
     * @uses DgInsCoverageDetailTypeCoveredTrip::setEnd()
     * @uses DgInsCoverageDetailTypeCoveredTrip::setDepositDate()
     * @uses DgInsCoverageDetailTypeCoveredTrip::setFinalPayDate()
     * @param string $start
     * @param string $duration
     * @param string $end
     * @param string $depositDate
     * @param string $finalPayDate
     */
    public function __construct($start = null, $duration = null, $end = null, $depositDate = null, $finalPayDate = null)
    {
        $this
            ->setStart($start)
            ->setDuration($duration)
            ->setEnd($end)
            ->setDepositDate($depositDate)
            ->setFinalPayDate($finalPayDate);
    }
    /**
     * Get Start value
     * @return string|null
     */
    public function getStart()
    {
        return $this->Start;
    }
    /**
     * Set Start value
     * @param string $start
     * @return \dgsoft\StructType\DgInsCoverageDetailTypeCoveredTrip
     */
    public function setStart($start = null)
    {
        // validation for constraint: string
        if (!is_null($start) && !is_string($start)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($start)), __LINE__);
        }
        $this->Start = $start;
        return $this;
    }
    /**
     * Get Duration value
     * @return string|null
     */
    public function getDuration()
    {
        return $this->Duration;
    }
    /**
     * Set Duration value
     * @param string $duration
     * @return \dgsoft\StructType\DgInsCoverageDetailTypeCoveredTrip
     */
    public function setDuration($duration = null)
    {
        // validation for constraint: string
        if (!is_null($duration) && !is_string($duration)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($duration)), __LINE__);
        }
        $this->Duration = $duration;
        return $this;
    }
    /**
     * Get End value
     * @return string|null
     */
    public function getEnd()
    {
        return $this->End;
    }
    /**
     * Set End value
     * @param string $end
     * @return \dgsoft\StructType\DgInsCoverageDetailTypeCoveredTrip
     */
    public function setEnd($end = null)
    {
        // validation for constraint: string
        if (!is_null($end) && !is_string($end)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($end)), __LINE__);
        }
        $this->End = $end;
        return $this;
    }
    /**
     * Get DepositDate value
     * @return string|null
     */
    public function getDepositDate()
    {
        return $this->DepositDate;
    }
    /**
     * Set DepositDate value
     * @param string $depositDate
     * @return \dgsoft\StructType\DgInsCoverageDetailTypeCoveredTrip
     */
    public function setDepositDate($depositDate = null)
    {
        // validation for constraint: string
        if (!is_null($depositDate) && !is_string($depositDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($depositDate)), __LINE__);
        }
        $this->DepositDate = $depositDate;
        return $this;
    }
    /**
     * Get FinalPayDate value
     * @return string|null
     */
    public function getFinalPayDate()
    {
        return $this->FinalPayDate;
    }
    /**
     * Set FinalPayDate value
     * @param string $finalPayDate
     * @return \dgsoft\StructType\DgInsCoverageDetailTypeCoveredTrip
     */
    public function setFinalPayDate($finalPayDate = null)
    {
        // validation for constraint: string
        if (!is_null($finalPayDate) && !is_string($finalPayDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($finalPayDate)), __LINE__);
        }
        $this->FinalPayDate = $finalPayDate;
        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\DgInsCoverageDetailTypeCoveredTrip
     */
    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__;
    }
}
