<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ServiceNotAvailableErrorStructure StructType
 * Meta informations extracted from the WSDL
 * - documentation: Type for Service Not Available error.
 * @subpackage Structs
 */
class ServiceNotAvailableErrorStructure extends ErrorCodeStructure
{
    /**
     * The ExpectedRestartTime
     * Meta informations extracted from the WSDL
     * - documentation: Expected time fro reavailability of servcie. +SIRI v2.0
     * - minOccurs: 0
     * @var string
     */
    public $ExpectedRestartTime;
    /**
     * Constructor method for ServiceNotAvailableErrorStructure
     * @uses ServiceNotAvailableErrorStructure::setExpectedRestartTime()
     * @param string $expectedRestartTime
     */
    public function __construct($expectedRestartTime = null)
    {
        $this
            ->setExpectedRestartTime($expectedRestartTime);
    }
    /**
     * Get ExpectedRestartTime value
     * @return string|null
     */
    public function getExpectedRestartTime()
    {
        return $this->ExpectedRestartTime;
    }
    /**
     * Set ExpectedRestartTime value
     * @param string $expectedRestartTime
     * @return \StructType\ServiceNotAvailableErrorStructure
     */
    public function setExpectedRestartTime($expectedRestartTime = null)
    {
        // validation for constraint: string
        if (!is_null($expectedRestartTime) && !is_string($expectedRestartTime)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($expectedRestartTime)), __LINE__);
        }
        $this->ExpectedRestartTime = $expectedRestartTime;
        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 \StructType\ServiceNotAvailableErrorStructure
     */
    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__;
    }
}
