#ifndef PLANE_HPP_INCLUDED
#define PLANE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/AnnotationRef.h>
#include <NBO/NBO/MechanicalCalibration.h>
#include <NBO/NBO/NonNegativeInt_Type.h>
#include <NBO/NBO/PlaneID_Type.h>
#include <NBO/NBO/PlaneTransformationMatrix.h>
#include <NBO/NBO/Plane_Choice.h>
#include <NBO/NBO/TheAdditionalDimensionRef.h>
#include <NBO/NBO/UnitsLength_Type.h>
#include <NBO/NBO/UnitsTime_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 Plane.
*
* Each Image has to have at least one Plane and one Channel. The Plane element holds the Microscope stage and Image timing data for a given Channel/z-section/timepoint. The total number of Plane elements for a given Image must equal to SizeZ x SizeC x SizeT.
*/
class NBO_EXPORT Plane : public NBOBaseClass {

public:
	
	Plane();
	~Plane();

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

	/*!
	* \brief Returns the value of the ID attribute.
	*
	* A unique identifier for this Plane.
	*
	* \return The value of the attribute
	*/
	PlaneID_TypePtr getID() const;

	/*!
	* \brief Resets the ID attribute to an unset state.
	*
	* A unique identifier for this Plane.
	*/
	void resetID();

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

	/*!
	* \brief Sets the value of the TheZ attribute.
	*
	* This field records the Z-section to which this Plane corresponds. This is numbered from 0.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setTheZ(const Inscoper::NBO::NonNegativeInt_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the TheZ attribute.
	*
	* This field records the Z-section to which this Plane corresponds. This is numbered from 0.
	*
	* \return The value of the attribute
	*/
	NonNegativeInt_TypePtr getTheZ() const;

	/*!
	* \brief Resets the TheZ attribute to an unset state.
	*
	* This field records the Z-section to which this Plane corresponds. This is numbered from 0.
	*/
	void resetTheZ();

	/*!
	* \brief Checks whether the optional TheZ attribute is present.
	*
	* This field records the Z-section to which this Plane corresponds. This is numbered from 0.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasTheZ() const;

	/*!
	* \brief Sets the value of the TheT attribute.
	*
	* This field records th Timepoint to which this Plane corresponds. This is numbered from 0.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setTheT(const Inscoper::NBO::NonNegativeInt_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the TheT attribute.
	*
	* This field records th Timepoint to which this Plane corresponds. This is numbered from 0.
	*
	* \return The value of the attribute
	*/
	NonNegativeInt_TypePtr getTheT() const;

	/*!
	* \brief Resets the TheT attribute to an unset state.
	*
	* This field records th Timepoint to which this Plane corresponds. This is numbered from 0.
	*/
	void resetTheT();

	/*!
	* \brief Checks whether the optional TheT attribute is present.
	*
	* This field records th Timepoint to which this Plane corresponds. This is numbered from 0.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasTheT() const;

	/*!
	* \brief Sets the value of the TheC attribute.
	*
	* This field records th Channel to which this Plane corresponds. This is numbered from 0.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setTheC(const Inscoper::NBO::NonNegativeInt_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the TheC attribute.
	*
	* This field records th Channel to which this Plane corresponds. This is numbered from 0.
	*
	* \return The value of the attribute
	*/
	NonNegativeInt_TypePtr getTheC() const;

	/*!
	* \brief Resets the TheC attribute to an unset state.
	*
	* This field records th Channel to which this Plane corresponds. This is numbered from 0.
	*/
	void resetTheC();

	/*!
	* \brief Checks whether the optional TheC attribute is present.
	*
	* This field records th Channel to which this Plane corresponds. This is numbered from 0.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasTheC() const;

	/*!
	* \brief Sets the value of the Timestamp attribute.
	*
	* This field records the time at which this Plane was acquired as recorded from the beginning of Image Acquisition.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setTimestamp(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the Timestamp attribute.
	*
	* This field records the time at which this Plane was acquired as recorded from the beginning of Image Acquisition.
	*
	* \return The value of the attribute
	*/
	float getTimestamp() const;

	/*!
	* \brief Resets the Timestamp attribute to an unset state.
	*
	* This field records the time at which this Plane was acquired as recorded from the beginning of Image Acquisition.
	*/
	void resetTimestamp();

	/*!
	* \brief Checks whether the Timestamp attribute is present.
	*
	* This field records the time at which this Plane was acquired as recorded from the beginning of Image Acquisition.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasTimestamp() const;

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

	/*!
	* \brief Returns the value of the TimestampUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsTime_TypePtr getTimestampUnit() const;

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

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

	/*!
	* \brief Sets the value of the ExposureTime attribute.
	*
	* This field records the duration of the Exposure utilized to acquire this Plane.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setExposureTime(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the ExposureTime attribute.
	*
	* This field records the duration of the Exposure utilized to acquire this Plane.
	*
	* \return The value of the attribute
	*/
	float getExposureTime() const;

	/*!
	* \brief Resets the ExposureTime attribute to an unset state.
	*
	* This field records the duration of the Exposure utilized to acquire this Plane.
	*/
	void resetExposureTime();

	/*!
	* \brief Checks whether the ExposureTime attribute is present.
	*
	* This field records the duration of the Exposure utilized to acquire this Plane.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasExposureTime() const;

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

	/*!
	* \brief Returns the value of the ExposureTimeUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsTime_TypePtr getExposureTimeUnit() const;

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

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

	/*!
	* \brief Sets the value of the PixelDwellTime attribute.
	*
	* This value typically refers to the settings applied to the Confocal Scanner during Acquisition, and it assumes that Pixel Dwell Time was set uniformly throughout the Plane. The Pixel Dwell Time represents the time this Confocal Scanner was set to dwell upon each pixel during the acquisition of this Plane (e.g. 1.58 µsec/pixel). The higher the Pixel Dwell Time the slower is the scan speed, the higher the sensitivity but also the potential photobleaching.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPixelDwellTime(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PixelDwellTime attribute.
	*
	* This value typically refers to the settings applied to the Confocal Scanner during Acquisition, and it assumes that Pixel Dwell Time was set uniformly throughout the Plane. The Pixel Dwell Time represents the time this Confocal Scanner was set to dwell upon each pixel during the acquisition of this Plane (e.g. 1.58 µsec/pixel). The higher the Pixel Dwell Time the slower is the scan speed, the higher the sensitivity but also the potential photobleaching.
	*
	* \return The value of the attribute
	*/
	float getPixelDwellTime() const;

	/*!
	* \brief Resets the PixelDwellTime attribute to an unset state.
	*
	* This value typically refers to the settings applied to the Confocal Scanner during Acquisition, and it assumes that Pixel Dwell Time was set uniformly throughout the Plane. The Pixel Dwell Time represents the time this Confocal Scanner was set to dwell upon each pixel during the acquisition of this Plane (e.g. 1.58 µsec/pixel). The higher the Pixel Dwell Time the slower is the scan speed, the higher the sensitivity but also the potential photobleaching.
	*/
	void resetPixelDwellTime();

	/*!
	* \brief Checks whether the PixelDwellTime attribute is present.
	*
	* This value typically refers to the settings applied to the Confocal Scanner during Acquisition, and it assumes that Pixel Dwell Time was set uniformly throughout the Plane. The Pixel Dwell Time represents the time this Confocal Scanner was set to dwell upon each pixel during the acquisition of this Plane (e.g. 1.58 µsec/pixel). The higher the Pixel Dwell Time the slower is the scan speed, the higher the sensitivity but also the potential photobleaching.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPixelDwellTime() const;

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

	/*!
	* \brief Returns the value of the PixelDwellTimeUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsTime_TypePtr getPixelDwellTimeUnit() const;

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

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

	/*!
	* \brief Sets the value of the PositionX attribute.
	*
	* This field records the X position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPositionX(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PositionX attribute.
	*
	* This field records the X position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \return The value of the attribute
	*/
	float getPositionX() const;

	/*!
	* \brief Resets the PositionX attribute to an unset state.
	*
	* This field records the X position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*/
	void resetPositionX();

	/*!
	* \brief Checks whether the PositionX attribute is present.
	*
	* This field records the X position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPositionX() const;

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

	/*!
	* \brief Returns the value of the PositionXUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsLength_TypePtr getPositionXUnit() const;

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

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

	/*!
	* \brief Sets the value of the PositionY attribute.
	*
	* This field records the Y position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPositionY(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PositionY attribute.
	*
	* This field records the Y position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \return The value of the attribute
	*/
	float getPositionY() const;

	/*!
	* \brief Resets the PositionY attribute to an unset state.
	*
	* This field records the Y position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*/
	void resetPositionY();

	/*!
	* \brief Checks whether the PositionY attribute is present.
	*
	* This field records the Y position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPositionY() const;

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

	/*!
	* \brief Returns the value of the PositionYUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsLength_TypePtr getPositionYUnit() const;

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

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

	/*!
	* \brief Sets the value of the PositionZ attribute.
	*
	* This field records the Z position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPositionZ(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PositionZ attribute.
	*
	* This field records the Z position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \return The value of the attribute
	*/
	float getPositionZ() const;

	/*!
	* \brief Resets the PositionZ attribute to an unset state.
	*
	* This field records the Z position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*/
	void resetPositionZ();

	/*!
	* \brief Checks whether the PositionZ attribute is present.
	*
	* This field records the Z position of the Plane within the Microscope's reference frame. This value can typically be obtained by recording the Sample Positioning Device and Stage Insert coordinates.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPositionZ() const;

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

	/*!
	* \brief Returns the value of the PositionZUnit attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	UnitsLength_TypePtr getPositionZUnit() const;

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

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

	/*!
	* \brief Sets the value of the PlaneXOffset attribute.
	*
	* This field records the X offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPlaneXOffset(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PlaneXOffset attribute.
	*
	* This field records the X offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*
	* \return The value of the attribute
	*/
	float getPlaneXOffset() const;

	/*!
	* \brief Resets the PlaneXOffset attribute to an unset state.
	*
	* This field records the X offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*/
	void resetPlaneXOffset();

	/*!
	* \brief Checks whether the PlaneXOffset attribute is present.
	*
	* This field records the X offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPlaneXOffset() const;

	/*!
	* \brief Sets the value of the PlaneYOffset attribute.
	*
	* This field records the Y offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPlaneYOffset(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PlaneYOffset attribute.
	*
	* This field records the Y offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*
	* \return The value of the attribute
	*/
	float getPlaneYOffset() const;

	/*!
	* \brief Resets the PlaneYOffset attribute to an unset state.
	*
	* This field records the Y offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*/
	void resetPlaneYOffset();

	/*!
	* \brief Checks whether the PlaneYOffset attribute is present.
	*
	* This field records the Y offset (expressed in Pixels) that specifies the position of this Plane's center with respect to the center of the full frame.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPlaneYOffset() const;

	/*!
	* \brief Sets the value of the PlaneZOffset attribute.
	*
	* This field describes the Z-offset imposed by the Focal Positioning device.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setPlaneZOffset(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the PlaneZOffset attribute.
	*
	* This field describes the Z-offset imposed by the Focal Positioning device.
	*
	* \return The value of the attribute
	*/
	float getPlaneZOffset() const;

	/*!
	* \brief Resets the PlaneZOffset attribute to an unset state.
	*
	* This field describes the Z-offset imposed by the Focal Positioning device.
	*/
	void resetPlaneZOffset();

	/*!
	* \brief Checks whether the PlaneZOffset attribute is present.
	*
	* This field describes the Z-offset imposed by the Focal Positioning device.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasPlaneZOffset() const;

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

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

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

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

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

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

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

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

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

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

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

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

	/*!
	* \brief Sets the list of AnnotationRef elements.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*
	* \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.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*
	* \return The list of AnnotationRef elements
	*/
	std::vector<Inscoper::NBO::AnnotationRefPtr> getAnnotationRef_List() const;

	/*!
	* \brief Adds a new AnnotationRef element to this object.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*
	* \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.
	*
	* This is a simple multi-line comment or annotation describing this component.
	*/
	void clearAnnotationRef_List();

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

	/*!
	* \brief Returns the value of the plane_choice element.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the element
	*/
	Inscoper::NBO::Plane_ChoicePtr getplane_choice() const
;
	/*!
	* \brief Resets the plane_choice element to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetplane_choice();

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


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

	PlaneID_TypePtr ID = nullptr; // Required attribute
	NonNegativeInt_TypePtr TheZ = nullptr; // Required attribute
	NonNegativeInt_TypePtr TheT = nullptr; // Required attribute
	NonNegativeInt_TypePtr TheC = nullptr; // Required attribute
    std::optional<float> Timestamp; // Required attribute
	UnitsTime_TypePtr TimestampUnit = nullptr; // Optional attribute
    std::optional<float> ExposureTime; // Optional attribute
	UnitsTime_TypePtr ExposureTimeUnit = nullptr; // Optional attribute
    std::optional<float> PixelDwellTime; // Optional attribute
	UnitsTime_TypePtr PixelDwellTimeUnit = nullptr; // Optional attribute
    std::optional<float> PositionX; // Optional attribute
	UnitsLength_TypePtr PositionXUnit = nullptr; // Optional attribute
    std::optional<float> PositionY; // Optional attribute
	UnitsLength_TypePtr PositionYUnit = nullptr; // Optional attribute
    std::optional<float> PositionZ; // Optional attribute
	UnitsLength_TypePtr PositionZUnit = nullptr; // Optional attribute
    std::optional<float> PlaneXOffset; // Optional attribute
    std::optional<float> PlaneYOffset; // Optional attribute
    std::optional<float> PlaneZOffset; // Optional attribute
    std::vector<Inscoper::NBO::MechanicalCalibrationPtr> MechanicalCalibration_List;
    std::vector<Inscoper::NBO::TheAdditionalDimensionRefPtr> TheAdditionalDimensionRef_List;
    std::vector<Inscoper::NBO::PlaneTransformationMatrixPtr> PlaneTransformationMatrix_List;
    std::vector<Inscoper::NBO::AnnotationRefPtr> AnnotationRef_List;
    Inscoper::NBO::Plane_ChoicePtr plane_choice = nullptr;
};

/*! Shared pointer for Plane*/
typedef std::shared_ptr<Plane> PlanePtr;

} // namespace Inscoper::NBO

#endif // PLANE_HPP_INCLUDED