Many updates for OAP
This commit is contained in:
112
src/OAP/OapApi.v1.Client/ApplicationStatus.g.cs
Normal file
112
src/OAP/OapApi.v1.Client/ApplicationStatus.g.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
// <auto-generated>
|
||||
// DO NOT EDIT: generated by fsdgencsharp
|
||||
// </auto-generated>
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using Facility.Core;
|
||||
|
||||
namespace OapApi.v1.Client
|
||||
{
|
||||
[System.CodeDom.Compiler.GeneratedCode("fsdgencsharp", "")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(ApplicationStatusJsonConverter))]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(ApplicationStatusSystemTextJsonConverter))]
|
||||
public partial struct ApplicationStatus : IEquatable<ApplicationStatus>
|
||||
{
|
||||
public static readonly ApplicationStatus InProgress = new ApplicationStatus(Strings.InProgress);
|
||||
|
||||
public static readonly ApplicationStatus Submitted = new ApplicationStatus(Strings.Submitted);
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance.
|
||||
/// </summary>
|
||||
public ApplicationStatus(string value) => m_value = value;
|
||||
|
||||
/// <summary>
|
||||
/// Converts the instance to a string.
|
||||
/// </summary>
|
||||
public override string ToString() => m_value != null && s_valueCache.TryGetValue(m_value, out var cachedValue) ? cachedValue : m_value ?? "";
|
||||
|
||||
/// <summary>
|
||||
/// Checks for equality.
|
||||
/// </summary>
|
||||
public bool Equals(ApplicationStatus other) => StringComparer.OrdinalIgnoreCase.Equals(m_value ?? "", other.m_value ?? "");
|
||||
|
||||
/// <summary>
|
||||
/// Checks for equality.
|
||||
/// </summary>
|
||||
public override bool Equals(object obj) => obj is ApplicationStatus && Equals((ApplicationStatus) obj);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code.
|
||||
/// </summary>
|
||||
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(m_value ?? "");
|
||||
|
||||
/// <summary>
|
||||
/// Checks for equality.
|
||||
/// </summary>
|
||||
public static bool operator ==(ApplicationStatus left, ApplicationStatus right) => left.Equals(right);
|
||||
|
||||
/// <summary>
|
||||
/// Checks for inequality.
|
||||
/// </summary>
|
||||
public static bool operator !=(ApplicationStatus left, ApplicationStatus right) => !left.Equals(right);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the instance is equal to one of the defined values.
|
||||
/// </summary>
|
||||
public bool IsDefined() => m_value != null && s_valueCache.ContainsKey(m_value);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all of the defined values.
|
||||
/// </summary>
|
||||
public static IReadOnlyList<ApplicationStatus> GetValues() => s_values;
|
||||
|
||||
/// <summary>
|
||||
/// Provides string constants for defined values.
|
||||
/// </summary>
|
||||
public static class Strings
|
||||
{
|
||||
public const string InProgress = "InProgress";
|
||||
|
||||
public const string Submitted = "Submitted";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used for serialization.
|
||||
/// </summary>
|
||||
public sealed class ApplicationStatusJsonConverter : ServiceEnumJsonConverter<ApplicationStatus>
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates the value from a string.
|
||||
/// </summary>
|
||||
protected override ApplicationStatus CreateCore(string value) => new ApplicationStatus(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used for serialization.
|
||||
/// </summary>
|
||||
public sealed class ApplicationStatusSystemTextJsonConverter : ServiceEnumSystemTextJsonConverter<ApplicationStatus>
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates the value from a string.
|
||||
/// </summary>
|
||||
protected override ApplicationStatus CreateCore(string value) => new ApplicationStatus(value);
|
||||
}
|
||||
|
||||
private static readonly ReadOnlyCollection<ApplicationStatus> s_values = new ReadOnlyCollection<ApplicationStatus>(
|
||||
new[]
|
||||
{
|
||||
InProgress,
|
||||
Submitted,
|
||||
});
|
||||
|
||||
private static readonly IReadOnlyDictionary<string, string> s_valueCache = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
{ Strings.InProgress, Strings.InProgress },
|
||||
{ Strings.Submitted, Strings.Submitted },
|
||||
};
|
||||
|
||||
private readonly string m_value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user