<?php

namespace OXModule\StructClass;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Filestore StructClass
 * @subpackage Structs
 */
class Filestore extends AbstractStructBase
{
    /**
     * The currentContexts
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $currentContexts;
    /**
     * The id
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $id;
    /**
     * The maxContexts
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $maxContexts;
    /**
     * The reserved
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $reserved;
    /**
     * The size
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $size;
    /**
     * The url
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $url;
    /**
     * The used
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $used;
    /**
     * Constructor method for Filestore
     * @uses Filestore::setCurrentContexts()
     * @uses Filestore::setId()
     * @uses Filestore::setMaxContexts()
     * @uses Filestore::setReserved()
     * @uses Filestore::setSize()
     * @uses Filestore::setUrl()
     * @uses Filestore::setUsed()
     * @param int $currentContexts
     * @param int $id
     * @param int $maxContexts
     * @param int $reserved
     * @param int $size
     * @param string $url
     * @param int $used
     */
    public function __construct($currentContexts = null, $id = null, $maxContexts = null, $reserved = null, $size = null, $url = null, $used = null)
    {
        $this
            ->setCurrentContexts($currentContexts)
            ->setId($id)
            ->setMaxContexts($maxContexts)
            ->setReserved($reserved)
            ->setSize($size)
            ->setUrl($url)
            ->setUsed($used);
    }
    /**
     * Get currentContexts 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 getCurrentContexts()
    {
        return isset($this->currentContexts) ? $this->currentContexts : null;
    }
    /**
     * Set currentContexts 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 $currentContexts
     * @return \OXModule\StructClass\Filestore
     */
    public function setCurrentContexts($currentContexts = null)
    {
        // validation for constraint: int
        if (!is_null($currentContexts) && !is_numeric($currentContexts)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($currentContexts)), __LINE__);
        }
        if (is_null($currentContexts) || (is_array($currentContexts) && empty($currentContexts))) {
            unset($this->currentContexts);
        } else {
            $this->currentContexts = $currentContexts;
        }
        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\Filestore
     */
    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 maxContexts 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 getMaxContexts()
    {
        return isset($this->maxContexts) ? $this->maxContexts : null;
    }
    /**
     * Set maxContexts 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 $maxContexts
     * @return \OXModule\StructClass\Filestore
     */
    public function setMaxContexts($maxContexts = null)
    {
        // validation for constraint: int
        if (!is_null($maxContexts) && !is_numeric($maxContexts)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxContexts)), __LINE__);
        }
        if (is_null($maxContexts) || (is_array($maxContexts) && empty($maxContexts))) {
            unset($this->maxContexts);
        } else {
            $this->maxContexts = $maxContexts;
        }
        return $this;
    }
    /**
     * Get reserved 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 getReserved()
    {
        return isset($this->reserved) ? $this->reserved : null;
    }
    /**
     * Set reserved 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 $reserved
     * @return \OXModule\StructClass\Filestore
     */
    public function setReserved($reserved = null)
    {
        // validation for constraint: int
        if (!is_null($reserved) && !is_numeric($reserved)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($reserved)), __LINE__);
        }
        if (is_null($reserved) || (is_array($reserved) && empty($reserved))) {
            unset($this->reserved);
        } else {
            $this->reserved = $reserved;
        }
        return $this;
    }
    /**
     * Get size 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 getSize()
    {
        return isset($this->size) ? $this->size : null;
    }
    /**
     * Set size 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 $size
     * @return \OXModule\StructClass\Filestore
     */
    public function setSize($size = null)
    {
        // validation for constraint: int
        if (!is_null($size) && !is_numeric($size)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($size)), __LINE__);
        }
        if (is_null($size) || (is_array($size) && empty($size))) {
            unset($this->size);
        } else {
            $this->size = $size;
        }
        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\Filestore
     */
    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;
    }
    /**
     * Get used 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 getUsed()
    {
        return isset($this->used) ? $this->used : null;
    }
    /**
     * Set used 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 $used
     * @return \OXModule\StructClass\Filestore
     */
    public function setUsed($used = null)
    {
        // validation for constraint: int
        if (!is_null($used) && !is_numeric($used)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($used)), __LINE__);
        }
        if (is_null($used) || (is_array($used) && empty($used))) {
            unset($this->used);
        } else {
            $this->used = $used;
        }
        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\Filestore
     */
    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__;
    }
}
