// <auto-generated>
// DO NOT EDIT: generated by fsdgencsharp
// </auto-generated>
using System;
using System.Collections.Generic;
using Facility.Core;

namespace OapApi.v1.Client
{
	/// <summary>
	/// An application.
	/// </summary>
	[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
	public sealed partial class ApplicationDto : ServiceDto<ApplicationDto>
	{
		/// <summary>
		/// Creates an instance.
		/// </summary>
		public ApplicationDto()
		{
		}

		/// <summary>
		/// A unique identifier for the application.
		/// </summary>
		public string Id { get; set; }

		/// <summary>
		/// The current status of this application.
		/// </summary>
		public ApplicationStatus? Status { get; set; }

		/// <summary>
		/// Terms the user must accept to start, continue an accept an application.
		/// </summary>
		public ApplicationTermsDto Terms { get; set; }

		/// <summary>
		/// The JSON serializer.
		/// </summary>
		protected override JsonServiceSerializer JsonSerializer => SystemTextJsonServiceSerializer.Instance;

		/// <summary>
		/// Determines if two DTOs are equivalent.
		/// </summary>
		public override bool IsEquivalentTo(ApplicationDto other)
		{
			return other != null &&
				Id == other.Id &&
				Status == other.Status &&
				ServiceDataUtility.AreEquivalentDtos(Terms, other.Terms);
		}
	}
}
