<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Volontario_Model StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:Volontario_Model
 * @subpackage Structs
 */
class Volontario_Model extends AbstractStructBase
{
    /**
     * The Attivo
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $Attivo;
    /**
     * The ID
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var int
     */
    public $ID;
    /**
     * Constructor method for Volontario_Model
     * @uses Volontario_Model::setAttivo()
     * @uses Volontario_Model::setID()
     * @param bool $attivo
     * @param int $iD
     */
    public function __construct($attivo = null, $iD = null)
    {
        $this
            ->setAttivo($attivo)
            ->setID($iD);
    }
    /**
     * Get Attivo value
     * @return bool|null
     */
    public function getAttivo()
    {
        return $this->Attivo;
    }
    /**
     * Set Attivo value
     * @param bool $attivo
     * @return Volontario_Model
     */
    public function setAttivo($attivo = null)
    {
        // validation for constraint: boolean
        if (!is_null($attivo) && !is_bool($attivo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($attivo, true), gettype($attivo)), __LINE__);
        }
        $this->Attivo = $attivo;
        return $this;
    }
    /**
     * Get ID value
     * @return int|null
     */
    public function getID()
    {
        return $this->ID;
    }
    /**
     * Set ID value
     * @param int $iD
     * @return Volontario_Model
     */
    public function setID($iD = null)
    {
        // validation for constraint: int
        if (!is_null($iD) && !(is_int($iD) || ctype_digit($iD))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($iD, true), gettype($iD)), __LINE__);
        }
        $this->ID = $iD;
        return $this;
    }
}
