#ifndef REFLECTANCERANGETYPE_TYPE_HPP_INCLUDED
#define REFLECTANCERANGETYPE_TYPE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/PercentFraction_Type.h>
#include <NBO/NBO/PositiveFloat_Type.h>
#include <NBO/NBO/UnitsLength_Type.h>
#include <NBO/NBO/ENBOType.h>
#include <NBO/NBOGlobal.h>
#include <NBO/Shared/Base/NBOBaseClass.h>


namespace Inscoper::NBO {

/*!
* \brief Represents the XML complex type ReflectanceRangeType.
*
* This field records the key Wavelength that characterizes this Reflectance Range (also known as Reflection band). In most cases, Wavelength refers to the CutOn Wavelength (i.e., below which there is less than 50% transmittance) but it might also refer to the CutOff wavelength (i.e., above which there is less than 50% transmittance) or the Center Wavelength of the Reflectance Band.
*/
class NBO_EXPORT ReflectanceRangeType_Type : public NBOBaseClass {

public:
	
	ReflectanceRangeType_Type();
	~ReflectanceRangeType_Type();

	/*!
	* \brief Cast a NBOBaseClass to a ReflectanceRangeType_Type.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<ReflectanceRangeType_Type> fromBase(NBOBaseClassPtr base);

	/*!
	* \brief Returns the class type name.
	*
	* \return The class type name
	*/
	std::string getTypeName() const override;

	/*!
	* \brief Returns the XML element name corresponding to this class.
	*
	* \return The XML element name
	*/
	std::string getXMLName() const override;

	/*!
	* \brief Returns the NBO Type corresponding to this class.
	*
	* \return The NBO Type value
	*/
	ENBOType getNBOType() const override;

	/*!
	* \brief Returns a list of all classes derived from this class.
	*
	* \return The list of derived classes
	*/
	std::vector<NBOBaseClassPtr> getChildren() const override;

	/*!
	* \brief Returns a list of all child elements contained in this class.
	*
	* \return The list of child classes
	*/
	std::vector<NBOBaseClassPtr> getSubElements() const override;

	/*!
	* \brief Populates this object from a JSON file.
	*
	* \param path The path to the JSON file
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromJsonFile(const std::string& path, bool validate = true);

	/*!
	* \brief Populates this object from a JSON string.
	*
	* \param json_string The JSON content as a string
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromJsonString(const std::string& json_string, bool validate = true);

	/*!
	* \brief Populates this object from a XML file.
	*
	* \param path The path to the XML file
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromXmlFile(const std::string& path, bool validate = true);

	/*!
	* \brief Populates this object from a XML string.
	*
	* \param xml_string The XML content as a string
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromXmlString(const std::string& xml_string, bool validate = true);

	/*!
	* \brief Serializes this object to an XML file.
	*
	* \param filename The path to the output XML file
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void toXmlFile(const std::string& filename, bool validate = true) const;

	/*!
	* \brief Serializes this object to an XML string.
	*
	* \param validate If true, validates constraints on value. Default is true.
	* \return A string containing the XML representation of this object
	*/
	std::string toXmlString(bool validate = true) const;

	/*!
	* \brief Sets the value of the Wavelength attribute.
	*
	* This field records the key Wavelength that characterizes this Reflectance Range (also known as Reflection band). In most cases, Wavelength refers to the CutOn Wavelength (i.e., below which there is less than 50% transmittance) but it might also refer to the CutOff wavelength (i.e., above which there is less than 50% transmittance) or the Center Wavelength of the Reflectance Band.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setWavelength(const Inscoper::NBO::PositiveFloat_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Wavelength attribute.
	*
	* This field records the key Wavelength that characterizes this Reflectance Range (also known as Reflection band). In most cases, Wavelength refers to the CutOn Wavelength (i.e., below which there is less than 50% transmittance) but it might also refer to the CutOff wavelength (i.e., above which there is less than 50% transmittance) or the Center Wavelength of the Reflectance Band.
	*
	* \return The value of the attribute
	*/
	PositiveFloat_TypePtr getWavelength() const;

	/*!
	* \brief Resets the Wavelength attribute to an unset state.
	*
	* This field records the key Wavelength that characterizes this Reflectance Range (also known as Reflection band). In most cases, Wavelength refers to the CutOn Wavelength (i.e., below which there is less than 50% transmittance) but it might also refer to the CutOff wavelength (i.e., above which there is less than 50% transmittance) or the Center Wavelength of the Reflectance Band.
	*/
	void resetWavelength();

	/*!
	* \brief Checks whether the optional Wavelength attribute is present.
	*
	* This field records the key Wavelength that characterizes this Reflectance Range (also known as Reflection band). In most cases, Wavelength refers to the CutOn Wavelength (i.e., below which there is less than 50% transmittance) but it might also refer to the CutOff wavelength (i.e., above which there is less than 50% transmittance) or the Center Wavelength of the Reflectance Band.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasWavelength() const;

	/*!
	* \brief Sets the value of the FWHMBandwidth attribute.
	*
	* This field records the width of this Reflectance Range (also known as Reflection band). Specifically, the Full Width at Half Maximum (FWHM) represents the bandwidth of the Wavelength spectrum curve measured between those points whose transmission amplitude is 50% of the maximum. In case bandwidth is not available, such as in the case of a LongPass, Notch or ShortPass configuration, please enter 000.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setFWHMBandwidth(const Inscoper::NBO::PositiveFloat_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the FWHMBandwidth attribute.
	*
	* This field records the width of this Reflectance Range (also known as Reflection band). Specifically, the Full Width at Half Maximum (FWHM) represents the bandwidth of the Wavelength spectrum curve measured between those points whose transmission amplitude is 50% of the maximum. In case bandwidth is not available, such as in the case of a LongPass, Notch or ShortPass configuration, please enter 000.
	*
	* \return The value of the attribute
	*/
	PositiveFloat_TypePtr getFWHMBandwidth() const;

	/*!
	* \brief Resets the FWHMBandwidth attribute to an unset state.
	*
	* This field records the width of this Reflectance Range (also known as Reflection band). Specifically, the Full Width at Half Maximum (FWHM) represents the bandwidth of the Wavelength spectrum curve measured between those points whose transmission amplitude is 50% of the maximum. In case bandwidth is not available, such as in the case of a LongPass, Notch or ShortPass configuration, please enter 000.
	*/
	void resetFWHMBandwidth();

	/*!
	* \brief Checks whether the optional FWHMBandwidth attribute is present.
	*
	* This field records the width of this Reflectance Range (also known as Reflection band). Specifically, the Full Width at Half Maximum (FWHM) represents the bandwidth of the Wavelength spectrum curve measured between those points whose transmission amplitude is 50% of the maximum. In case bandwidth is not available, such as in the case of a LongPass, Notch or ShortPass configuration, please enter 000.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasFWHMBandwidth() const;

	/*!
	* \brief Sets the value of the WavelengthUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setWavelengthUnit(const Inscoper::NBO::UnitsLength_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the WavelengthUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsLength_TypePtr getWavelengthUnit() const;

	/*!
	* \brief Resets the WavelengthUnit attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetWavelengthUnit();

	/*!
	* \brief Checks whether the optional WavelengthUnit attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasWavelengthUnit() const;

	/*!
	* \brief Sets the value of the Reflectance attribute.
	*
	* This field records the maximum amount of light this optical component is capable of reflecting in this Wavelength Range, at the peak Wavelength. It is represented as a fractional value from 0.0 to 1.0.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setReflectance(const Inscoper::NBO::PercentFraction_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Reflectance attribute.
	*
	* This field records the maximum amount of light this optical component is capable of reflecting in this Wavelength Range, at the peak Wavelength. It is represented as a fractional value from 0.0 to 1.0.
	*
	* \return The value of the attribute
	*/
	PercentFraction_TypePtr getReflectance() const;

	/*!
	* \brief Resets the Reflectance attribute to an unset state.
	*
	* This field records the maximum amount of light this optical component is capable of reflecting in this Wavelength Range, at the peak Wavelength. It is represented as a fractional value from 0.0 to 1.0.
	*/
	void resetReflectance();

	/*!
	* \brief Checks whether the optional Reflectance attribute is present.
	*
	* This field records the maximum amount of light this optical component is capable of reflecting in this Wavelength Range, at the peak Wavelength. It is represented as a fractional value from 0.0 to 1.0.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasReflectance() const;


private:
	class Impl;
	std::unique_ptr<Impl> pImpl;

	PositiveFloat_TypePtr Wavelength = nullptr; // Required attribute
	PositiveFloat_TypePtr FWHMBandwidth = nullptr; // Required attribute
	UnitsLength_TypePtr WavelengthUnit = nullptr; // Optional attribute
	PercentFraction_TypePtr Reflectance = nullptr; // Optional attribute
};

/*! Shared pointer for ReflectanceRangeType_Type*/
typedef std::shared_ptr<ReflectanceRangeType_Type> ReflectanceRangeType_TypePtr;

} // namespace Inscoper::NBO

#endif // REFLECTANCERANGETYPE_TYPE_HPP_INCLUDED