<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for InsertRichiestaCartellino_Request StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:InsertRichiestaCartellino_Request
 * @subpackage Structs
 */
class InsertRichiestaCartellino_Request extends AbstractStructBase
{
    /**
     * The Note
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Note;
    /**
     * The Richiesta
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var RichiestaCartellino
     */
    public $Richiesta;
    /**
     * Constructor method for InsertRichiestaCartellino_Request
     * @uses InsertRichiestaCartellino_Request::setNote()
     * @uses InsertRichiestaCartellino_Request::setRichiesta()
     * @param string $note
     * @param RichiestaCartellino $richiesta
     */
    public function __construct($note = null, RichiestaCartellino $richiesta = null)
    {
        $this
            ->setNote($note)
            ->setRichiesta($richiesta);
    }
    /**
     * Get Note 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 getNote()
    {
        return isset($this->Note) ? $this->Note : null;
    }
    /**
     * Set Note 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 $note
     * @return InsertRichiestaCartellino_Request
     */
    public function setNote($note = null)
    {
        // validation for constraint: string
        if (!is_null($note) && !is_string($note)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($note, true), gettype($note)), __LINE__);
        }
        if (is_null($note) || (is_array($note) && empty($note))) {
            unset($this->Note);
        } else {
            $this->Note = $note;
        }
        return $this;
    }
    /**
     * Get Richiesta 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 RichiestaCartellino|null
     */
    public function getRichiesta()
    {
        return isset($this->Richiesta) ? $this->Richiesta : null;
    }
    /**
     * Set Richiesta 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 RichiestaCartellino $richiesta
     * @return InsertRichiestaCartellino_Request
     */
    public function setRichiesta(RichiestaCartellino $richiesta = null)
    {
        if (is_null($richiesta) || (is_array($richiesta) && empty($richiesta))) {
            unset($this->Richiesta);
        } else {
            $this->Richiesta = $richiesta;
        }
        return $this;
    }
}
