#ifndef POLARIZATIONOPTICS_HPP_INCLUDED
#define POLARIZATIONOPTICS_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/AnnotationRef.h>
#include <NBO/NBO/Denomination_Type.h>
#include <NBO/NBO/ManufacturerSpec_Type.h>
#include <NBO/NBO/OpticalMaterialName_Type.h>
#include <NBO/NBO/PolarizationOpticsConstruction_Type.h>
#include <NBO/NBO/PolarizationOpticsFabrication_Type.h>
#include <NBO/NBO/PolarizationOpticsFunction_Type.h>
#include <NBO/NBO/PolarizationOpticsID_Type.h>
#include <NBO/NBO/PolarizationOpticsRetardation_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 element PolarizationOptics.
*
* This element describes a Polarization device positioned in the Ligth Path for this Instrument. A Polarization device is an optical filter rotatable through 360° that lets light waves of a specific polarization pass through while blocking light waves of other polarizations. This element can be associated with an optional Optics Turret.
*/
class NBO_EXPORT PolarizationOptics : public ManufacturerSpec_Type {

public:
	/*!
	* \brief Represents the XML element WavelengthRange.
	*
	* This element records the Range of Wavelengths this device is designed for, according to the Manufacturer. Multiple of this element may be used.
	*/
	class NBO_EXPORT InlineWavelengthRange : public NBOBaseClass {
	
	public:
		
		InlineWavelengthRange();
		~InlineWavelengthRange();
	
		/*!
		* \brief Cast a NBOBaseClass to a InlineWavelengthRange.
		*
		* \param base The base class to cast
		* \return The casted element, or nullptr if the cast fails
		*/
		static std::shared_ptr<InlineWavelengthRange> 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 PeakWavelength attribute.
		*
		* This field records the nominal Wavelength associated with the peak response rate of this device. 
		*
		* \param value The value to set
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setPeakWavelength(const float& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the PeakWavelength attribute.
		*
		* This field records the nominal Wavelength associated with the peak response rate of this device. 
		*
		* \return The value of the attribute
		*/
		float getPeakWavelength() const;
	
		/*!
		* \brief Resets the PeakWavelength attribute to an unset state.
		*
		* This field records the nominal Wavelength associated with the peak response rate of this device. 
		*/
		void resetPeakWavelength();
	
		/*!
		* \brief Checks whether the PeakWavelength attribute is present.
		*
		* This field records the nominal Wavelength associated with the peak response rate of this device. 
		*
		* \return true if the attribute has been set, false otherwise
		*/
		bool hasPeakWavelength() const;
	
		/*!
		* \brief Sets the value of the PeakWavelengthUnit 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 setPeakWavelengthUnit(const Inscoper::NBO::UnitsLength_TypePtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the PeakWavelengthUnit attribute.
		*
		* No description available in the XSD standard.
		*
		* \return The value of the attribute
		*/
		UnitsLength_TypePtr getPeakWavelengthUnit() const;
	
		/*!
		* \brief Resets the PeakWavelengthUnit attribute to an unset state.
		*
		* No description available in the XSD standard.
		*/
		void resetPeakWavelengthUnit();
	
		/*!
		* \brief Checks whether the optional PeakWavelengthUnit attribute is present.
		*
		* No description available in the XSD standard.
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasPeakWavelengthUnit() const;
	
		/*!
		* \brief Sets the value of the CutOn attribute.
		*
		* CutOn is the Wavelength below which the response rate is below 50%.
		*
		* \param value The value to set
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setCutOn(const Inscoper::NBO::PositiveFloat_TypePtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the CutOn attribute.
		*
		* CutOn is the Wavelength below which the response rate is below 50%.
		*
		* \return The value of the attribute
		*/
		PositiveFloat_TypePtr getCutOn() const;
	
		/*!
		* \brief Resets the CutOn attribute to an unset state.
		*
		* CutOn is the Wavelength below which the response rate is below 50%.
		*/
		void resetCutOn();
	
		/*!
		* \brief Checks whether the optional CutOn attribute is present.
		*
		* CutOn is the Wavelength below which the response rate is below 50%.
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasCutOn() const;
	
		/*!
		* \brief Sets the value of the CutOnUnit 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 setCutOnUnit(const Inscoper::NBO::UnitsLength_TypePtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the CutOnUnit attribute.
		*
		* No description available in the XSD standard.
		*
		* \return The value of the attribute
		*/
		UnitsLength_TypePtr getCutOnUnit() const;
	
		/*!
		* \brief Resets the CutOnUnit attribute to an unset state.
		*
		* No description available in the XSD standard.
		*/
		void resetCutOnUnit();
	
		/*!
		* \brief Checks whether the optional CutOnUnit attribute is present.
		*
		* No description available in the XSD standard.
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasCutOnUnit() const;
	
		/*!
		* \brief Sets the value of the CutOff attribute.
		*
		* CutOff is the Wavelength above which the response rate is below 50%.
		*
		* \param value The value to set
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setCutOff(const Inscoper::NBO::PositiveFloat_TypePtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the CutOff attribute.
		*
		* CutOff is the Wavelength above which the response rate is below 50%.
		*
		* \return The value of the attribute
		*/
		PositiveFloat_TypePtr getCutOff() const;
	
		/*!
		* \brief Resets the CutOff attribute to an unset state.
		*
		* CutOff is the Wavelength above which the response rate is below 50%.
		*/
		void resetCutOff();
	
		/*!
		* \brief Checks whether the optional CutOff attribute is present.
		*
		* CutOff is the Wavelength above which the response rate is below 50%.
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasCutOff() const;
	
		/*!
		* \brief Sets the value of the CutOffUnit 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 setCutOffUnit(const Inscoper::NBO::UnitsLength_TypePtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the CutOffUnit attribute.
		*
		* No description available in the XSD standard.
		*
		* \return The value of the attribute
		*/
		UnitsLength_TypePtr getCutOffUnit() const;
	
		/*!
		* \brief Resets the CutOffUnit attribute to an unset state.
		*
		* No description available in the XSD standard.
		*/
		void resetCutOffUnit();
	
		/*!
		* \brief Checks whether the optional CutOffUnit attribute is present.
		*
		* No description available in the XSD standard.
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasCutOffUnit() const;
	
		/*!
		* \brief Sets the value of the WavelengthProfile attribute.
		*
		* The location of a file containing the Wavelength profile of this hardware component.
		*
		* \param value The value to set
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setWavelengthProfile(const std::string& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the WavelengthProfile attribute.
		*
		* The location of a file containing the Wavelength profile of this hardware component.
		*
		* \return The value of the attribute
		*/
		std::string getWavelengthProfile() const;
	
		/*!
		* \brief Resets the WavelengthProfile attribute to an unset state.
		*
		* The location of a file containing the Wavelength profile of this hardware component.
		*/
		void resetWavelengthProfile();
	
		/*!
		* \brief Checks whether the WavelengthProfile attribute is present.
		*
		* The location of a file containing the Wavelength profile of this hardware component.
		*
		* \return true if the attribute has been set, false otherwise
		*/
		bool hasWavelengthProfile() const;
	
		/*!
		* \brief Returns the allowed values for this attribut.
		*
		* The location of a file containing the Wavelength profile of this hardware component.
		*
		* \return The list of allowed values
		*/
		static const std::set<std::string>& getWavelengthProfileAllowedValues();
	
	
	private:
		class Impl;
		std::unique_ptr<Impl> pImpl;
	
	    std::optional<float> PeakWavelength; // Optional attribute
		UnitsLength_TypePtr PeakWavelengthUnit = nullptr; // Optional attribute
		PositiveFloat_TypePtr CutOn = nullptr; // Required attribute
		UnitsLength_TypePtr CutOnUnit = nullptr; // Optional attribute
		PositiveFloat_TypePtr CutOff = nullptr; // Required attribute
		UnitsLength_TypePtr CutOffUnit = nullptr; // Optional attribute
	    std::optional<std::string> WavelengthProfile; // Required attribute
	    static const std::set<std::string> WavelengthProfileAllowedValues;
	};
	
	/*! Shared pointer for InlineWavelengthRange*/
	typedef std::shared_ptr<InlineWavelengthRange> InlineWavelengthRangePtr;
	
	
	PolarizationOptics();
	~PolarizationOptics();

	/*!
	* \brief Cast a NBOBaseClass to a PolarizationOptics.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<PolarizationOptics> 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 ID attribute.
	*
	* A Unique Identifier for this component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setID(const Inscoper::NBO::PolarizationOpticsID_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the ID attribute.
	*
	* A Unique Identifier for this component.
	*
	* \return The value of the attribute
	*/
	PolarizationOpticsID_TypePtr getID() const;

	/*!
	* \brief Resets the ID attribute to an unset state.
	*
	* A Unique Identifier for this component.
	*/
	void resetID();

	/*!
	* \brief Checks whether the optional ID attribute is present.
	*
	* A Unique Identifier for this component.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasID() const;

	/*!
	* \brief Sets the value of the Name attribute.
	*
	* A User-defined Name for this component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setName(const Inscoper::NBO::Denomination_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Name attribute.
	*
	* A User-defined Name for this component.
	*
	* \return The value of the attribute
	*/
	Denomination_TypePtr getName() const;

	/*!
	* \brief Resets the Name attribute to an unset state.
	*
	* A User-defined Name for this component.
	*/
	void resetName();

	/*!
	* \brief Checks whether the optional Name attribute is present.
	*
	* A User-defined Name for this component.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasName() const;

	/*!
	* \brief Sets the value of the Function attribute.
	*
	* This field records whether this Polarization Optics is used to generate (Polarizer) or to analyze (Analyzer) polarized light.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setFunction(const Inscoper::NBO::PolarizationOpticsFunction_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Function attribute.
	*
	* This field records whether this Polarization Optics is used to generate (Polarizer) or to analyze (Analyzer) polarized light.
	*
	* \return The value of the attribute
	*/
	PolarizationOpticsFunction_TypePtr getFunction() const;

	/*!
	* \brief Resets the Function attribute to an unset state.
	*
	* This field records whether this Polarization Optics is used to generate (Polarizer) or to analyze (Analyzer) polarized light.
	*/
	void resetFunction();

	/*!
	* \brief Checks whether the optional Function attribute is present.
	*
	* This field records whether this Polarization Optics is used to generate (Polarizer) or to analyze (Analyzer) polarized light.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasFunction() const;

	/*!
	* \brief Sets the value of the CrossPolarizer attribute.
	*
	* This field records whether (True) or not (False) this Polarization Optics is a combination of an Analyzer and a Polarizer positioned orthogonal to each other.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setCrossPolarizer(const bool& value, bool validate = true);

	/*!
	* \brief Returns the value of the CrossPolarizer attribute.
	*
	* This field records whether (True) or not (False) this Polarization Optics is a combination of an Analyzer and a Polarizer positioned orthogonal to each other.
	*
	* \return The value of the attribute
	*/
	bool getCrossPolarizer() const;

	/*!
	* \brief Resets the CrossPolarizer attribute to an unset state.
	*
	* This field records whether (True) or not (False) this Polarization Optics is a combination of an Analyzer and a Polarizer positioned orthogonal to each other.
	*/
	void resetCrossPolarizer();

	/*!
	* \brief Checks whether the CrossPolarizer attribute is present.
	*
	* This field records whether (True) or not (False) this Polarization Optics is a combination of an Analyzer and a Polarizer positioned orthogonal to each other.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasCrossPolarizer() const;

	/*!
	* \brief Sets the value of the DIC attribute.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is used for Differential Interference Contrast (DIC) microscopy.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setDIC(const bool& value, bool validate = true);

	/*!
	* \brief Returns the value of the DIC attribute.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is used for Differential Interference Contrast (DIC) microscopy.
	*
	* \return The value of the attribute
	*/
	bool getDIC() const;

	/*!
	* \brief Resets the DIC attribute to an unset state.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is used for Differential Interference Contrast (DIC) microscopy.
	*/
	void resetDIC();

	/*!
	* \brief Checks whether the DIC attribute is present.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is used for Differential Interference Contrast (DIC) microscopy.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasDIC() const;

	/*!
	* \brief Sets the value of the BeamSplitter attribute.
	*
	* This field records whether (True) or not (False) this is PolarizationOptics has a beam splitter function.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setBeamSplitter(const bool& value, bool validate = true);

	/*!
	* \brief Returns the value of the BeamSplitter attribute.
	*
	* This field records whether (True) or not (False) this is PolarizationOptics has a beam splitter function.
	*
	* \return The value of the attribute
	*/
	bool getBeamSplitter() const;

	/*!
	* \brief Resets the BeamSplitter attribute to an unset state.
	*
	* This field records whether (True) or not (False) this is PolarizationOptics has a beam splitter function.
	*/
	void resetBeamSplitter();

	/*!
	* \brief Checks whether the BeamSplitter attribute is present.
	*
	* This field records whether (True) or not (False) this is PolarizationOptics has a beam splitter function.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasBeamSplitter() const;

	/*!
	* \brief Sets the value of the FaradayIsolator attribute.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is a Fraday Isolator. A Faraday Isolator is an optical component which allows light to pass through in only ONE direction and therefore protects laser systems against back reflection. It uses the Faraday magneto-optical effect to turn the polarization of light between various polarizers.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setFaradayIsolator(const bool& value, bool validate = true);

	/*!
	* \brief Returns the value of the FaradayIsolator attribute.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is a Fraday Isolator. A Faraday Isolator is an optical component which allows light to pass through in only ONE direction and therefore protects laser systems against back reflection. It uses the Faraday magneto-optical effect to turn the polarization of light between various polarizers.
	*
	* \return The value of the attribute
	*/
	bool getFaradayIsolator() const;

	/*!
	* \brief Resets the FaradayIsolator attribute to an unset state.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is a Fraday Isolator. A Faraday Isolator is an optical component which allows light to pass through in only ONE direction and therefore protects laser systems against back reflection. It uses the Faraday magneto-optical effect to turn the polarization of light between various polarizers.
	*/
	void resetFaradayIsolator();

	/*!
	* \brief Checks whether the FaradayIsolator attribute is present.
	*
	* This field records whether (True) or not (False) this PolarizationOptics is a Fraday Isolator. A Faraday Isolator is an optical component which allows light to pass through in only ONE direction and therefore protects laser systems against back reflection. It uses the Faraday magneto-optical effect to turn the polarization of light between various polarizers.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasFaradayIsolator() const;

	/*!
	* \brief Sets the value of the Construction attribute.
	*
	* This field records the modality with which this PolarizationOptics is constructed.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setConstruction(const Inscoper::NBO::PolarizationOpticsConstruction_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Construction attribute.
	*
	* This field records the modality with which this PolarizationOptics is constructed.
	*
	* \return The value of the attribute
	*/
	PolarizationOpticsConstruction_TypePtr getConstruction() const;

	/*!
	* \brief Resets the Construction attribute to an unset state.
	*
	* This field records the modality with which this PolarizationOptics is constructed.
	*/
	void resetConstruction();

	/*!
	* \brief Checks whether the optional Construction attribute is present.
	*
	* This field records the modality with which this PolarizationOptics is constructed.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasConstruction() const;

	/*!
	* \brief Sets the value of the Retardation attribute.
	*
	* This field records the Phase shift that exists between the polarized light component projected along the fast axis and the part projected along the slow axis.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setRetardation(const Inscoper::NBO::PolarizationOpticsRetardation_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Retardation attribute.
	*
	* This field records the Phase shift that exists between the polarized light component projected along the fast axis and the part projected along the slow axis.
	*
	* \return The value of the attribute
	*/
	PolarizationOpticsRetardation_TypePtr getRetardation() const;

	/*!
	* \brief Resets the Retardation attribute to an unset state.
	*
	* This field records the Phase shift that exists between the polarized light component projected along the fast axis and the part projected along the slow axis.
	*/
	void resetRetardation();

	/*!
	* \brief Checks whether the optional Retardation attribute is present.
	*
	* This field records the Phase shift that exists between the polarized light component projected along the fast axis and the part projected along the slow axis.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasRetardation() const;

	/*!
	* \brief Sets the value of the Fabrication attribute.
	*
	* This field records the way in with which this PolarizationOptics is fabricated.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setFabrication(const Inscoper::NBO::PolarizationOpticsFabrication_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the Fabrication attribute.
	*
	* This field records the way in with which this PolarizationOptics is fabricated.
	*
	* \return The value of the attribute
	*/
	PolarizationOpticsFabrication_TypePtr getFabrication() const;

	/*!
	* \brief Resets the Fabrication attribute to an unset state.
	*
	* This field records the way in with which this PolarizationOptics is fabricated.
	*/
	void resetFabrication();

	/*!
	* \brief Checks whether the optional Fabrication attribute is present.
	*
	* This field records the way in with which this PolarizationOptics is fabricated.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasFabrication() const;

	/*!
	* \brief Sets the value of the MaterialName attribute.
	*
	* This field records the chemical composition or designation of the Material this Polarization Optics is made of.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setMaterialName(const Inscoper::NBO::OpticalMaterialName_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the MaterialName attribute.
	*
	* This field records the chemical composition or designation of the Material this Polarization Optics is made of.
	*
	* \return The value of the attribute
	*/
	OpticalMaterialName_TypePtr getMaterialName() const;

	/*!
	* \brief Resets the MaterialName attribute to an unset state.
	*
	* This field records the chemical composition or designation of the Material this Polarization Optics is made of.
	*/
	void resetMaterialName();

	/*!
	* \brief Checks whether the optional MaterialName attribute is present.
	*
	* This field records the chemical composition or designation of the Material this Polarization Optics is made of.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasMaterialName() const;

	/*!
	* \brief Sets the value of the GlassCode attribute.
	*
	* If available, this field records the international Glass Code of the material that constitutes this Lens. The Glass Code designation is based on U.S. military standard MIL-G-174, and it consists of a six-digit number specifying the glass according to its Refractive Index nd at the Fraunhofer d- (or D3-) line, and its Abbe Number Vd also taken at that line. The resulting Glass Code is the value of nd-1 rounded to three digits, followed by Vd rounded to three digits, with all decimal points ignored. For example, BK7 has nd = 1.5168 and Vd = 64.17, giving a six-digit Glass Code of 517642.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setGlassCode(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the GlassCode attribute.
	*
	* If available, this field records the international Glass Code of the material that constitutes this Lens. The Glass Code designation is based on U.S. military standard MIL-G-174, and it consists of a six-digit number specifying the glass according to its Refractive Index nd at the Fraunhofer d- (or D3-) line, and its Abbe Number Vd also taken at that line. The resulting Glass Code is the value of nd-1 rounded to three digits, followed by Vd rounded to three digits, with all decimal points ignored. For example, BK7 has nd = 1.5168 and Vd = 64.17, giving a six-digit Glass Code of 517642.
	*
	* \return The value of the attribute
	*/
	std::string getGlassCode() const;

	/*!
	* \brief Resets the GlassCode attribute to an unset state.
	*
	* If available, this field records the international Glass Code of the material that constitutes this Lens. The Glass Code designation is based on U.S. military standard MIL-G-174, and it consists of a six-digit number specifying the glass according to its Refractive Index nd at the Fraunhofer d- (or D3-) line, and its Abbe Number Vd also taken at that line. The resulting Glass Code is the value of nd-1 rounded to three digits, followed by Vd rounded to three digits, with all decimal points ignored. For example, BK7 has nd = 1.5168 and Vd = 64.17, giving a six-digit Glass Code of 517642.
	*/
	void resetGlassCode();

	/*!
	* \brief Checks whether the GlassCode attribute is present.
	*
	* If available, this field records the international Glass Code of the material that constitutes this Lens. The Glass Code designation is based on U.S. military standard MIL-G-174, and it consists of a six-digit number specifying the glass according to its Refractive Index nd at the Fraunhofer d- (or D3-) line, and its Abbe Number Vd also taken at that line. The resulting Glass Code is the value of nd-1 rounded to three digits, followed by Vd rounded to three digits, with all decimal points ignored. For example, BK7 has nd = 1.5168 and Vd = 64.17, giving a six-digit Glass Code of 517642.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasGlassCode() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* If available, this field records the international Glass Code of the material that constitutes this Lens. The Glass Code designation is based on U.S. military standard MIL-G-174, and it consists of a six-digit number specifying the glass according to its Refractive Index nd at the Fraunhofer d- (or D3-) line, and its Abbe Number Vd also taken at that line. The resulting Glass Code is the value of nd-1 rounded to three digits, followed by Vd rounded to three digits, with all decimal points ignored. For example, BK7 has nd = 1.5168 and Vd = 64.17, giving a six-digit Glass Code of 517642.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getGlassCodeAllowedValues();

	/*!
	* \brief Sets the list of WavelengthRange elements.
	*
	* This element records the Range of Wavelengths this device is designed for, according to the Manufacturer. Multiple of this element may be used.
	*
	* \param value The new list of WavelengthRange elements
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setWavelengthRange_List(const std::vector<Inscoper::NBO::PolarizationOptics::InlineWavelengthRangePtr>& value, bool validate = true);

	/*!
	* \brief Returns the list of WavelengthRange elements.
	*
	* This element records the Range of Wavelengths this device is designed for, according to the Manufacturer. Multiple of this element may be used.
	*
	* \return The list of WavelengthRange elements
	*/
	std::vector<Inscoper::NBO::PolarizationOptics::InlineWavelengthRangePtr> getWavelengthRange_List() const;

	/*!
	* \brief Adds a new WavelengthRange element to this object.
	*
	* This element records the Range of Wavelengths this device is designed for, according to the Manufacturer. Multiple of this element may be used.
	*
	* \param value The element to add
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void addToWavelengthRange_List(const Inscoper::NBO::PolarizationOptics::InlineWavelengthRangePtr& value, bool validate = true);

	/*!
	* \brief Clear the list of WavelengthRange.
	*
	* This element records the Range of Wavelengths this device is designed for, according to the Manufacturer. Multiple of this element may be used.
	*/
	void clearWavelengthRange_List();

	/*!
	* \brief Sets the value of the AnnotationRef element.
	*
	* 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 setAnnotationRef(const Inscoper::NBO::AnnotationRefPtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the AnnotationRef element.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the element
	*/
	Inscoper::NBO::AnnotationRefPtr getAnnotationRef() const;

	/*!
	* \brief Resets the AnnotationRef element to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetAnnotationRef();

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


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

	PolarizationOpticsID_TypePtr ID = nullptr; // Required attribute
	Denomination_TypePtr Name = nullptr; // Optional attribute
	PolarizationOpticsFunction_TypePtr Function = nullptr; // Required attribute
    std::optional<bool> CrossPolarizer; // Required attribute
    std::optional<bool> DIC; // Required attribute
    std::optional<bool> BeamSplitter; // Optional attribute
    std::optional<bool> FaradayIsolator; // Optional attribute
	PolarizationOpticsConstruction_TypePtr Construction = nullptr; // Optional attribute
	PolarizationOpticsRetardation_TypePtr Retardation = nullptr; // Optional attribute
	PolarizationOpticsFabrication_TypePtr Fabrication = nullptr; // Optional attribute
	OpticalMaterialName_TypePtr MaterialName = nullptr; // Optional attribute
    std::optional<std::string> GlassCode; // Optional attribute
    static const std::set<std::string> GlassCodeAllowedValues;
    std::vector<Inscoper::NBO::PolarizationOptics::InlineWavelengthRangePtr> WavelengthRange_List;
    Inscoper::NBO::AnnotationRefPtr AnnotationRef = nullptr;
};

/*! Shared pointer for PolarizationOptics*/
typedef std::shared_ptr<PolarizationOptics> PolarizationOpticsPtr;

} // namespace Inscoper::NBO

#endif // POLARIZATIONOPTICS_HPP_INCLUDED