#ifndef ACOUSTOOPTICALDEVICESETTINGS_TYPE_HPP_INCLUDED
#define ACOUSTOOPTICALDEVICESETTINGS_TYPE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/AcoustoOpticalDeviceID_Type.h>
#include <NBO/NBO/PercentFraction_Type.h>
#include <NBO/NBO/ReflectanceProfileFile.h>
#include <NBO/NBO/ReflectionWavelengthRangeSettings.h>
#include <NBO/NBO/Settings_Type.h>
#include <NBO/NBO/TransmissionWavelengthRangeSettings.h>
#include <NBO/NBO/TransmittanceProfileFile.h>
#include <NBO/NBO/UnitsFrequency_Type.h>
#include <NBO/NBO/UnitsVelocity_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 AcoustoOpticalDeviceSettings.
*
* This element refers to the Acousto Optical Device used to acquire this image and it holds the settings that were applied to it during this Acquisition.
*/
class NBO_EXPORT AcoustoOpticalDeviceSettings_Type : public Settings_Type {

public:
	
	AcoustoOpticalDeviceSettings_Type();
	~AcoustoOpticalDeviceSettings_Type();

	/*!
	* \brief Cast a NBOBaseClass to a AcoustoOpticalDeviceSettings_Type.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<AcoustoOpticalDeviceSettings_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.
	*
	* This is the Unique Identifier of the device used in this case.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setID(const Inscoper::NBO::AcoustoOpticalDeviceID_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the ID attribute.
	*
	* This is the Unique Identifier of the device used in this case.
	*
	* \return The value of the attribute
	*/
	AcoustoOpticalDeviceID_TypePtr getID() const;

	/*!
	* \brief Resets the ID attribute to an unset state.
	*
	* This is the Unique Identifier of the device used in this case.
	*/
	void resetID();

	/*!
	* \brief Checks whether the optional ID attribute is present.
	*
	* This is the Unique Identifier of the device used in this case.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasID() const;

	/*!
	* \brief Sets the value of the DiffractionEfficiency attribute.
	*
	* This field records a measure of the performance efficiency of this device. It's a measure of how much optical power is diffracted into a designated direction compared to the power incident onto the diffractive element.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setDiffractionEfficiency(const Inscoper::NBO::PercentFraction_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the DiffractionEfficiency attribute.
	*
	* This field records a measure of the performance efficiency of this device. It's a measure of how much optical power is diffracted into a designated direction compared to the power incident onto the diffractive element.
	*
	* \return The value of the attribute
	*/
	PercentFraction_TypePtr getDiffractionEfficiency() const;

	/*!
	* \brief Resets the DiffractionEfficiency attribute to an unset state.
	*
	* This field records a measure of the performance efficiency of this device. It's a measure of how much optical power is diffracted into a designated direction compared to the power incident onto the diffractive element.
	*/
	void resetDiffractionEfficiency();

	/*!
	* \brief Checks whether the optional DiffractionEfficiency attribute is present.
	*
	* This field records a measure of the performance efficiency of this device. It's a measure of how much optical power is diffracted into a designated direction compared to the power incident onto the diffractive element.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasDiffractionEfficiency() const;

	/*!
	* \brief Sets the value of the AcousticVelocity attribute.
	*
	* This field records the acoustic wave transit time across the crystal used during this Acquisition.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setAcousticVelocity(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the AcousticVelocity attribute.
	*
	* This field records the acoustic wave transit time across the crystal used during this Acquisition.
	*
	* \return The value of the attribute
	*/
	float getAcousticVelocity() const;

	/*!
	* \brief Resets the AcousticVelocity attribute to an unset state.
	*
	* This field records the acoustic wave transit time across the crystal used during this Acquisition.
	*/
	void resetAcousticVelocity();

	/*!
	* \brief Checks whether the AcousticVelocity attribute is present.
	*
	* This field records the acoustic wave transit time across the crystal used during this Acquisition.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasAcousticVelocity() const;

	/*!
	* \brief Sets the value of the AcousticVelocityUnit 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 setAcousticVelocityUnit(const Inscoper::NBO::UnitsVelocity_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the AcousticVelocityUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsVelocity_TypePtr getAcousticVelocityUnit() const;

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

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

	/*!
	* \brief Sets the value of the AcousticFrequency attribute.
	*
	* This field records the frequency of the acoustic wave used to alter the diffraction properties of the crystal during this Acquisition. Wavelength tuning is very rapid and limited only by the acoustic transit time across the crystal.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setAcousticFrequency(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the AcousticFrequency attribute.
	*
	* This field records the frequency of the acoustic wave used to alter the diffraction properties of the crystal during this Acquisition. Wavelength tuning is very rapid and limited only by the acoustic transit time across the crystal.
	*
	* \return The value of the attribute
	*/
	float getAcousticFrequency() const;

	/*!
	* \brief Resets the AcousticFrequency attribute to an unset state.
	*
	* This field records the frequency of the acoustic wave used to alter the diffraction properties of the crystal during this Acquisition. Wavelength tuning is very rapid and limited only by the acoustic transit time across the crystal.
	*/
	void resetAcousticFrequency();

	/*!
	* \brief Checks whether the AcousticFrequency attribute is present.
	*
	* This field records the frequency of the acoustic wave used to alter the diffraction properties of the crystal during this Acquisition. Wavelength tuning is very rapid and limited only by the acoustic transit time across the crystal.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasAcousticFrequency() const;

	/*!
	* \brief Sets the value of the AcousticFrequencyUnit 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 setAcousticFrequencyUnit(const Inscoper::NBO::UnitsFrequency_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the AcousticFrequencyUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsFrequency_TypePtr getAcousticFrequencyUnit() const;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

	AcoustoOpticalDeviceID_TypePtr ID = nullptr; // Required attribute
	PercentFraction_TypePtr DiffractionEfficiency = nullptr; // Optional attribute
    std::optional<float> AcousticVelocity; // Optional attribute
	UnitsVelocity_TypePtr AcousticVelocityUnit = nullptr; // Optional attribute
    std::optional<float> AcousticFrequency; // Optional attribute
	UnitsFrequency_TypePtr AcousticFrequencyUnit = nullptr; // Optional attribute
    std::vector<Inscoper::NBO::TransmittanceProfileFilePtr> TransmittanceProfileFile_List;
    std::vector<Inscoper::NBO::ReflectanceProfileFilePtr> ReflectanceProfileFile_List;
    std::vector<Inscoper::NBO::TransmissionWavelengthRangeSettingsPtr> TransmissionWavelengthRangeSettings_List;
    std::vector<Inscoper::NBO::ReflectionWavelengthRangeSettingsPtr> ReflectionWavelengthRangeSettings_List;
};

/*! Shared pointer for AcoustoOpticalDeviceSettings_Type*/
typedef std::shared_ptr<AcoustoOpticalDeviceSettings_Type> AcoustoOpticalDeviceSettings_TypePtr;

} // namespace Inscoper::NBO

#endif // ACOUSTOOPTICALDEVICESETTINGS_TYPE_HPP_INCLUDED