<?php

namespace OXModule\StructClass;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Database StructClass
 * @subpackage Structs
 */
class Database extends AbstractStructBase
{
    /**
     * The clusterWeight
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $clusterWeight;
    /**
     * The currentUnits
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $currentUnits;
    /**
     * The driver
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $driver;
    /**
     * The id
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $id;
    /**
     * The login
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $login;
    /**
     * The master
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $master;
    /**
     * The masterId
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $masterId;
    /**
     * The maxUnits
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $maxUnits;
    /**
     * The name
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $name;
    /**
     * The password
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $password;
    /**
     * The poolHardLimit
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $poolHardLimit;
    /**
     * The poolInitial
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $poolInitial;
    /**
     * The poolMax
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $poolMax;
    /**
     * The read_id
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $read_id;
    /**
     * The scheme
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $scheme;
    /**
     * The url
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $url;
    /**
     * Constructor method for Database
     * @uses Database::setClusterWeight()
     * @uses Database::setCurrentUnits()
     * @uses Database::setDriver()
     * @uses Database::setId()
     * @uses Database::setLogin()
     * @uses Database::setMaster()
     * @uses Database::setMasterId()
     * @uses Database::setMaxUnits()
     * @uses Database::setName()
     * @uses Database::setPassword()
     * @uses Database::setPoolHardLimit()
     * @uses Database::setPoolInitial()
     * @uses Database::setPoolMax()
     * @uses Database::setRead_id()
     * @uses Database::setScheme()
     * @uses Database::setUrl()
     * @param int $clusterWeight
     * @param int $currentUnits
     * @param string $driver
     * @param int $id
     * @param string $login
     * @param bool $master
     * @param int $masterId
     * @param int $maxUnits
     * @param string $name
     * @param string $password
     * @param int $poolHardLimit
     * @param int $poolInitial
     * @param int $poolMax
     * @param int $read_id
     * @param string $scheme
     * @param string $url
     */
    public function __construct($clusterWeight = null, $currentUnits = null, $driver = null, $id = null, $login = null, $master = null, $masterId = null, $maxUnits = null, $name = null, $password = null, $poolHardLimit = null, $poolInitial = null, $poolMax = null, $read_id = null, $scheme = null, $url = null)
    {
        $this
            ->setClusterWeight($clusterWeight)
            ->setCurrentUnits($currentUnits)
            ->setDriver($driver)
            ->setId($id)
            ->setLogin($login)
            ->setMaster($master)
            ->setMasterId($masterId)
            ->setMaxUnits($maxUnits)
            ->setName($name)
            ->setPassword($password)
            ->setPoolHardLimit($poolHardLimit)
            ->setPoolInitial($poolInitial)
            ->setPoolMax($poolMax)
            ->setRead_id($read_id)
            ->setScheme($scheme)
            ->setUrl($url);
    }
    /**
     * Get clusterWeight 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 int|null
     */
    public function getClusterWeight()
    {
        return isset($this->clusterWeight) ? $this->clusterWeight : null;
    }
    /**
     * Set clusterWeight 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 int $clusterWeight
     * @return \OXModule\StructClass\Database
     */
    public function setClusterWeight($clusterWeight = null)
    {
        // validation for constraint: int
        if (!is_null($clusterWeight) && !is_numeric($clusterWeight)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($clusterWeight)), __LINE__);
        }
        if (is_null($clusterWeight) || (is_array($clusterWeight) && empty($clusterWeight))) {
            unset($this->clusterWeight);
        } else {
            $this->clusterWeight = $clusterWeight;
        }
        return $this;
    }
    /**
     * Get currentUnits 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 int|null
     */
    public function getCurrentUnits()
    {
        return isset($this->currentUnits) ? $this->currentUnits : null;
    }
    /**
     * Set currentUnits 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 int $currentUnits
     * @return \OXModule\StructClass\Database
     */
    public function setCurrentUnits($currentUnits = null)
    {
        // validation for constraint: int
        if (!is_null($currentUnits) && !is_numeric($currentUnits)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($currentUnits)), __LINE__);
        }
        if (is_null($currentUnits) || (is_array($currentUnits) && empty($currentUnits))) {
            unset($this->currentUnits);
        } else {
            $this->currentUnits = $currentUnits;
        }
        return $this;
    }
    /**
     * Get driver 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 getDriver()
    {
        return isset($this->driver) ? $this->driver : null;
    }
    /**
     * Set driver 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 $driver
     * @return \OXModule\StructClass\Database
     */
    public function setDriver($driver = null)
    {
        // validation for constraint: string
        if (!is_null($driver) && !is_string($driver)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($driver)), __LINE__);
        }
        if (is_null($driver) || (is_array($driver) && empty($driver))) {
            unset($this->driver);
        } else {
            $this->driver = $driver;
        }
        return $this;
    }
    /**
     * Get id 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 int|null
     */
    public function getId()
    {
        return isset($this->id) ? $this->id : null;
    }
    /**
     * Set id 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 int $id
     * @return \OXModule\StructClass\Database
     */
    public function setId($id = null)
    {
        // validation for constraint: int
        if (!is_null($id) && !is_numeric($id)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($id)), __LINE__);
        }
        if (is_null($id) || (is_array($id) && empty($id))) {
            unset($this->id);
        } else {
            $this->id = $id;
        }
        return $this;
    }
    /**
     * Get login 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 getLogin()
    {
        return isset($this->login) ? $this->login : null;
    }
    /**
     * Set login 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 $login
     * @return \OXModule\StructClass\Database
     */
    public function setLogin($login = null)
    {
        // validation for constraint: string
        if (!is_null($login) && !is_string($login)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($login)), __LINE__);
        }
        if (is_null($login) || (is_array($login) && empty($login))) {
            unset($this->login);
        } else {
            $this->login = $login;
        }
        return $this;
    }
    /**
     * Get master 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 bool|null
     */
    public function getMaster()
    {
        return isset($this->master) ? $this->master : null;
    }
    /**
     * Set master 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 bool $master
     * @return \OXModule\StructClass\Database
     */
    public function setMaster($master = null)
    {
        // validation for constraint: boolean
        if (!is_null($master) && !is_bool($master)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($master)), __LINE__);
        }
        if (is_null($master) || (is_array($master) && empty($master))) {
            unset($this->master);
        } else {
            $this->master = $master;
        }
        return $this;
    }
    /**
     * Get masterId 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 int|null
     */
    public function getMasterId()
    {
        return isset($this->masterId) ? $this->masterId : null;
    }
    /**
     * Set masterId 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 int $masterId
     * @return \OXModule\StructClass\Database
     */
    public function setMasterId($masterId = null)
    {
        // validation for constraint: int
        if (!is_null($masterId) && !is_numeric($masterId)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($masterId)), __LINE__);
        }
        if (is_null($masterId) || (is_array($masterId) && empty($masterId))) {
            unset($this->masterId);
        } else {
            $this->masterId = $masterId;
        }
        return $this;
    }
    /**
     * Get maxUnits 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 int|null
     */
    public function getMaxUnits()
    {
        return isset($this->maxUnits) ? $this->maxUnits : null;
    }
    /**
     * Set maxUnits 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 int $maxUnits
     * @return \OXModule\StructClass\Database
     */
    public function setMaxUnits($maxUnits = null)
    {
        // validation for constraint: int
        if (!is_null($maxUnits) && !is_numeric($maxUnits)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxUnits)), __LINE__);
        }
        if (is_null($maxUnits) || (is_array($maxUnits) && empty($maxUnits))) {
            unset($this->maxUnits);
        } else {
            $this->maxUnits = $maxUnits;
        }
        return $this;
    }
    /**
     * Get name 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 getName()
    {
        return isset($this->name) ? $this->name : null;
    }
    /**
     * Set name 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 $name
     * @return \OXModule\StructClass\Database
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__);
        }
        if (is_null($name) || (is_array($name) && empty($name))) {
            unset($this->name);
        } else {
            $this->name = $name;
        }
        return $this;
    }
    /**
     * Get password 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 getPassword()
    {
        return isset($this->password) ? $this->password : null;
    }
    /**
     * Set password 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 $password
     * @return \OXModule\StructClass\Database
     */
    public function setPassword($password = null)
    {
        // validation for constraint: string
        if (!is_null($password) && !is_string($password)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($password)), __LINE__);
        }
        if (is_null($password) || (is_array($password) && empty($password))) {
            unset($this->password);
        } else {
            $this->password = $password;
        }
        return $this;
    }
    /**
     * Get poolHardLimit 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 int|null
     */
    public function getPoolHardLimit()
    {
        return isset($this->poolHardLimit) ? $this->poolHardLimit : null;
    }
    /**
     * Set poolHardLimit 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 int $poolHardLimit
     * @return \OXModule\StructClass\Database
     */
    public function setPoolHardLimit($poolHardLimit = null)
    {
        // validation for constraint: int
        if (!is_null($poolHardLimit) && !is_numeric($poolHardLimit)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($poolHardLimit)), __LINE__);
        }
        if (is_null($poolHardLimit) || (is_array($poolHardLimit) && empty($poolHardLimit))) {
            unset($this->poolHardLimit);
        } else {
            $this->poolHardLimit = $poolHardLimit;
        }
        return $this;
    }
    /**
     * Get poolInitial 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 int|null
     */
    public function getPoolInitial()
    {
        return isset($this->poolInitial) ? $this->poolInitial : null;
    }
    /**
     * Set poolInitial 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 int $poolInitial
     * @return \OXModule\StructClass\Database
     */
    public function setPoolInitial($poolInitial = null)
    {
        // validation for constraint: int
        if (!is_null($poolInitial) && !is_numeric($poolInitial)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($poolInitial)), __LINE__);
        }
        if (is_null($poolInitial) || (is_array($poolInitial) && empty($poolInitial))) {
            unset($this->poolInitial);
        } else {
            $this->poolInitial = $poolInitial;
        }
        return $this;
    }
    /**
     * Get poolMax 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 int|null
     */
    public function getPoolMax()
    {
        return isset($this->poolMax) ? $this->poolMax : null;
    }
    /**
     * Set poolMax 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 int $poolMax
     * @return \OXModule\StructClass\Database
     */
    public function setPoolMax($poolMax = null)
    {
        // validation for constraint: int
        if (!is_null($poolMax) && !is_numeric($poolMax)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($poolMax)), __LINE__);
        }
        if (is_null($poolMax) || (is_array($poolMax) && empty($poolMax))) {
            unset($this->poolMax);
        } else {
            $this->poolMax = $poolMax;
        }
        return $this;
    }
    /**
     * Get read_id 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 int|null
     */
    public function getRead_id()
    {
        return isset($this->read_id) ? $this->read_id : null;
    }
    /**
     * Set read_id 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 int $read_id
     * @return \OXModule\StructClass\Database
     */
    public function setRead_id($read_id = null)
    {
        // validation for constraint: int
        if (!is_null($read_id) && !is_numeric($read_id)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($read_id)), __LINE__);
        }
        if (is_null($read_id) || (is_array($read_id) && empty($read_id))) {
            unset($this->read_id);
        } else {
            $this->read_id = $read_id;
        }
        return $this;
    }
    /**
     * Get scheme 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 getScheme()
    {
        return isset($this->scheme) ? $this->scheme : null;
    }
    /**
     * Set scheme 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 $scheme
     * @return \OXModule\StructClass\Database
     */
    public function setScheme($scheme = null)
    {
        // validation for constraint: string
        if (!is_null($scheme) && !is_string($scheme)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($scheme)), __LINE__);
        }
        if (is_null($scheme) || (is_array($scheme) && empty($scheme))) {
            unset($this->scheme);
        } else {
            $this->scheme = $scheme;
        }
        return $this;
    }
    /**
     * Get url 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 getUrl()
    {
        return isset($this->url) ? $this->url : null;
    }
    /**
     * Set url 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 $url
     * @return \OXModule\StructClass\Database
     */
    public function setUrl($url = null)
    {
        // validation for constraint: string
        if (!is_null($url) && !is_string($url)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($url)), __LINE__);
        }
        if (is_null($url) || (is_array($url) && empty($url))) {
            unset($this->url);
        } else {
            $this->url = $url;
        }
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \OXModule\StructClass\Database
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
