#ifndef MANUFACTURERSPEC_TYPE_HPP_INCLUDED
#define MANUFACTURERSPEC_TYPE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/AdditionalVendorInformation.h>
#include <NBO/NBO/FileAnnotation_Type.h>
#include <NBO/NBO/MapAnnotation.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 ManufacturerSpec.
*
* This describes the Manufacturer specifications for this component (i.e., Manufacturer Name, Model designation and Catalog Number).
*/
class NBO_EXPORT ManufacturerSpec_Type : public NBOBaseClass {

public:
	
	ManufacturerSpec_Type();
	~ManufacturerSpec_Type();

	/*!
	* \brief Cast a NBOBaseClass to a ManufacturerSpec_Type.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<ManufacturerSpec_Type> 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 Manufacturer attribute.
	*
	* This field refers to the company, research group or individual who built or manufactured this hardware component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setManufacturer(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the Manufacturer attribute.
	*
	* This field refers to the company, research group or individual who built or manufactured this hardware component.
	*
	* \return The value of the attribute
	*/
	std::string getManufacturer() const;

	/*!
	* \brief Resets the Manufacturer attribute to an unset state.
	*
	* This field refers to the company, research group or individual who built or manufactured this hardware component.
	*/
	void resetManufacturer();

	/*!
	* \brief Checks whether the Manufacturer attribute is present.
	*
	* This field refers to the company, research group or individual who built or manufactured this hardware component.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasManufacturer() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* This field refers to the company, research group or individual who built or manufactured this hardware component.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getManufacturerAllowedValues();

	/*!
	* \brief Sets the value of the Model attribute.
	*
	* This field refers to the Model name or any other designation the Manufacturer uses for this component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setModel(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the Model attribute.
	*
	* This field refers to the Model name or any other designation the Manufacturer uses for this component.
	*
	* \return The value of the attribute
	*/
	std::string getModel() const;

	/*!
	* \brief Resets the Model attribute to an unset state.
	*
	* This field refers to the Model name or any other designation the Manufacturer uses for this component.
	*/
	void resetModel();

	/*!
	* \brief Checks whether the Model attribute is present.
	*
	* This field refers to the Model name or any other designation the Manufacturer uses for this component.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasModel() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* This field refers to the Model name or any other designation the Manufacturer uses for this component.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getModelAllowedValues();

	/*!
	* \brief Sets the value of the CatalogNumber attribute.
	*
	* This field records the Catalog, Part or Serial Number used by the Manufacturer to uniquely identify this component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setCatalogNumber(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the CatalogNumber attribute.
	*
	* This field records the Catalog, Part or Serial Number used by the Manufacturer to uniquely identify this component.
	*
	* \return The value of the attribute
	*/
	std::string getCatalogNumber() const;

	/*!
	* \brief Resets the CatalogNumber attribute to an unset state.
	*
	* This field records the Catalog, Part or Serial Number used by the Manufacturer to uniquely identify this component.
	*/
	void resetCatalogNumber();

	/*!
	* \brief Checks whether the CatalogNumber attribute is present.
	*
	* This field records the Catalog, Part or Serial Number used by the Manufacturer to uniquely identify this component.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasCatalogNumber() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* This field records the Catalog, Part or Serial Number used by the Manufacturer to uniquely identify this component.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getCatalogNumberAllowedValues();

	/*!
	* \brief Sets the value of the LotNumber attribute.
	*
	* The Lot Number used by the Manufacturer to refer to a specific production batch or lot for this component.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setLotNumber(const std::string& value, bool validate = true);

	/*!
	* \brief Returns the value of the LotNumber attribute.
	*
	* The Lot Number used by the Manufacturer to refer to a specific production batch or lot for this component.
	*
	* \return The value of the attribute
	*/
	std::string getLotNumber() const;

	/*!
	* \brief Resets the LotNumber attribute to an unset state.
	*
	* The Lot Number used by the Manufacturer to refer to a specific production batch or lot for this component.
	*/
	void resetLotNumber();

	/*!
	* \brief Checks whether the LotNumber attribute is present.
	*
	* The Lot Number used by the Manufacturer to refer to a specific production batch or lot for this component.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasLotNumber() const;

	/*!
	* \brief Returns the allowed values for this attribut.
	*
	* The Lot Number used by the Manufacturer to refer to a specific production batch or lot for this component.
	*
	* \return The list of allowed values
	*/
	static const std::set<std::string>& getLotNumberAllowedValues();

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

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

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

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

	/*!
	* \brief Sets the value of the SpecsFile element.
	*
	* This element refers to a PDF file that contains the specifications for this hardware component as provided by the Manufacturer.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setSpecsFile(const Inscoper::NBO::FileAnnotation_TypePtr& value, bool validate = true);

	/*!
	* \brief Returns the value of the SpecsFile element.
	*
	* This element refers to a PDF file that contains the specifications for this hardware component as provided by the Manufacturer.
	*
	* \return The value of the element
	*/
	Inscoper::NBO::FileAnnotation_TypePtr getSpecsFile() const;

	/*!
	* \brief Resets the SpecsFile element to an unset state.
	*
	* This element refers to a PDF file that contains the specifications for this hardware component as provided by the Manufacturer.
	*/
	void resetSpecsFile();

	/*!
	* \brief Checks whether the optional SpecsFile element is present.
	*
	* This element refers to a PDF file that contains the specifications for this hardware component as provided by the Manufacturer.
	*
	* \return true if the optional attribute has been set, false otherwise
	*/
	bool hasSpecsFile() const;

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

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

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

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


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

    std::optional<std::string> Manufacturer; // Required attribute
    static const std::set<std::string> ManufacturerAllowedValues;
    std::optional<std::string> Model; // Required attribute
    static const std::set<std::string> ModelAllowedValues;
    std::optional<std::string> CatalogNumber; // Required attribute
    static const std::set<std::string> CatalogNumberAllowedValues;
    std::optional<std::string> LotNumber; // Optional attribute
    static const std::set<std::string> LotNumberAllowedValues;
    std::vector<Inscoper::NBO::MapAnnotationPtr> MapAnnotation_List;
    Inscoper::NBO::FileAnnotation_TypePtr SpecsFile = nullptr;
    std::vector<Inscoper::NBO::AdditionalVendorInformationPtr> AdditionalVendorInformation_List;
};

/*! Shared pointer for ManufacturerSpec_Type*/
typedef std::shared_ptr<ManufacturerSpec_Type> ManufacturerSpec_TypePtr;

} // namespace Inscoper::NBO

#endif // MANUFACTURERSPEC_TYPE_HPP_INCLUDED