<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TimeDurationType StructType
 * @package Dg
 * @subpackage Structs
 */
class DgTimeDurationType extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The Minimum
     * @var string
     */
    public $Minimum;
    /**
     * The Maximum
     * @var string
     */
    public $Maximum;
    /**
     * Constructor method for TimeDurationType
     * @uses DgTimeDurationType::set_()
     * @uses DgTimeDurationType::setMinimum()
     * @uses DgTimeDurationType::setMaximum()
     * @param string $_
     * @param string $minimum
     * @param string $maximum
     */
    public function __construct($_ = null, $minimum = null, $maximum = null)
    {
        $this
            ->set_($_)
            ->setMinimum($minimum)
            ->setMaximum($maximum);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \dgsoft\StructType\DgTimeDurationType
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get Minimum value
     * @return string|null
     */
    public function getMinimum()
    {
        return $this->Minimum;
    }
    /**
     * Set Minimum value
     * @param string $minimum
     * @return \dgsoft\StructType\DgTimeDurationType
     */
    public function setMinimum($minimum = null)
    {
        // validation for constraint: string
        if (!is_null($minimum) && !is_string($minimum)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($minimum)), __LINE__);
        }
        $this->Minimum = $minimum;
        return $this;
    }
    /**
     * Get Maximum value
     * @return string|null
     */
    public function getMaximum()
    {
        return $this->Maximum;
    }
    /**
     * Set Maximum value
     * @param string $maximum
     * @return \dgsoft\StructType\DgTimeDurationType
     */
    public function setMaximum($maximum = null)
    {
        // validation for constraint: string
        if (!is_null($maximum) && !is_string($maximum)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($maximum)), __LINE__);
        }
        $this->Maximum = $maximum;
        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\DgTimeDurationType
     */
    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__;
    }
}
