<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Anagrafe_Ricerca StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:Anagrafe_Ricerca
 * @subpackage Structs
 */
class Anagrafe_Ricerca extends AbstractStructBase
{
    /**
     * The CodiceFiscale
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $CodiceFiscale;
    /**
     * The Cognome
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Cognome;
    /**
     * The Nome
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Nome;
    /**
     * Constructor method for Anagrafe_Ricerca
     * @uses Anagrafe_Ricerca::setCodiceFiscale()
     * @uses Anagrafe_Ricerca::setCognome()
     * @uses Anagrafe_Ricerca::setNome()
     * @param string $codiceFiscale
     * @param string $cognome
     * @param string $nome
     */
    public function __construct($codiceFiscale = null, $cognome = null, $nome = null)
    {
        $this
            ->setCodiceFiscale($codiceFiscale)
            ->setCognome($cognome)
            ->setNome($nome);
    }
    /**
     * Get CodiceFiscale 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 getCodiceFiscale()
    {
        return isset($this->CodiceFiscale) ? $this->CodiceFiscale : null;
    }
    /**
     * Set CodiceFiscale 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 $codiceFiscale
     * @return Anagrafe_Ricerca
     */
    public function setCodiceFiscale($codiceFiscale = null)
    {
        // validation for constraint: string
        if (!is_null($codiceFiscale) && !is_string($codiceFiscale)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($codiceFiscale, true), gettype($codiceFiscale)), __LINE__);
        }
        if (is_null($codiceFiscale) || (is_array($codiceFiscale) && empty($codiceFiscale))) {
            unset($this->CodiceFiscale);
        } else {
            $this->CodiceFiscale = $codiceFiscale;
        }
        return $this;
    }
    /**
     * Get Cognome 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 getCognome()
    {
        return isset($this->Cognome) ? $this->Cognome : null;
    }
    /**
     * Set Cognome 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 $cognome
     * @return Anagrafe_Ricerca
     */
    public function setCognome($cognome = null)
    {
        // validation for constraint: string
        if (!is_null($cognome) && !is_string($cognome)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cognome, true), gettype($cognome)), __LINE__);
        }
        if (is_null($cognome) || (is_array($cognome) && empty($cognome))) {
            unset($this->Cognome);
        } else {
            $this->Cognome = $cognome;
        }
        return $this;
    }
    /**
     * Get Nome 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 getNome()
    {
        return isset($this->Nome) ? $this->Nome : null;
    }
    /**
     * Set Nome 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 $nome
     * @return Anagrafe_Ricerca
     */
    public function setNome($nome = null)
    {
        // validation for constraint: string
        if (!is_null($nome) && !is_string($nome)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nome, true), gettype($nome)), __LINE__);
        }
        if (is_null($nome) || (is_array($nome) && empty($nome))) {
            unset($this->Nome);
        } else {
            $this->Nome = $nome;
        }
        return $this;
    }
}
