<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for WarningType StructType
 * @package Dg
 * @subpackage Structs
 */
class DgWarningType extends DgFreeTextType
{
    /**
     * The _
     * @var \dgsoft\StructType\DgFreeTextType
     */
    public $_;
    /**
     * The Type
     * @var string
     */
    public $Type;
    /**
     * The ShortText
     * @var string
     */
    public $ShortText;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The DocURL
     * @var string
     */
    public $DocURL;
    /**
     * The Status
     * @var string
     */
    public $Status;
    /**
     * The Tag
     * @var string
     */
    public $Tag;
    /**
     * The RecordID
     * @var string
     */
    public $RecordID;
    /**
     * The RPH
     * @var string
     */
    public $RPH;
    /**
     * Constructor method for WarningType
     * @uses DgWarningType::set_()
     * @uses DgWarningType::setType()
     * @uses DgWarningType::setShortText()
     * @uses DgWarningType::setCode()
     * @uses DgWarningType::setDocURL()
     * @uses DgWarningType::setStatus()
     * @uses DgWarningType::setTag()
     * @uses DgWarningType::setRecordID()
     * @uses DgWarningType::setRPH()
     * @param \dgsoft\StructType\DgFreeTextType $_
     * @param string $type
     * @param string $shortText
     * @param string $code
     * @param string $docURL
     * @param string $status
     * @param string $tag
     * @param string $recordID
     * @param string $rPH
     */
    public function __construct(\dgsoft\StructType\DgFreeTextType $_ = null, $type = null, $shortText = null, $code = null, $docURL = null, $status = null, $tag = null, $recordID = null, $rPH = null)
    {
        $this
            ->set_($_)
            ->setType($type)
            ->setShortText($shortText)
            ->setCode($code)
            ->setDocURL($docURL)
            ->setStatus($status)
            ->setTag($tag)
            ->setRecordID($recordID)
            ->setRPH($rPH);
    }
    /**
     * Get _ value
     * @return \dgsoft\StructType\DgFreeTextType|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param \dgsoft\StructType\DgFreeTextType $_
     * @return \dgsoft\StructType\DgWarningType
     */
    public function set_(\dgsoft\StructType\DgFreeTextType $_ = null)
    {
        $this->_ = $_;
        return $this;
    }
    /**
     * Get Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \dgsoft\StructType\DgWarningType
     */
    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 ShortText value
     * @return string|null
     */
    public function getShortText()
    {
        return $this->ShortText;
    }
    /**
     * Set ShortText value
     * @param string $shortText
     * @return \dgsoft\StructType\DgWarningType
     */
    public function setShortText($shortText = null)
    {
        // validation for constraint: string
        if (!is_null($shortText) && !is_string($shortText)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($shortText)), __LINE__);
        }
        $this->ShortText = $shortText;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \dgsoft\StructType\DgWarningType
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get DocURL value
     * @return string|null
     */
    public function getDocURL()
    {
        return $this->DocURL;
    }
    /**
     * Set DocURL value
     * @param string $docURL
     * @return \dgsoft\StructType\DgWarningType
     */
    public function setDocURL($docURL = null)
    {
        // validation for constraint: string
        if (!is_null($docURL) && !is_string($docURL)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($docURL)), __LINE__);
        }
        $this->DocURL = $docURL;
        return $this;
    }
    /**
     * Get Status value
     * @return string|null
     */
    public function getStatus()
    {
        return $this->Status;
    }
    /**
     * Set Status value
     * @param string $status
     * @return \dgsoft\StructType\DgWarningType
     */
    public function setStatus($status = null)
    {
        // validation for constraint: string
        if (!is_null($status) && !is_string($status)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($status)), __LINE__);
        }
        $this->Status = $status;
        return $this;
    }
    /**
     * Get Tag value
     * @return string|null
     */
    public function getTag()
    {
        return $this->Tag;
    }
    /**
     * Set Tag value
     * @param string $tag
     * @return \dgsoft\StructType\DgWarningType
     */
    public function setTag($tag = null)
    {
        // validation for constraint: string
        if (!is_null($tag) && !is_string($tag)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($tag)), __LINE__);
        }
        $this->Tag = $tag;
        return $this;
    }
    /**
     * Get RecordID value
     * @return string|null
     */
    public function getRecordID()
    {
        return $this->RecordID;
    }
    /**
     * Set RecordID value
     * @param string $recordID
     * @return \dgsoft\StructType\DgWarningType
     */
    public function setRecordID($recordID = null)
    {
        // validation for constraint: string
        if (!is_null($recordID) && !is_string($recordID)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($recordID)), __LINE__);
        }
        $this->RecordID = $recordID;
        return $this;
    }
    /**
     * Get RPH value
     * @return string|null
     */
    public function getRPH()
    {
        return $this->RPH;
    }
    /**
     * Set RPH value
     * @param string $rPH
     * @return \dgsoft\StructType\DgWarningType
     */
    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\DgWarningType
     */
    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__;
    }
}
