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

namespace QC.QSPRLogSchema;

[Serializable]
[XmlType(AnonymousType = true)]
public class ArrayOutputLimitItem : IEquatable<ArrayOutputLimitItem>
{
	[DebuggerBrowsable(DebuggerBrowsableState.Never)]
	private string startIdxField;

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

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

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

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

	[XmlAttribute("StartIdx")]
	public string StartIndex
	{
		get
		{
			return startIdxField;
		}
		set
		{
			startIdxField = value;
		}
	}

	[XmlAttribute("StopIdx")]
	public string StopIndex
	{
		get
		{
			return stopIdxField;
		}
		set
		{
			stopIdxField = value;
		}
	}

	[XmlAttribute("Min")]
	public string Minimum
	{
		get
		{
			return minField;
		}
		set
		{
			minField = value;
		}
	}

	[XmlAttribute("Max")]
	public string Maximum
	{
		get
		{
			return maxField;
		}
		set
		{
			maxField = value;
		}
	}

	[XmlAttribute("S")]
	public string Status
	{
		get
		{
			return sField;
		}
		set
		{
			sField = value;
		}
	}

	public bool ShouldSerializeStartIndex()
	{
		return !string.IsNullOrEmpty(StartIndex);
	}

	public bool ShouldSerializeStopIndex()
	{
		return !string.IsNullOrEmpty(StopIndex);
	}

	public bool ShouldSerializeMinimum()
	{
		return !string.IsNullOrEmpty(Minimum);
	}

	public bool ShouldSerializeMaximum()
	{
		return !string.IsNullOrEmpty(Maximum);
	}

	public bool ShouldSerializeStatus()
	{
		return !string.IsNullOrEmpty(Status);
	}

	public ArrayOutputLimitItem()
	{
		startIdxField = string.Empty;
		stopIdxField = string.Empty;
		minField = string.Empty;
		maxField = string.Empty;
		sField = string.Empty;
	}

	public ArrayOutputLimitItem(string startIdx = null, string stopIdx = null, string min = null, string max = null, string s = null)
	{
		if (!string.IsNullOrEmpty(startIdx))
		{
			startIdxField = startIdx;
		}
		else
		{
			startIdxField = string.Empty;
		}
		if (!string.IsNullOrEmpty(stopIdx))
		{
			stopIdxField = stopIdx;
		}
		else
		{
			stopIdxField = string.Empty;
		}
		if (!string.IsNullOrEmpty(min))
		{
			minField = min;
		}
		else
		{
			minField = string.Empty;
		}
		if (!string.IsNullOrEmpty(max))
		{
			maxField = max;
		}
		else
		{
			maxField = string.Empty;
		}
		if (!string.IsNullOrEmpty(s))
		{
			sField = s;
		}
		else
		{
			sField = string.Empty;
		}
	}

	public bool Equals(ArrayOutputLimitItem other)
	{
		if (StartIndex.Equals(other.StartIndex) && StopIndex.Equals(other.StopIndex) && Minimum.Equals(other.Minimum) && Maximum.Equals(other.Maximum))
		{
			return Status.Equals(other.Status);
		}
		return false;
	}
}
