using System;
using System.Diagnostics;
using System.Xml.Serialization;

namespace QC.QSPRLogSchema;

[Serializable]
[XmlType(AnonymousType = true)]
public class HardwareConfiguration
{
	[DebuggerBrowsable(DebuggerBrowsableState.Never)]
	private WLanRF wLanRFField;

	[DebuggerBrowsable(DebuggerBrowsableState.Never)]
	private WWanRF wWanRFField;

	[DebuggerBrowsable(DebuggerBrowsableState.Never)]
	private string idField;

	public WLanRF WLanRF
	{
		get
		{
			return wLanRFField;
		}
		set
		{
			wLanRFField = value;
		}
	}

	public WWanRF WWanRF
	{
		get
		{
			return wWanRFField;
		}
		set
		{
			wWanRFField = value;
		}
	}

	[XmlAttribute]
	public string Id
	{
		get
		{
			return idField;
		}
		set
		{
			idField = value;
		}
	}

	public bool ShouldSerializeWLanRF()
	{
		if (WLanRF != null)
		{
			if (WLanRF != null)
			{
				return WLanRF.ShouldSerializeId();
			}
			return false;
		}
		return false;
	}

	public bool ShouldSerializeWWanRF()
	{
		if (WWanRF != null)
		{
			if (WWanRF != null)
			{
				return WWanRF.ShouldSerializeId();
			}
			return false;
		}
		return false;
	}

	public bool ShouldSerializeId()
	{
		return !string.IsNullOrEmpty(Id);
	}

	public HardwareConfiguration()
	{
		wLanRFField = new WLanRF();
		wWanRFField = new WWanRF();
		idField = string.Empty;
	}

	public HardwareConfiguration(WLanRF wLanRF = null, WWanRF wWanRF = null, string id = null)
	{
		if (wLanRF != null)
		{
			wLanRFField = wLanRF;
		}
		else
		{
			wLanRFField = new WLanRF();
		}
		if (wWanRF != null)
		{
			wWanRFField = wWanRF;
		}
		else
		{
			wWanRFField = new WWanRF();
		}
		if (!string.IsNullOrEmpty(id))
		{
			idField = id;
		}
		else
		{
			idField = string.Empty;
		}
	}
}
