<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RuleInfosDetails StructType
 * @package Dg
 * @subpackage Structs
 */
class DgRuleInfosDetails extends AbstractStructBase
{
    /**
     * The RuleTitle
     * @var string
     */
    public $RuleTitle;
    /**
     * The RuleText
     * @var string
     */
    public $RuleText;
    /**
     * The RuleDataList
     * @var string
     */
    public $RuleDataList;
    /**
     * Constructor method for RuleInfosDetails
     * @uses DgRuleInfosDetails::setRuleTitle()
     * @uses DgRuleInfosDetails::setRuleText()
     * @uses DgRuleInfosDetails::setRuleDataList()
     * @param string $ruleTitle
     * @param string $ruleText
     * @param string $ruleDataList
     */
    public function __construct($ruleTitle = null, $ruleText = null, $ruleDataList = null)
    {
        $this
            ->setRuleTitle($ruleTitle)
            ->setRuleText($ruleText)
            ->setRuleDataList($ruleDataList);
    }
    /**
     * Get RuleTitle value
     * @return string|null
     */
    public function getRuleTitle()
    {
        return $this->RuleTitle;
    }
    /**
     * Set RuleTitle value
     * @param string $ruleTitle
     * @return \dgsoft\StructType\DgRuleInfosDetails
     */
    public function setRuleTitle($ruleTitle = null)
    {
        // validation for constraint: string
        if (!is_null($ruleTitle) && !is_string($ruleTitle)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($ruleTitle)), __LINE__);
        }
        $this->RuleTitle = $ruleTitle;
        return $this;
    }
    /**
     * Get RuleText value
     * @return string|null
     */
    public function getRuleText()
    {
        return $this->RuleText;
    }
    /**
     * Set RuleText value
     * @param string $ruleText
     * @return \dgsoft\StructType\DgRuleInfosDetails
     */
    public function setRuleText($ruleText = null)
    {
        // validation for constraint: string
        if (!is_null($ruleText) && !is_string($ruleText)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($ruleText)), __LINE__);
        }
        $this->RuleText = $ruleText;
        return $this;
    }
    /**
     * Get RuleDataList value
     * @return string|null
     */
    public function getRuleDataList()
    {
        return $this->RuleDataList;
    }
    /**
     * Set RuleDataList value
     * @param string $ruleDataList
     * @return \dgsoft\StructType\DgRuleInfosDetails
     */
    public function setRuleDataList($ruleDataList = null)
    {
        // validation for constraint: string
        if (!is_null($ruleDataList) && !is_string($ruleDataList)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($ruleDataList)), __LINE__);
        }
        $this->RuleDataList = $ruleDataList;
        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\DgRuleInfosDetails
     */
    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__;
    }
}
