using System;
using System.Collections.Generic;
using UnityEngine.Scripting;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Unity.Services.Lobbies.Http;
namespace Unity.Services.Lobbies.Models
{
///
/// An order for an individual field that is applied to a query.
/// Whether to sort in ascending or descending order.
/// The name of the field to order on.
///
[Preserve]
[DataContract(Name = "QueryOrder")]
public class QueryOrder
{
///
/// An order for an individual field that is applied to a query.
///
/// Whether to sort in ascending or descending order.
/// The name of the field to order on.
[Preserve]
public QueryOrder(bool asc = default, FieldOptions field = default)
{
Asc = asc;
Field = field;
}
///
/// Whether to sort in ascending or descending order.
///
[Preserve]
[DataMember(Name = "asc", EmitDefaultValue = true)]
public bool Asc{ get; }
///
/// The name of the field to order on.
///
[Preserve]
[JsonConverter(typeof(StringEnumConverter))]
[DataMember(Name = "field", EmitDefaultValue = false)]
public FieldOptions Field{ get; }
///
/// The name of the field to order on.
///
/// The name of the field to order on.
[Preserve]
[JsonConverter(typeof(StringEnumConverter))]
public enum FieldOptions
{
///
/// Enum Name for value: Name
///
[EnumMember(Value = "Name")]
Name = 1,
///
/// Enum MaxPlayers for value: MaxPlayers
///
[EnumMember(Value = "MaxPlayers")]
MaxPlayers = 2,
///
/// Enum AvailableSlots for value: AvailableSlots
///
[EnumMember(Value = "AvailableSlots")]
AvailableSlots = 3,
///
/// Enum Created for value: Created
///
[EnumMember(Value = "Created")]
Created = 4,
///
/// Enum LastUpdated for value: LastUpdated
///
[EnumMember(Value = "LastUpdated")]
LastUpdated = 5,
///
/// Enum ID for value: ID
///
[EnumMember(Value = "ID")]
ID = 6,
///
/// Enum S1 for value: S1
///
[EnumMember(Value = "S1")]
S1 = 7,
///
/// Enum S2 for value: S2
///
[EnumMember(Value = "S2")]
S2 = 8,
///
/// Enum S3 for value: S3
///
[EnumMember(Value = "S3")]
S3 = 9,
///
/// Enum S4 for value: S4
///
[EnumMember(Value = "S4")]
S4 = 10,
///
/// Enum S5 for value: S5
///
[EnumMember(Value = "S5")]
S5 = 11,
///
/// Enum N1 for value: N1
///
[EnumMember(Value = "N1")]
N1 = 12,
///
/// Enum N2 for value: N2
///
[EnumMember(Value = "N2")]
N2 = 13,
///
/// Enum N3 for value: N3
///
[EnumMember(Value = "N3")]
N3 = 14,
///
/// Enum N4 for value: N4
///
[EnumMember(Value = "N4")]
N4 = 15,
///
/// Enum N5 for value: N5
///
[EnumMember(Value = "N5")]
N5 = 16
}
}
}