<?php

namespace Pepitelabs\PWS\ServiceAvailabilityService;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetServicesOptionsResponseContainer
 * ServiceAvailabilityService
 * Meta information extracted from the WSDL
 * - documentation: GetServicesOptionsResponse
 * - nillable: true
 * - type: tns:GetServicesOptionsResponseContainer
 * @subpackage Structs
 */
class GetServicesOptionsResponseContainer extends ResponseContainer
{
    /**
     * The Services
     * Meta information extracted from the WSDL
     * - documentation: Services - Service[]
     * - minOccurs: 0
     * - nillable: true
     * @var \Pepitelabs\PWS\ServiceAvailabilityService\ArrayOfService
     */
    public $Services;
    /**
     * Constructor method for GetServicesOptionsResponseContainer
     * @uses GetServicesOptionsResponseContainer::setServices()
     * @param \Pepitelabs\PWS\ServiceAvailabilityService\ArrayOfService $services
     */
    public function __construct(\Pepitelabs\PWS\ServiceAvailabilityService\ArrayOfService $services = null)
    {
        $this
            ->setServices($services);
    }
    /**
     * Get Services value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \Pepitelabs\PWS\ServiceAvailabilityService\ArrayOfService|null
     */
    public function getServices()
    {
        return isset($this->Services) ? $this->Services : null;
    }
    /**
     * Set Services value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \Pepitelabs\PWS\ServiceAvailabilityService\ArrayOfService $services
     * @return \Pepitelabs\PWS\ServiceAvailabilityService\GetServicesOptionsResponseContainer
     */
    public function setServices(\Pepitelabs\PWS\ServiceAvailabilityService\ArrayOfService $services = null)
    {
        if (is_null($services) || (is_array($services) && empty($services))) {
            unset($this->Services);
        } else {
            $this->Services = $services;
        }
        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 \Pepitelabs\PWS\ServiceAvailabilityService\GetServicesOptionsResponseContainer
     */
    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__;
    }
}
