#ifndef OPTICALCALIBRATIONSTANDARD_TYPE_HPP_INCLUDED
#define OPTICALCALIBRATIONSTANDARD_TYPE_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/LSID_Type.h>
#include <NBO/NBO/ManufacturerSpec_Type.h>
#include <NBO/NBO/WavelengthRange.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 OpticalCalibrationStandard.
*
* The optical standard used in this case. This might be a pre-manufactured slide, such as those produced by Argolight (http://argolight.com/), Geller MicroAnalytical Laboratory (Magnification Reference Standard MRS-4 and others; http://www.gellermicro.com/mag_standards/mrs.html), Zeiss and others. Alternatively, the standard might be a slide containing multi-colored beads of known size and emission characteristics. Finally, slides coated with specific DNA origami patterns are increasingly being used for this purpose as well.
*/
class NBO_EXPORT OpticalCalibrationStandard_Type : public ManufacturerSpec_Type {

public:
	
	OpticalCalibrationStandard_Type();
	~OpticalCalibrationStandard_Type();

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

	/*!
	* \brief Returns the class type name.
	*
	* \return The class type name
	*/
	virtual 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 User-defined Name 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::LSID_TypePtr& value, bool validate = true);

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

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

	/*!
	* \brief Checks whether the optional ID attribute is present.
	*
	* A User-defined Name 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 Method attribute.
	*
	* This field records a Description of Method that was employed to prepare this Optical Calibration Standard Sample.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setMethod(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the Method attribute.
	*
	* This field records a Description of Method that was employed to prepare this Optical Calibration Standard Sample.
	*
	* \return The value of the attribute
	*/
	std::string getMethod() const;

	/*!
	* \brief Resets the Method attribute to an unset state.
	*
	* This field records a Description of Method that was employed to prepare this Optical Calibration Standard Sample.
	*/
	void resetMethod();

	/*!
	* \brief Checks whether the Method attribute is present.
	*
	* This field records a Description of Method that was employed to prepare this Optical Calibration Standard Sample.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasMethod() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* This field records a Description of Method that was employed to prepare this Optical Calibration Standard Sample.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getMethodAllowedValues();

	/*!
	* \brief Sets the list of WavelengthRange elements.
	*
	* No description available in the XSD standard.
	*
	* \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::WavelengthRangePtr>& value, bool validate = true);

	/*!
	* \brief Returns the list of WavelengthRange elements.
	*
	* No description available in the XSD standard.
	*
	* \return The list of WavelengthRange elements
	*/
	std::vector<Inscoper::NBO::WavelengthRangePtr> getWavelengthRange_List() const;

	/*!
	* \brief Adds a new WavelengthRange element to this object.
	*
	* No description available in the XSD standard.
	*
	* \param value The element to add
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void addToWavelengthRange_List(const Inscoper::NBO::WavelengthRangePtr& value, bool validate = true);

	/*!
	* \brief Clear the list of WavelengthRange.
	*
	* No description available in the XSD standard.
	*/
	void clearWavelengthRange_List();

	/*!
	* \brief Sets the list of AnnotationRef elements.
	*
	* No description available in the XSD standard.
	*
	* \param value The new list of AnnotationRef elements
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setAnnotationRef_List(const std::vector<Inscoper::NBO::AnnotationRefPtr>& value, bool validate = true);

	/*!
	* \brief Returns the list of AnnotationRef elements.
	*
	* No description available in the XSD standard.
	*
	* \return The list of AnnotationRef elements
	*/
	std::vector<Inscoper::NBO::AnnotationRefPtr> getAnnotationRef_List() const;

	/*!
	* \brief Adds a new AnnotationRef element to this object.
	*
	* No description available in the XSD standard.
	*
	* \param value The element to add
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void addToAnnotationRef_List(const Inscoper::NBO::AnnotationRefPtr& value, bool validate = true);

	/*!
	* \brief Clear the list of AnnotationRef.
	*
	* No description available in the XSD standard.
	*/
	void clearAnnotationRef_List();


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

	LSID_TypePtr ID = nullptr; // Required attribute
	Denomination_TypePtr Name = nullptr; // Required attribute
    std::optional<std::string> Method; // Optional attribute
    static const std::set<std::string> MethodAllowedValues;
    std::vector<Inscoper::NBO::WavelengthRangePtr> WavelengthRange_List;
    std::vector<Inscoper::NBO::AnnotationRefPtr> AnnotationRef_List;
};

/*! Shared pointer for OpticalCalibrationStandard_Type*/
typedef std::shared_ptr<OpticalCalibrationStandard_Type> OpticalCalibrationStandard_TypePtr;

} // namespace Inscoper::NBO

#endif // OPTICALCALIBRATIONSTANDARD_TYPE_HPP_INCLUDED