using System; using System.Collections.Generic; using UnityEngine.Scripting; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Unity.Services.Relay.Models { /// /// ErrorResponseBody model /// /// MUST use the same status code in the actual HTTP response. /// A human-readable explanation specific to this occurrence of the problem. Ought to focus on helping the client correct the problem, rather than giving debugging information. /// SHOULD be the same as the recommended HTTP status phrase for that code. /// Machine readable list of individual errors. [Preserve] [DataContract(Name = "ErrorResponseBody")] public class ErrorResponseBody { [Preserve] public ErrorResponseBody(int status, string detail, string title, List details = default(List)) { Status = status; Detail = detail; Title = title; Details = details; } [Preserve] [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public int Status{ get; } [Preserve] [DataMember(Name = "detail", IsRequired = true, EmitDefaultValue = true)] public string Detail{ get; } [Preserve] [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)] public string Title{ get; } [Preserve] [DataMember(Name = "details", EmitDefaultValue = false)] public List Details{ get; } } }