<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetLastPresenza_Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetLastPresenza_Response
 * @subpackage Structs
 */
class GetLastPresenza_Response extends WebService_GenericResult
{
    /**
     * The Presenza
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var PresenzaModel
     */
    public $Presenza;
    /**
     * Constructor method for GetLastPresenza_Response
     * @uses GetLastPresenza_Response::setPresenza()
     * @param PresenzaModel $presenza
     */
    public function __construct(PresenzaModel $presenza = null)
    {
        $this
            ->setPresenza($presenza);
    }
    /**
     * Get Presenza 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 PresenzaModel|null
     */
    public function getPresenza()
    {
        return isset($this->Presenza) ? $this->Presenza : null;
    }
    /**
     * Set Presenza 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 PresenzaModel $presenza
     * @return GetLastPresenza_Response
     */
    public function setPresenza(PresenzaModel $presenza = null)
    {
        if (is_null($presenza) || (is_array($presenza) && empty($presenza))) {
            unset($this->Presenza);
        } else {
            $this->Presenza = $presenza;
        }
        return $this;
    }
}
