using System.Collections.Generic; using System.Text.Json; namespace Adaptation.Shared.Metrology { public partial class WS { // this class represents the response from the Inbound API endpoint public class Results { // true or false if data was written to the database public bool Success { get; set; } // if true, contains ID of the Header record in the database public long HeaderID { get; set; } // if false, this collection will contain a list of errors public List Errors { get; set; } // this collection will contain a list of warnings, they will not prevent data from being saved public List Warnings { get; set; } // this is just a helper function to make displaying the results easier public override string ToString() { return JsonSerializer.Serialize(this, GetType()); } } } }