<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetMessaggiResponse StructType
 * @subpackage Structs
 */
class GetMessaggiResponse extends AbstractStructBase
{
    /**
     * The GetMessaggiResult
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var GetMessaggi_Result
     */
    public $GetMessaggiResult;
    /**
     * Constructor method for GetMessaggiResponse
     * @uses GetMessaggiResponse::setGetMessaggiResult()
     * @param GetMessaggi_Result $getMessaggiResult
     */
    public function __construct(GetMessaggi_Result $getMessaggiResult = null)
    {
        $this
            ->setGetMessaggiResult($getMessaggiResult);
    }
    /**
     * Get GetMessaggiResult 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 GetMessaggi_Result|null
     */
    public function getGetMessaggiResult()
    {
        return isset($this->GetMessaggiResult) ? $this->GetMessaggiResult : null;
    }
    /**
     * Set GetMessaggiResult 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 GetMessaggi_Result $getMessaggiResult
     * @return GetMessaggiResponse
     */
    public function setGetMessaggiResult(GetMessaggi_Result $getMessaggiResult = null)
    {
        if (is_null($getMessaggiResult) || (is_array($getMessaggiResult) && empty($getMessaggiResult))) {
            unset($this->GetMessaggiResult);
        } else {
            $this->GetMessaggiResult = $getMessaggiResult;
        }
        return $this;
    }
}
