<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for QueryGlobalMonitorsOfflineRequest StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:QueryGlobalMonitorsOfflineRequest
 * @subpackage Structs
 */
class QueryGlobalMonitorsOfflineRequest extends AbstractStructBase
{
    /**
     * The Query
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\OfflineQuery
     */
    public $Query;
    /**
     * Constructor method for QueryGlobalMonitorsOfflineRequest
     * @uses QueryGlobalMonitorsOfflineRequest::setQuery()
     * @param \patest\StructType\OfflineQuery $query
     */
    public function __construct(\patest\StructType\OfflineQuery $query = null)
    {
        $this
            ->setQuery($query);
    }
    /**
     * Get Query 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\StructType\OfflineQuery|null
     */
    public function getQuery()
    {
        return isset($this->Query) ? $this->Query : null;
    }
    /**
     * Set Query 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\StructType\OfflineQuery $query
     * @return \patest\StructType\QueryGlobalMonitorsOfflineRequest
     */
    public function setQuery(\patest\StructType\OfflineQuery $query = null)
    {
        if (is_null($query) || (is_array($query) && empty($query))) {
            unset($this->Query);
        } else {
            $this->Query = $query;
        }
        return $this;
    }
}
