<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetAvailableDeliveries-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetAvailableDeliveries-Response
 * @subpackage Structs
 */
class GetAvailableDeliveries_Response extends ExtensibleDataContract
{
    /**
     * The DeliveryMethods
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfDeliveryMethodDescription
     */
    public $DeliveryMethods;
    /**
     * Constructor method for GetAvailableDeliveries-Response
     * @uses GetAvailableDeliveries_Response::setDeliveryMethods()
     * @param \patest\ArrayType\ArrayOfDeliveryMethodDescription $deliveryMethods
     */
    public function __construct(\patest\ArrayType\ArrayOfDeliveryMethodDescription $deliveryMethods = null)
    {
        $this
            ->setDeliveryMethods($deliveryMethods);
    }
    /**
     * Get DeliveryMethods 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 \patest\ArrayType\ArrayOfDeliveryMethodDescription|null
     */
    public function getDeliveryMethods()
    {
        return isset($this->DeliveryMethods) ? $this->DeliveryMethods : null;
    }
    /**
     * Set DeliveryMethods 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 \patest\ArrayType\ArrayOfDeliveryMethodDescription $deliveryMethods
     * @return \patest\StructType\GetAvailableDeliveries_Response
     */
    public function setDeliveryMethods(\patest\ArrayType\ArrayOfDeliveryMethodDescription $deliveryMethods = null)
    {
        if (is_null($deliveryMethods) || (is_array($deliveryMethods) && empty($deliveryMethods))) {
            unset($this->DeliveryMethods);
        } else {
            $this->DeliveryMethods = $deliveryMethods;
        }
        return $this;
    }
}
