<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Login_Tessera StructType
 * @subpackage Structs
 */
class Login_Tessera extends AbstractStructBase
{
    /**
     * The Valore
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $Valore;
    /**
     * The TipoCodice
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $TipoCodice;
    /**
     * Constructor method for Login_Tessera
     * @uses Login_Tessera::setValore()
     * @uses Login_Tessera::setTipoCodice()
     * @param string $valore
     * @param string $tipoCodice
     */
    public function __construct($valore = null, $tipoCodice = null)
    {
        $this
            ->setValore($valore)
            ->setTipoCodice($tipoCodice);
    }
    /**
     * Get Valore 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 getValore()
    {
        return isset($this->Valore) ? $this->Valore : null;
    }
    /**
     * Set Valore 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 $valore
     * @return Login_Tessera
     */
    public function setValore($valore = null)
    {
        // validation for constraint: string
        if (!is_null($valore) && !is_string($valore)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($valore, true), gettype($valore)), __LINE__);
        }
        if (is_null($valore) || (is_array($valore) && empty($valore))) {
            unset($this->Valore);
        } else {
            $this->Valore = $valore;
        }
        return $this;
    }
    /**
     * Get TipoCodice value
     * @return string|null
     */
    public function getTipoCodice()
    {
        return $this->TipoCodice;
    }
    /**
     * Set TipoCodice value
     * @uses PRESENZE_TipiCodice::valueIsValid()
     * @uses PRESENZE_TipiCodice::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $tipoCodice
     * @return Login_Tessera
     */
    public function setTipoCodice($tipoCodice = null)
    {
        // validation for constraint: enumeration
        if (!PRESENZE_TipiCodice::valueIsValid($tipoCodice)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class PRESENZE_TipiCodice', is_array($tipoCodice) ? implode(', ', $tipoCodice) : var_export($tipoCodice, true), implode(', ', PRESENZE_TipiCodice::getValidValues())), __LINE__);
        }
        $this->TipoCodice = $tipoCodice;
        return $this;
    }
}
