<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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