ListInventoryConfiguration.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Xml.Serialization;
  5. namespace COSXML.Model.Tag
  6. {
  7. [XmlRoot("ListInventoryConfigurationResult")]
  8. public sealed class ListInventoryConfiguration
  9. {
  10. [XmlElement("InventoryConfiguration")]
  11. public List<InventoryConfiguration> inventoryConfigurations;
  12. [XmlElement("IsTruncated")]
  13. public bool isTruncated = false;
  14. [XmlElement("ContinuationToken")]
  15. public string continuationToken;
  16. [XmlElement("NextContinuationToken")]
  17. public string nextContinuationToken;
  18. public String GetInfo()
  19. {
  20. StringBuilder stringBuilder = new StringBuilder("{ListInventoryConfigurationResult\n");
  21. stringBuilder.Append("IsTruncated:").Append(isTruncated).Append("\n");
  22. if (continuationToken != null)
  23. {
  24. stringBuilder.Append("ContinuationToken:").Append(continuationToken).Append("\n");
  25. }
  26. if (nextContinuationToken != null)
  27. {
  28. stringBuilder.Append("NextContinuationToken:").Append(nextContinuationToken).Append("\n");
  29. }
  30. if (inventoryConfigurations != null)
  31. {
  32. foreach (InventoryConfiguration inventoryConfiguration in inventoryConfigurations)
  33. {
  34. if (inventoryConfiguration != null)
  35. {
  36. stringBuilder.Append(inventoryConfiguration.GetInfo()).Append("\n");
  37. }
  38. }
  39. }
  40. stringBuilder.Append("}");
  41. return stringBuilder.ToString();
  42. }
  43. }
  44. }