<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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