MetricsResponse.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 MetricsResponse {
  13. /// <summary>
  14. /// Gets or Sets Total
  15. /// </summary>
  16. [DataMember(Name="total", EmitDefaultValue=false)]
  17. [JsonProperty(PropertyName = "total")]
  18. public TotalMetricsModel Total { get; set; }
  19. /// <summary>
  20. /// Gets or Sets Cpu
  21. /// </summary>
  22. [DataMember(Name="cpu", EmitDefaultValue=false)]
  23. [JsonProperty(PropertyName = "cpu")]
  24. public MetricsModel Cpu { get; set; }
  25. /// <summary>
  26. /// Gets or Sets Mem
  27. /// </summary>
  28. [DataMember(Name="mem", EmitDefaultValue=false)]
  29. [JsonProperty(PropertyName = "mem")]
  30. public MetricsModel Mem { get; set; }
  31. /// <summary>
  32. /// Gets or Sets Network
  33. /// </summary>
  34. [DataMember(Name="network", EmitDefaultValue=false)]
  35. [JsonProperty(PropertyName = "network")]
  36. public NetworkMetricsModel Network { get; set; }
  37. /// <summary>
  38. /// Get the string presentation of the object
  39. /// </summary>
  40. /// <returns>String presentation of the object</returns>
  41. public override string ToString() {
  42. StringBuilder sb = new StringBuilder();
  43. sb.Append("class MetricsResponse {\n");
  44. sb.Append(" Total: ").Append(Total).Append("\n");
  45. sb.Append(" Cpu: ").Append(Cpu).Append("\n");
  46. sb.Append(" Mem: ").Append(Mem).Append("\n");
  47. sb.Append(" Network: ").Append(Network).Append("\n");
  48. sb.Append("}\n");
  49. return sb.ToString();
  50. }
  51. /// <summary>
  52. /// Get the JSON string presentation of the object
  53. /// </summary>
  54. /// <returns>JSON string presentation of the object</returns>
  55. public string ToJson() {
  56. return JsonConvert.SerializeObject(this, Formatting.Indented);
  57. }
  58. }
  59. }