<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ResolvePresaleByCode-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ResolvePresaleByCode-Response
 * @subpackage Structs
 */
class ResolvePresaleByCode_Response extends AbstractStructBase
{
    /**
     * The Results
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfCodeResolution
     */
    public $Results;
    /**
     * Constructor method for ResolvePresaleByCode-Response
     * @uses ResolvePresaleByCode_Response::setResults()
     * @param \patest\ArrayType\ArrayOfCodeResolution $results
     */
    public function __construct(\patest\ArrayType\ArrayOfCodeResolution $results = null)
    {
        $this
            ->setResults($results);
    }
    /**
     * 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 \patest\ArrayType\ArrayOfCodeResolution|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 \patest\ArrayType\ArrayOfCodeResolution $results
     * @return \patest\StructType\ResolvePresaleByCode_Response
     */
    public function setResults(\patest\ArrayType\ArrayOfCodeResolution $results = null)
    {
        if (is_null($results) || (is_array($results) && empty($results))) {
            unset($this->Results);
        } else {
            $this->Results = $results;
        }
        return $this;
    }
}
