MetricsModel.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Text;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Runtime.Serialization;
  6. using Newtonsoft.Json;
  7. namespace IO.Swagger.Model {
  8. /// <summary>
  9. ///
  10. /// </summary>
  11. [DataContract]
  12. public class MetricsModel {
  13. /// <summary>
  14. /// Gets or Sets Labels
  15. /// </summary>
  16. [DataMember(Name="labels", EmitDefaultValue=false)]
  17. [JsonProperty(PropertyName = "labels")]
  18. public List<string> Labels { get; set; }
  19. /// <summary>
  20. /// Gets or Sets Datasets
  21. /// </summary>
  22. [DataMember(Name="datasets", EmitDefaultValue=false)]
  23. [JsonProperty(PropertyName = "datasets")]
  24. public List<decimal?> Datasets { get; set; }
  25. /// <summary>
  26. /// Gets or Sets Timestamps
  27. /// </summary>
  28. [DataMember(Name="timestamps", EmitDefaultValue=false)]
  29. [JsonProperty(PropertyName = "timestamps")]
  30. public List<DateTime?> Timestamps { get; set; }
  31. /// <summary>
  32. /// Get the string presentation of the object
  33. /// </summary>
  34. /// <returns>String presentation of the object</returns>
  35. public override string ToString() {
  36. StringBuilder sb = new StringBuilder();
  37. sb.Append("class MetricsModel {\n");
  38. sb.Append(" Labels: ").Append(Labels).Append("\n");
  39. sb.Append(" Datasets: ").Append(Datasets).Append("\n");
  40. sb.Append(" Timestamps: ").Append(Timestamps).Append("\n");
  41. sb.Append("}\n");
  42. return sb.ToString();
  43. }
  44. /// <summary>
  45. /// Get the JSON string presentation of the object
  46. /// </summary>
  47. /// <returns>JSON string presentation of the object</returns>
  48. public string ToJson() {
  49. return JsonConvert.SerializeObject(this, Formatting.Indented);
  50. }
  51. }
  52. }