<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for DiagnosticParameter StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:DiagnosticParameter
 * @subpackage Structs
 */
class DiagnosticParameter extends AbstractStructBase
{
    /**
     * The results
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var ArrayOfDiagnosticResult
     */
    public $results;
    /**
     * The state
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $state;
    /**
     * Constructor method for DiagnosticParameter
     * @uses DiagnosticParameter::setResults()
     * @uses DiagnosticParameter::setState()
     * @param ArrayOfDiagnosticResult $results
     * @param string $state
     */
    public function __construct(ArrayOfDiagnosticResult $results = null, $state = null)
    {
        $this
            ->setResults($results)
            ->setState($state);
    }
    /**
     * Get results 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 ArrayOfDiagnosticResult|null
     */
    public function getResults()
    {
        return isset($this->results) ? $this->results : null;
    }
    /**
     * Set results 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 ArrayOfDiagnosticResult $results
     * @return DiagnosticParameter
     */
    public function setResults(ArrayOfDiagnosticResult $results = null)
    {
        if (is_null($results) || (is_array($results) && empty($results))) {
            unset($this->results);
        } else {
            $this->results = $results;
        }
        return $this;
    }
    /**
     * Get state 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 string|null
     */
    public function getState()
    {
        return isset($this->state) ? $this->state : null;
    }
    /**
     * Set state 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 string $state
     * @return DiagnosticParameter
     */
    public function setState($state = null)
    {
        if (is_null($state) || (is_array($state) && empty($state))) {
            unset($this->state);
        } else {
            $this->state = $state;
        }
        return $this;
    }
}
