<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetRichiesteCartellino_Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:GetRichiesteCartellino_Response
 * @subpackage Structs
 */
class GetRichiesteCartellino_Response extends WebService_GenericResult
{
    /**
     * The LoadMore
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $LoadMore;
    /**
     * The Richieste
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var ArrayOfRichiestaCartellino
     */
    public $Richieste;
    /**
     * Constructor method for GetRichiesteCartellino_Response
     * @uses GetRichiesteCartellino_Response::setLoadMore()
     * @uses GetRichiesteCartellino_Response::setRichieste()
     * @param bool $loadMore
     * @param ArrayOfRichiestaCartellino $richieste
     */
    public function __construct($loadMore = null, ArrayOfRichiestaCartellino $richieste = null)
    {
        $this
            ->setLoadMore($loadMore)
            ->setRichieste($richieste);
    }
    /**
     * Get LoadMore value
     * @return bool|null
     */
    public function getLoadMore()
    {
        return $this->LoadMore;
    }
    /**
     * Set LoadMore value
     * @param bool $loadMore
     * @return GetRichiesteCartellino_Response
     */
    public function setLoadMore($loadMore = null)
    {
        // validation for constraint: boolean
        if (!is_null($loadMore) && !is_bool($loadMore)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($loadMore, true), gettype($loadMore)), __LINE__);
        }
        $this->LoadMore = $loadMore;
        return $this;
    }
    /**
     * Get Richieste 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 ArrayOfRichiestaCartellino|null
     */
    public function getRichieste()
    {
        return isset($this->Richieste) ? $this->Richieste : null;
    }
    /**
     * Set Richieste 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 ArrayOfRichiestaCartellino $richieste
     * @return GetRichiesteCartellino_Response
     */
    public function setRichieste(ArrayOfRichiestaCartellino $richieste = null)
    {
        if (is_null($richieste) || (is_array($richieste) && empty($richieste))) {
            unset($this->Richieste);
        } else {
            $this->Richieste = $richieste;
        }
        return $this;
    }
}
