#ifndef INTENSITYCALIBRATION_TYPE_HPP_INCLUDED
#define INTENSITYCALIBRATION_TYPE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/CalibrationSoftware.h>
#include <NBO/NBO/FileAnnotation_Type.h>
#include <NBO/NBO/LSID_Type.h>
#include <NBO/NBO/PositiveInt_Type.h>
#include <NBO/NBO/Reference_Type.h>
#include <NBO/NBO/IntensityCalibrationToolID_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 IntensityCalibration.
*
* This describes the procedure(s) that were used for excitation and detector calibration and the resulting calibration results.
*/
class NBO_EXPORT IntensityCalibration_Type : public NBOBaseClass {

public:
	/*!
	* \brief Represents the XML element IntensityCalibrationToolRef.
	*
	* This element is a reference to the tool, if any, used to perform this calibratin procdure
	*/
	class NBO_EXPORT InlineIntensityCalibrationToolRef : public Reference_Type {
	
	public:
		
		InlineIntensityCalibrationToolRef();
		~InlineIntensityCalibrationToolRef();
	
		/*!
		* \brief Cast a NBOBaseClass to a InlineIntensityCalibrationToolRef.
		*
		* \param base The base class to cast
		* \return The casted element, or nullptr if the cast fails
		*/
		static std::shared_ptr<InlineIntensityCalibrationToolRef> 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::IntensityCalibrationToolID_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
		*/
		IntensityCalibrationToolID_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;
	
	
	private:
		class Impl;
		std::unique_ptr<Impl> pImpl;
	
		IntensityCalibrationToolID_TypePtr ID = nullptr; // Optional attribute
	};
	
	/*! Shared pointer for InlineIntensityCalibrationToolRef*/
	typedef std::shared_ptr<InlineIntensityCalibrationToolRef> InlineIntensityCalibrationToolRefPtr;
	
	/*!
	* \brief Represents the XML element AnnotationRef.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*/
	class NBO_EXPORT InlineAnnotationRef : public Reference_Type {
	
	public:
		
		InlineAnnotationRef();
		~InlineAnnotationRef();
	
		/*!
		* \brief Cast a NBOBaseClass to a InlineAnnotationRef.
		*
		* \param base The base class to cast
		* \return The casted element, or nullptr if the cast fails
		*/
		static std::shared_ptr<InlineAnnotationRef> 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;
	
	
	private:
		class Impl;
		std::unique_ptr<Impl> pImpl;
	
	};
	
	/*! Shared pointer for InlineAnnotationRef*/
	typedef std::shared_ptr<InlineAnnotationRef> InlineAnnotationRefPtr;
	
	
	IntensityCalibration_Type();
	~IntensityCalibration_Type();

	/*!
	* \brief Cast a NBOBaseClass to a IntensityCalibration_Type.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<IntensityCalibration_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 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::LSID_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
	*/
	LSID_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 Date attribute.
	*
	* Ths field records the Date in which this Calibration procedure was performed.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setDate(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the Date attribute.
	*
	* Ths field records the Date in which this Calibration procedure was performed.
	*
	* \return The value of the attribute
	*/
	std::string getDate() const;

	/*!
	* \brief Resets the Date attribute to an unset state.
	*
	* Ths field records the Date in which this Calibration procedure was performed.
	*/
	void resetDate();

	/*!
	* \brief Checks whether the Date attribute is present.
	*
	* Ths field records the Date in which this Calibration procedure was performed.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasDate() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* Ths field records the Date in which this Calibration procedure was performed.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getDateAllowedValues();

	/*!
	* \brief Sets the value of the SampleSize attribute.
	*
	* This field captures the Size of the Sample that was used to calculate the reported Intensity Calibration metrics. For example, this might represent the number of Illumination Power measurements that were utilized to calculate the Illumination Stability of a given Light Source.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setSampleSize(const Inscoper::NBO::PositiveInt_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the SampleSize attribute.
	*
	* This field captures the Size of the Sample that was used to calculate the reported Intensity Calibration metrics. For example, this might represent the number of Illumination Power measurements that were utilized to calculate the Illumination Stability of a given Light Source.
	*
	* \return The value of the attribute
	*/
	PositiveInt_TypePtr getSampleSize() const;

	/*!
	* \brief Resets the SampleSize attribute to an unset state.
	*
	* This field captures the Size of the Sample that was used to calculate the reported Intensity Calibration metrics. For example, this might represent the number of Illumination Power measurements that were utilized to calculate the Illumination Stability of a given Light Source.
	*/
	void resetSampleSize();

	/*!
	* \brief Checks whether the optional SampleSize attribute is present.
	*
	* This field captures the Size of the Sample that was used to calculate the reported Intensity Calibration metrics. For example, this might represent the number of Illumination Power measurements that were utilized to calculate the Illumination Stability of a given Light Source.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasSampleSize() const;

	/*!
	* \brief Sets the value of the Method attribute.
	*
	* This field records a Description of Method used for this calibration procedure.
	*
	* \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 used for this calibration procedure.
	*
	* \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 used for this calibration procedure.
	*/
	void resetMethod();

	/*!
	* \brief Checks whether the Method attribute is present.
	*
	* This field records a Description of Method used for this calibration procedure.
	*
	* \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 used for this calibration procedure.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getMethodAllowedValues();

	/*!
	* \brief Sets the list of IntensityCalibrationToolRef elements.
	*
	* This element is a reference to the tool, if any, used to perform this calibratin procdure
	*
	* \param value The new list of IntensityCalibrationToolRef elements
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setIntensityCalibrationToolRef_List(const std::vector<Inscoper::NBO::IntensityCalibration_Type::InlineIntensityCalibrationToolRefPtr>& value, bool validate = true);

	/*!
	* \brief Returns the list of IntensityCalibrationToolRef elements.
	*
	* This element is a reference to the tool, if any, used to perform this calibratin procdure
	*
	* \return The list of IntensityCalibrationToolRef elements
	*/
	std::vector<Inscoper::NBO::IntensityCalibration_Type::InlineIntensityCalibrationToolRefPtr> getIntensityCalibrationToolRef_List() const;

	/*!
	* \brief Adds a new IntensityCalibrationToolRef element to this object.
	*
	* This element is a reference to the tool, if any, used to perform this calibratin procdure
	*
	* \param value The element to add
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void addToIntensityCalibrationToolRef_List(const Inscoper::NBO::IntensityCalibration_Type::InlineIntensityCalibrationToolRefPtr& value, bool validate = true);

	/*!
	* \brief Clear the list of IntensityCalibrationToolRef.
	*
	* This element is a reference to the tool, if any, used to perform this calibratin procdure
	*/
	void clearIntensityCalibrationToolRef_List();

	/*!
	* \brief Sets the list of IntensityCalibrationReport elements.
	*
	* This element refers to any File containing a report generated by the Calibration Software referred to in Calibration procedure.
	*
	* \param value The new list of IntensityCalibrationReport elements
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setIntensityCalibrationReport_List(const std::vector<Inscoper::NBO::FileAnnotation_TypePtr>& value, bool validate = true);

	/*!
	* \brief Returns the list of IntensityCalibrationReport elements.
	*
	* This element refers to any File containing a report generated by the Calibration Software referred to in Calibration procedure.
	*
	* \return The list of IntensityCalibrationReport elements
	*/
	std::vector<Inscoper::NBO::FileAnnotation_TypePtr> getIntensityCalibrationReport_List() const;

	/*!
	* \brief Adds a new IntensityCalibrationReport element to this object.
	*
	* This element refers to any File containing a report generated by the Calibration Software referred to in Calibration procedure.
	*
	* \param value The element to add
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void addToIntensityCalibrationReport_List(const Inscoper::NBO::FileAnnotation_TypePtr& value, bool validate = true);

	/*!
	* \brief Clear the list of IntensityCalibrationReport.
	*
	* This element refers to any File containing a report generated by the Calibration Software referred to in Calibration procedure.
	*/
	void clearIntensityCalibrationReport_List();

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

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

	/*!
	* \brief Adds a new CalibrationSoftware 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 addToCalibrationSoftware_List(const Inscoper::NBO::CalibrationSoftwarePtr& value, bool validate = true);

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

	/*!
	* \brief Sets the value of the AnnotationRef element.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setAnnotationRef(const Inscoper::NBO::IntensityCalibration_Type::InlineAnnotationRefPtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the AnnotationRef element.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*
	* \return The value of the element
	*/
	Inscoper::NBO::IntensityCalibration_Type::InlineAnnotationRefPtr getAnnotationRef() const;

	/*!
	* \brief Resets the AnnotationRef element to an unset state.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*/
	void resetAnnotationRef();

	/*!
	* \brief Checks whether the optional AnnotationRef element is present.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasAnnotationRef() const;


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

	LSID_TypePtr ID = nullptr; // Required attribute
    std::optional<std::string> Date; // Required attribute
    static const std::set<std::string> DateAllowedValues;
	PositiveInt_TypePtr SampleSize = nullptr; // Optional attribute
    std::optional<std::string> Method; // Required attribute
    static const std::set<std::string> MethodAllowedValues;
    std::vector<Inscoper::NBO::IntensityCalibration_Type::InlineIntensityCalibrationToolRefPtr> IntensityCalibrationToolRef_List;
    std::vector<Inscoper::NBO::FileAnnotation_TypePtr> IntensityCalibrationReport_List;
    std::vector<Inscoper::NBO::CalibrationSoftwarePtr> CalibrationSoftware_List;
    Inscoper::NBO::IntensityCalibration_Type::InlineAnnotationRefPtr AnnotationRef = nullptr;
};

/*! Shared pointer for IntensityCalibration_Type*/
typedef std::shared_ptr<IntensityCalibration_Type> IntensityCalibration_TypePtr;

} // namespace Inscoper::NBO

#endif // INTENSITYCALIBRATION_TYPE_HPP_INCLUDED