<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for MiniRules StructType
 * @package Dg
 * @subpackage Structs
 */
class DgMiniRules extends AbstractStructBase
{
    /**
     * The TermsAndCondition
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\ArrayType\DgArrayOfFlightTermsAndCondition
     */
    public $TermsAndCondition;
    /**
     * Constructor method for MiniRules
     * @uses DgMiniRules::setTermsAndCondition()
     * @param \dgsoft\ArrayType\DgArrayOfFlightTermsAndCondition $termsAndCondition
     */
    public function __construct(\dgsoft\ArrayType\DgArrayOfFlightTermsAndCondition $termsAndCondition = null)
    {
        $this
            ->setTermsAndCondition($termsAndCondition);
    }
    /**
     * Get TermsAndCondition value
     * @return \dgsoft\ArrayType\DgArrayOfFlightTermsAndCondition|null
     */
    public function getTermsAndCondition()
    {
        return $this->TermsAndCondition;
    }
    /**
     * Set TermsAndCondition value
     * @param \dgsoft\ArrayType\DgArrayOfFlightTermsAndCondition $termsAndCondition
     * @return \dgsoft\StructType\DgMiniRules
     */
    public function setTermsAndCondition(\dgsoft\ArrayType\DgArrayOfFlightTermsAndCondition $termsAndCondition = null)
    {
        $this->TermsAndCondition = $termsAndCondition;
        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\DgMiniRules
     */
    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__;
    }
}
