#ifndef OME_CHOICE_HPP_INCLUDED
#define OME_CHOICE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <variant>
#include <vector>
#include <NBO/NBO/Folder.h>
#include <NBO/NBO/StructuredAnnotations.h>
#include <NBO/NBO/Image.h>
#include <NBO/NBO/Project.h>
#include <NBO/NBO/ROI.h>
#include <NBO/NBO/Experiment.h>
#include <NBO/NBO/ExperimenterGroup.h>
#include <NBO/NBO/Experimenter.h>
#include <NBO/NBO/Plate.h>
#include <NBO/NBO/Dataset.h>
#include <NBO/NBO/UniversallyUniqueIdentifier_Type.h>
#include <NBO/NBO/Screen.h>
#include <NBO/NBO/Instrument.h>
#include <NBO/NBO/ENBOType.h>
#include <NBO/NBOGlobal.h>
#include <NBO/Shared/Base/NBOBaseClass.h>


namespace Inscoper::NBO {

/*!
* \brief Represents the XML choice in element OME.
*/
class NBO_EXPORT OME_Choice : public NBOBaseClass {

public:
	/*!
	* \brief Represents the XML element OME_Choice_1.
	*
	* No description available in the XSD standard.
	*/
	class NBO_EXPORT InlineOME_Choice_1 : public NBOBaseClass {
	
	public:
		
		InlineOME_Choice_1();
		~InlineOME_Choice_1();
	
		/*!
		* \brief Cast a NBOBaseClass to a InlineOME_Choice_1.
		*
		* \param base The base class to cast
		* \return The casted element, or nullptr if the cast fails
		*/
		static std::shared_ptr<InlineOME_Choice_1> 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 list of Project elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Project elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setProject_List(const std::vector<Inscoper::NBO::ProjectPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Project elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Project elements
		*/
		std::vector<Inscoper::NBO::ProjectPtr> getProject_List() const;
	
		/*!
		* \brief Adds a new Project 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 addToProject_List(const Inscoper::NBO::ProjectPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Project.
		*
		* No description available in the XSD standard.
		*/
		void clearProject_List();
	
		/*!
		* \brief Sets the list of Dataset elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Dataset elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setDataset_List(const std::vector<Inscoper::NBO::DatasetPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Dataset elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Dataset elements
		*/
		std::vector<Inscoper::NBO::DatasetPtr> getDataset_List() const;
	
		/*!
		* \brief Adds a new Dataset 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 addToDataset_List(const Inscoper::NBO::DatasetPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Dataset.
		*
		* No description available in the XSD standard.
		*/
		void clearDataset_List();
	
		/*!
		* \brief Sets the list of Folder elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Folder elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setFolder_List(const std::vector<Inscoper::NBO::FolderPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Folder elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Folder elements
		*/
		std::vector<Inscoper::NBO::FolderPtr> getFolder_List() const;
	
		/*!
		* \brief Adds a new Folder 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 addToFolder_List(const Inscoper::NBO::FolderPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Folder.
		*
		* No description available in the XSD standard.
		*/
		void clearFolder_List();
	
		/*!
		* \brief Sets the list of Experiment elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Experiment elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setExperiment_List(const std::vector<Inscoper::NBO::ExperimentPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Experiment elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Experiment elements
		*/
		std::vector<Inscoper::NBO::ExperimentPtr> getExperiment_List() const;
	
		/*!
		* \brief Adds a new Experiment 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 addToExperiment_List(const Inscoper::NBO::ExperimentPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Experiment.
		*
		* No description available in the XSD standard.
		*/
		void clearExperiment_List();
	
		/*!
		* \brief Sets the list of Plate elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Plate elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setPlate_List(const std::vector<Inscoper::NBO::PlatePtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Plate elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Plate elements
		*/
		std::vector<Inscoper::NBO::PlatePtr> getPlate_List() const;
	
		/*!
		* \brief Adds a new Plate 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 addToPlate_List(const Inscoper::NBO::PlatePtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Plate.
		*
		* No description available in the XSD standard.
		*/
		void clearPlate_List();
	
		/*!
		* \brief Sets the list of Screen elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Screen elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setScreen_List(const std::vector<Inscoper::NBO::ScreenPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Screen elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Screen elements
		*/
		std::vector<Inscoper::NBO::ScreenPtr> getScreen_List() const;
	
		/*!
		* \brief Adds a new Screen 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 addToScreen_List(const Inscoper::NBO::ScreenPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Screen.
		*
		* No description available in the XSD standard.
		*/
		void clearScreen_List();
	
		/*!
		* \brief Sets the list of Experimenter elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Experimenter elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setExperimenter_List(const std::vector<Inscoper::NBO::ExperimenterPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Experimenter elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Experimenter elements
		*/
		std::vector<Inscoper::NBO::ExperimenterPtr> getExperimenter_List() const;
	
		/*!
		* \brief Adds a new Experimenter 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 addToExperimenter_List(const Inscoper::NBO::ExperimenterPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Experimenter.
		*
		* No description available in the XSD standard.
		*/
		void clearExperimenter_List();
	
		/*!
		* \brief Sets the list of ExperimenterGroup elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of ExperimenterGroup elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setExperimenterGroup_List(const std::vector<Inscoper::NBO::ExperimenterGroupPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of ExperimenterGroup elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of ExperimenterGroup elements
		*/
		std::vector<Inscoper::NBO::ExperimenterGroupPtr> getExperimenterGroup_List() const;
	
		/*!
		* \brief Adds a new ExperimenterGroup 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 addToExperimenterGroup_List(const Inscoper::NBO::ExperimenterGroupPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of ExperimenterGroup.
		*
		* No description available in the XSD standard.
		*/
		void clearExperimenterGroup_List();
	
		/*!
		* \brief Sets the list of Instrument elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Instrument elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setInstrument_List(const std::vector<Inscoper::NBO::InstrumentPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Instrument elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Instrument elements
		*/
		std::vector<Inscoper::NBO::InstrumentPtr> getInstrument_List() const;
	
		/*!
		* \brief Adds a new Instrument 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 addToInstrument_List(const Inscoper::NBO::InstrumentPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Instrument.
		*
		* No description available in the XSD standard.
		*/
		void clearInstrument_List();
	
		/*!
		* \brief Sets the list of Image elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of Image elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setImage_List(const std::vector<Inscoper::NBO::ImagePtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of Image elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of Image elements
		*/
		std::vector<Inscoper::NBO::ImagePtr> getImage_List() const;
	
		/*!
		* \brief Adds a new Image 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 addToImage_List(const Inscoper::NBO::ImagePtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of Image.
		*
		* No description available in the XSD standard.
		*/
		void clearImage_List();
	
		/*!
		* \brief Sets the value of the StructuredAnnotations 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 setStructuredAnnotations(const Inscoper::NBO::StructuredAnnotationsPtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the StructuredAnnotations element.
		*
		* No description available in the XSD standard.
		*
		* \return The value of the element
		*/
		Inscoper::NBO::StructuredAnnotationsPtr getStructuredAnnotations() const;
	
		/*!
		* \brief Resets the StructuredAnnotations element to an unset state.
		*
		* No description available in the XSD standard.
		*/
		void resetStructuredAnnotations();
	
		/*!
		* \brief Checks whether the optional StructuredAnnotations element is present.
		*
		* No description available in the XSD standard.
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasStructuredAnnotations() const;
	
		/*!
		* \brief Sets the list of ROI elements.
		*
		* No description available in the XSD standard.
		*
		* \param value The new list of ROI elements
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setROI_List(const std::vector<Inscoper::NBO::ROIPtr>& value, bool validate = true);
	
		/*!
		* \brief Returns the list of ROI elements.
		*
		* No description available in the XSD standard.
		*
		* \return The list of ROI elements
		*/
		std::vector<Inscoper::NBO::ROIPtr> getROI_List() const;
	
		/*!
		* \brief Adds a new ROI 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 addToROI_List(const Inscoper::NBO::ROIPtr& value, bool validate = true);
	
		/*!
		* \brief Clear the list of ROI.
		*
		* No description available in the XSD standard.
		*/
		void clearROI_List();
	
	
	private:
		class Impl;
		std::unique_ptr<Impl> pImpl;
	
	    std::vector<Inscoper::NBO::ProjectPtr> Project_List;
	    std::vector<Inscoper::NBO::DatasetPtr> Dataset_List;
	    std::vector<Inscoper::NBO::FolderPtr> Folder_List;
	    std::vector<Inscoper::NBO::ExperimentPtr> Experiment_List;
	    std::vector<Inscoper::NBO::PlatePtr> Plate_List;
	    std::vector<Inscoper::NBO::ScreenPtr> Screen_List;
	    std::vector<Inscoper::NBO::ExperimenterPtr> Experimenter_List;
	    std::vector<Inscoper::NBO::ExperimenterGroupPtr> ExperimenterGroup_List;
	    std::vector<Inscoper::NBO::InstrumentPtr> Instrument_List;
	    std::vector<Inscoper::NBO::ImagePtr> Image_List;
	    Inscoper::NBO::StructuredAnnotationsPtr StructuredAnnotations = nullptr;
	    std::vector<Inscoper::NBO::ROIPtr> ROI_List;
	};
	
	/*! Shared pointer for InlineOME_Choice_1*/
	typedef std::shared_ptr<InlineOME_Choice_1> InlineOME_Choice_1Ptr;
	
	/*!
	* \brief Represents the XML element BinaryOnly.
	*
	* Pointer to an external metadata file. If this element is present, then no other metadata may be present in this file, i.e. this file is a place-holder. 
	*/
	class NBO_EXPORT InlineBinaryOnly : public NBOBaseClass {
	
	public:
		
		InlineBinaryOnly();
		~InlineBinaryOnly();
	
		/*!
		* \brief Cast a NBOBaseClass to a InlineBinaryOnly.
		*
		* \param base The base class to cast
		* \return The casted element, or nullptr if the cast fails
		*/
		static std::shared_ptr<InlineBinaryOnly> 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 MetadataFile attribute.
		*
		* Filename of the OME-XML metadata file for this binary data. If the file cannot be found, a search can be performed based on the UUID. 
		*
		* \param value The value to set
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setMetadataFile(const std::string& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the MetadataFile attribute.
		*
		* Filename of the OME-XML metadata file for this binary data. If the file cannot be found, a search can be performed based on the UUID. 
		*
		* \return The value of the attribute
		*/
		std::string getMetadataFile() const;
	
		/*!
		* \brief Resets the MetadataFile attribute to an unset state.
		*
		* Filename of the OME-XML metadata file for this binary data. If the file cannot be found, a search can be performed based on the UUID. 
		*/
		void resetMetadataFile();
	
		/*!
		* \brief Checks whether the MetadataFile attribute is present.
		*
		* Filename of the OME-XML metadata file for this binary data. If the file cannot be found, a search can be performed based on the UUID. 
		*
		* \return true if the attribute has been set, false otherwise
		*/
		bool hasMetadataFile() const;
	
		/*!
		* \brief Returns the allowed values for this attribut.
		*
		* Filename of the OME-XML metadata file for this binary data. If the file cannot be found, a search can be performed based on the UUID. 
		*
		* \return The list of allowed values
		*/
		static const std::set<std::string>& getMetadataFileAllowedValues();
	
		/*!
		* \brief Sets the value of the UUID attribute.
		*
		* The unique identifier of another OME-XML block whose metadata describes the binary data in this file. This UUID is considered authoritative regardless of mismatches in the filename. 
		*
		* \param value The value to set
		* \param validate If true, validates constraints on value. Default is true.
		*/
		void setUUID(const Inscoper::NBO::UniversallyUniqueIdentifier_TypePtr& value, bool validate = true);
	
		/*!
		* \brief Returns the value of the UUID attribute.
		*
		* The unique identifier of another OME-XML block whose metadata describes the binary data in this file. This UUID is considered authoritative regardless of mismatches in the filename. 
		*
		* \return The value of the attribute
		*/
		UniversallyUniqueIdentifier_TypePtr getUUID() const;
	
		/*!
		* \brief Resets the UUID attribute to an unset state.
		*
		* The unique identifier of another OME-XML block whose metadata describes the binary data in this file. This UUID is considered authoritative regardless of mismatches in the filename. 
		*/
		void resetUUID();
	
		/*!
		* \brief Checks whether the optional UUID attribute is present.
		*
		* The unique identifier of another OME-XML block whose metadata describes the binary data in this file. This UUID is considered authoritative regardless of mismatches in the filename. 
		*
		* \return true if the optional attribute has been set, false otherwise
		*/
		bool hasUUID() const;
	
	
	private:
		class Impl;
		std::unique_ptr<Impl> pImpl;
	
	    std::optional<std::string> MetadataFile; // Required attribute
	    static const std::set<std::string> MetadataFileAllowedValues;
		UniversallyUniqueIdentifier_TypePtr UUID = nullptr; // Required attribute
	};
	
	/*! Shared pointer for InlineBinaryOnly*/
	typedef std::shared_ptr<InlineBinaryOnly> InlineBinaryOnlyPtr;
	
	using OME_Choice_Variant = std::variant<
		Inscoper::NBO::OME_Choice::InlineBinaryOnlyPtr,
		Inscoper::NBO::OME_Choice::InlineOME_Choice_1Ptr
	>;

	using OME_Choice_VariantPtr = std::shared_ptr<OME_Choice_Variant>;

	OME_Choice();
	~OME_Choice();

	/*!
	* \brief Cast a NBOBaseClass to a OME_Choice.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<OME_Choice> 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 this object as a OME_Choice_1 element.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setOME_Choice_1(Inscoper::NBO::OME_Choice::InlineOME_Choice_1Ptr value, bool validate = true);

	/*!
	* \brief Checks whether this object is a OME_Choice_1 element.
	*
	* \return true if this object is a OME_Choice_1 element, false otherwise
	*/
	bool isOME_Choice_1() const;

	/*!
	* \brief Returns the value of this object as a OME_Choice_1 element.
	*
	* \return The value as a OME_Choice_1 element
	*/
	Inscoper::NBO::OME_Choice::InlineOME_Choice_1Ptr asOME_Choice_1();

	/*!
	* \brief Sets the value of this object as a BinaryOnly element.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setBinaryOnly(Inscoper::NBO::OME_Choice::InlineBinaryOnlyPtr value, bool validate = true);

	/*!
	* \brief Checks whether this object is a BinaryOnly element.
	*
	* \return true if this object is a BinaryOnly element, false otherwise
	*/
	bool isBinaryOnly() const;

	/*!
	* \brief Returns the value of this object as a BinaryOnly element.
	*
	* \return The value as a BinaryOnly element
	*/
	Inscoper::NBO::OME_Choice::InlineBinaryOnlyPtr asBinaryOnly();



private:
	OME_Choice_VariantPtr choice = nullptr;

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

/*! Shared pointer for OME_Choice*/
typedef std::shared_ptr<Inscoper::NBO::OME_Choice> OME_ChoicePtr;

} // namespace Inscoper::NBO

#endif // OME_CHOICE_HPP_INCLUDED