39 lines
1020 B
C#
39 lines
1020 B
C#
using RobotNet.VDA5050.Type;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace RobotNet.VDA5050.State;
|
|
|
|
|
|
public class ErrorReference
|
|
{
|
|
[Required]
|
|
[JsonPropertyName("referenceKey")]
|
|
public string ReferenceKey { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[JsonPropertyName("referenceValue")]
|
|
public string ReferenceValue { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class Error
|
|
{
|
|
[Required]
|
|
[JsonPropertyName("errorType")]
|
|
public string ErrorType { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("errorReferences")]
|
|
public ErrorReference[]? ErrorReferences { get; set; }
|
|
|
|
[JsonPropertyName("errorDescription")]
|
|
public string? ErrorDescription { get; set; }
|
|
|
|
[JsonPropertyName("errorHint")]
|
|
public string? ErrorHint { get; set; }
|
|
|
|
[JsonPropertyName("errorLevel")]
|
|
[JsonConverter(typeof(JsonStringEnumConverter))]
|
|
[Required]
|
|
public ErrorLevel ErrorLevel { get; set; }
|
|
}
|