using System;
using System.Xml.Serialization;

namespace QDART_MFG_CfgEditor;

[Serializable]
public class QTAPathInfo
{
	private string pathname;

	private string pathid;

	private string additionalloss;

	private string cal_date;

	private string testerid;

	private string calcable_pathname;

	private string usecalcable;

	private QTADataListInfo datalist;

	[XmlElement("PathName")]
	public string PathName
	{
		get
		{
			return pathname;
		}
		set
		{
			pathname = value;
		}
	}

	[XmlElement("PathID")]
	public string PathID
	{
		get
		{
			return pathid;
		}
		set
		{
			pathid = value;
		}
	}

	[XmlElement("AdditionalLoss")]
	public string AdditionalLoss
	{
		get
		{
			return additionalloss;
		}
		set
		{
			if (double.TryParse(value, out var _))
			{
				additionalloss = value;
				return;
			}
			Exception ex = new Exception("Invalid data for Additional Loss");
			throw ex;
		}
	}

	[XmlElement("Cal_Date")]
	public string Cal_Date
	{
		get
		{
			return cal_date;
		}
		set
		{
			cal_date = value;
		}
	}

	[XmlElement("TesterID")]
	public string TesterID
	{
		get
		{
			return testerid;
		}
		set
		{
			testerid = value;
		}
	}

	[XmlElement("CalCable_PathName")]
	public string CalCable_PathName
	{
		get
		{
			return calcable_pathname;
		}
		set
		{
			calcable_pathname = value;
		}
	}

	[XmlElement("UseCalCable")]
	public string UseCalCable
	{
		get
		{
			return usecalcable;
		}
		set
		{
			usecalcable = value;
		}
	}

	[XmlElement("DataList")]
	public QTADataListInfo DataList
	{
		get
		{
			return datalist;
		}
		set
		{
			datalist = value;
		}
	}
}
