<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_AirRulesRS StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_AirRulesRS extends AbstractStructBase
{
    /**
     * The Version
     * Meta informations extracted from the WSDL
     * - use: required
     * @var float
     */
    public $Version;
    /**
     * The Success
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgSuccessType
     */
    public $Success;
    /**
     * The FareRuleResponseInfo
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgFareRuleResponseInfoType
     */
    public $FareRuleResponseInfo;
    /**
     * The MiniRuleResponseInfo
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgMiniRuleResponseInfoType
     */
    public $MiniRuleResponseInfo;
    /**
     * The PriceMessageInfoType
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgPriceMessageInfoType
     */
    public $PriceMessageInfoType;
    /**
     * The Errors
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgErrorsType
     */
    public $Errors;
    /**
     * The Warnings
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgWarningsType
     */
    public $Warnings;
    /**
     * The RuleLink
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgRuleLink
     */
    public $RuleLink;
    /**
     * The EchoToken
     * @var string
     */
    public $EchoToken;
    /**
     * The TimeStamp
     * @var string
     */
    public $TimeStamp;
    /**
     * The Target
     * Meta informations extracted from the WSDL
     * - default: Production
     * @var string
     */
    public $Target;
    /**
     * The TransactionIdentifier
     * @var string
     */
    public $TransactionIdentifier;
    /**
     * The SequenceNmbr
     * @var int
     */
    public $SequenceNmbr;
    /**
     * The TransactionStatusCode
     * @var string
     */
    public $TransactionStatusCode;
    /**
     * The RetransmissionIndicator
     * @var bool
     */
    public $RetransmissionIndicator;
    /**
     * Constructor method for OTA_AirRulesRS
     * @uses DgOTA_AirRulesRS::setVersion()
     * @uses DgOTA_AirRulesRS::setSuccess()
     * @uses DgOTA_AirRulesRS::setFareRuleResponseInfo()
     * @uses DgOTA_AirRulesRS::setMiniRuleResponseInfo()
     * @uses DgOTA_AirRulesRS::setPriceMessageInfoType()
     * @uses DgOTA_AirRulesRS::setErrors()
     * @uses DgOTA_AirRulesRS::setWarnings()
     * @uses DgOTA_AirRulesRS::setRuleLink()
     * @uses DgOTA_AirRulesRS::setEchoToken()
     * @uses DgOTA_AirRulesRS::setTimeStamp()
     * @uses DgOTA_AirRulesRS::setTarget()
     * @uses DgOTA_AirRulesRS::setTransactionIdentifier()
     * @uses DgOTA_AirRulesRS::setSequenceNmbr()
     * @uses DgOTA_AirRulesRS::setTransactionStatusCode()
     * @uses DgOTA_AirRulesRS::setRetransmissionIndicator()
     * @param float $version
     * @param \dgsoft\StructType\DgSuccessType $success
     * @param \dgsoft\StructType\DgFareRuleResponseInfoType $fareRuleResponseInfo
     * @param \dgsoft\StructType\DgMiniRuleResponseInfoType $miniRuleResponseInfo
     * @param \dgsoft\StructType\DgPriceMessageInfoType $priceMessageInfoType
     * @param \dgsoft\StructType\DgErrorsType $errors
     * @param \dgsoft\StructType\DgWarningsType $warnings
     * @param \dgsoft\StructType\DgRuleLink $ruleLink
     * @param string $echoToken
     * @param string $timeStamp
     * @param string $target
     * @param string $transactionIdentifier
     * @param int $sequenceNmbr
     * @param string $transactionStatusCode
     * @param bool $retransmissionIndicator
     */
    public function __construct($version = null, \dgsoft\StructType\DgSuccessType $success = null, \dgsoft\StructType\DgFareRuleResponseInfoType $fareRuleResponseInfo = null, \dgsoft\StructType\DgMiniRuleResponseInfoType $miniRuleResponseInfo = null, \dgsoft\StructType\DgPriceMessageInfoType $priceMessageInfoType = null, \dgsoft\StructType\DgErrorsType $errors = null, \dgsoft\StructType\DgWarningsType $warnings = null, \dgsoft\StructType\DgRuleLink $ruleLink = null, $echoToken = null, $timeStamp = null, $target = 'Production', $transactionIdentifier = null, $sequenceNmbr = null, $transactionStatusCode = null, $retransmissionIndicator = null)
    {
        $this
            ->setVersion($version)
            ->setSuccess($success)
            ->setFareRuleResponseInfo($fareRuleResponseInfo)
            ->setMiniRuleResponseInfo($miniRuleResponseInfo)
            ->setPriceMessageInfoType($priceMessageInfoType)
            ->setErrors($errors)
            ->setWarnings($warnings)
            ->setRuleLink($ruleLink)
            ->setEchoToken($echoToken)
            ->setTimeStamp($timeStamp)
            ->setTarget($target)
            ->setTransactionIdentifier($transactionIdentifier)
            ->setSequenceNmbr($sequenceNmbr)
            ->setTransactionStatusCode($transactionStatusCode)
            ->setRetransmissionIndicator($retransmissionIndicator);
    }
    /**
     * Get Version value
     * @return float
     */
    public function getVersion()
    {
        return $this->Version;
    }
    /**
     * Set Version value
     * @param float $version
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setVersion($version = null)
    {
        $this->Version = $version;
        return $this;
    }
    /**
     * Get Success value
     * @return \dgsoft\StructType\DgSuccessType|null
     */
    public function getSuccess()
    {
        return $this->Success;
    }
    /**
     * Set Success value
     * @param \dgsoft\StructType\DgSuccessType $success
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setSuccess(\dgsoft\StructType\DgSuccessType $success = null)
    {
        $this->Success = $success;
        return $this;
    }
    /**
     * Get FareRuleResponseInfo value
     * @return \dgsoft\StructType\DgFareRuleResponseInfoType|null
     */
    public function getFareRuleResponseInfo()
    {
        return $this->FareRuleResponseInfo;
    }
    /**
     * Set FareRuleResponseInfo value
     * @param \dgsoft\StructType\DgFareRuleResponseInfoType $fareRuleResponseInfo
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setFareRuleResponseInfo(\dgsoft\StructType\DgFareRuleResponseInfoType $fareRuleResponseInfo = null)
    {
        $this->FareRuleResponseInfo = $fareRuleResponseInfo;
        return $this;
    }
    /**
     * Get MiniRuleResponseInfo value
     * @return \dgsoft\StructType\DgMiniRuleResponseInfoType|null
     */
    public function getMiniRuleResponseInfo()
    {
        return $this->MiniRuleResponseInfo;
    }
    /**
     * Set MiniRuleResponseInfo value
     * @param \dgsoft\StructType\DgMiniRuleResponseInfoType $miniRuleResponseInfo
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setMiniRuleResponseInfo(\dgsoft\StructType\DgMiniRuleResponseInfoType $miniRuleResponseInfo = null)
    {
        $this->MiniRuleResponseInfo = $miniRuleResponseInfo;
        return $this;
    }
    /**
     * Get PriceMessageInfoType value
     * @return \dgsoft\StructType\DgPriceMessageInfoType|null
     */
    public function getPriceMessageInfoType()
    {
        return $this->PriceMessageInfoType;
    }
    /**
     * Set PriceMessageInfoType value
     * @param \dgsoft\StructType\DgPriceMessageInfoType $priceMessageInfoType
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setPriceMessageInfoType(\dgsoft\StructType\DgPriceMessageInfoType $priceMessageInfoType = null)
    {
        $this->PriceMessageInfoType = $priceMessageInfoType;
        return $this;
    }
    /**
     * Get Errors value
     * @return \dgsoft\StructType\DgErrorsType|null
     */
    public function getErrors()
    {
        return $this->Errors;
    }
    /**
     * Set Errors value
     * @param \dgsoft\StructType\DgErrorsType $errors
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setErrors(\dgsoft\StructType\DgErrorsType $errors = null)
    {
        $this->Errors = $errors;
        return $this;
    }
    /**
     * Get Warnings value
     * @return \dgsoft\StructType\DgWarningsType|null
     */
    public function getWarnings()
    {
        return $this->Warnings;
    }
    /**
     * Set Warnings value
     * @param \dgsoft\StructType\DgWarningsType $warnings
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setWarnings(\dgsoft\StructType\DgWarningsType $warnings = null)
    {
        $this->Warnings = $warnings;
        return $this;
    }
    /**
     * Get RuleLink value
     * @return \dgsoft\StructType\DgRuleLink|null
     */
    public function getRuleLink()
    {
        return $this->RuleLink;
    }
    /**
     * Set RuleLink value
     * @param \dgsoft\StructType\DgRuleLink $ruleLink
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setRuleLink(\dgsoft\StructType\DgRuleLink $ruleLink = null)
    {
        $this->RuleLink = $ruleLink;
        return $this;
    }
    /**
     * Get EchoToken value
     * @return string|null
     */
    public function getEchoToken()
    {
        return $this->EchoToken;
    }
    /**
     * Set EchoToken value
     * @param string $echoToken
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setEchoToken($echoToken = null)
    {
        // validation for constraint: string
        if (!is_null($echoToken) && !is_string($echoToken)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($echoToken)), __LINE__);
        }
        $this->EchoToken = $echoToken;
        return $this;
    }
    /**
     * Get TimeStamp value
     * @return string|null
     */
    public function getTimeStamp()
    {
        return $this->TimeStamp;
    }
    /**
     * Set TimeStamp value
     * @param string $timeStamp
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setTimeStamp($timeStamp = null)
    {
        // validation for constraint: string
        if (!is_null($timeStamp) && !is_string($timeStamp)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($timeStamp)), __LINE__);
        }
        $this->TimeStamp = $timeStamp;
        return $this;
    }
    /**
     * Get Target value
     * @return string|null
     */
    public function getTarget()
    {
        return $this->Target;
    }
    /**
     * Set Target value
     * @uses \dgsoft\EnumType\DgOTA_AirRulesRSTarget::valueIsValid()
     * @uses \dgsoft\EnumType\DgOTA_AirRulesRSTarget::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $target
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setTarget($target = 'Production')
    {
        // validation for constraint: enumeration
        if (!\dgsoft\EnumType\DgOTA_AirRulesRSTarget::valueIsValid($target)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $target, implode(', ', \dgsoft\EnumType\DgOTA_AirRulesRSTarget::getValidValues())), __LINE__);
        }
        $this->Target = $target;
        return $this;
    }
    /**
     * Get TransactionIdentifier value
     * @return string|null
     */
    public function getTransactionIdentifier()
    {
        return $this->TransactionIdentifier;
    }
    /**
     * Set TransactionIdentifier value
     * @param string $transactionIdentifier
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setTransactionIdentifier($transactionIdentifier = null)
    {
        // validation for constraint: string
        if (!is_null($transactionIdentifier) && !is_string($transactionIdentifier)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($transactionIdentifier)), __LINE__);
        }
        $this->TransactionIdentifier = $transactionIdentifier;
        return $this;
    }
    /**
     * Get SequenceNmbr value
     * @return int|null
     */
    public function getSequenceNmbr()
    {
        return $this->SequenceNmbr;
    }
    /**
     * Set SequenceNmbr value
     * @param int $sequenceNmbr
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setSequenceNmbr($sequenceNmbr = null)
    {
        // validation for constraint: int
        if (!is_null($sequenceNmbr) && !is_numeric($sequenceNmbr)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($sequenceNmbr)), __LINE__);
        }
        $this->SequenceNmbr = $sequenceNmbr;
        return $this;
    }
    /**
     * Get TransactionStatusCode value
     * @return string|null
     */
    public function getTransactionStatusCode()
    {
        return $this->TransactionStatusCode;
    }
    /**
     * Set TransactionStatusCode value
     * @uses \dgsoft\EnumType\DgOTA_AirRulesRSTransactionStatusCode::valueIsValid()
     * @uses \dgsoft\EnumType\DgOTA_AirRulesRSTransactionStatusCode::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $transactionStatusCode
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setTransactionStatusCode($transactionStatusCode = null)
    {
        // validation for constraint: enumeration
        if (!\dgsoft\EnumType\DgOTA_AirRulesRSTransactionStatusCode::valueIsValid($transactionStatusCode)) {
            throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $transactionStatusCode, implode(', ', \dgsoft\EnumType\DgOTA_AirRulesRSTransactionStatusCode::getValidValues())), __LINE__);
        }
        $this->TransactionStatusCode = $transactionStatusCode;
        return $this;
    }
    /**
     * Get RetransmissionIndicator value
     * @return bool|null
     */
    public function getRetransmissionIndicator()
    {
        return $this->RetransmissionIndicator;
    }
    /**
     * Set RetransmissionIndicator value
     * @param bool $retransmissionIndicator
     * @return \dgsoft\StructType\DgOTA_AirRulesRS
     */
    public function setRetransmissionIndicator($retransmissionIndicator = null)
    {
        // validation for constraint: boolean
        if (!is_null($retransmissionIndicator) && !is_bool($retransmissionIndicator)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($retransmissionIndicator)), __LINE__);
        }
        $this->RetransmissionIndicator = $retransmissionIndicator;
        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\DgOTA_AirRulesRS
     */
    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__;
    }
}
