BucketLoggingStatus.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Xml.Serialization;
  3. using System.Text;
  4. namespace COSXML.Model.Tag
  5. {
  6. [XmlRoot("BucketLoggingStatus")]
  7. public sealed class BucketLoggingStatus
  8. {
  9. [XmlElement("LoggingEnabled")]
  10. public LoggingEnabled loggingEnabled;
  11. public string GetInfo()
  12. {
  13. StringBuilder stringBuilder = new StringBuilder("{BucketLoggingStatus:\n");
  14. if (loggingEnabled != null)
  15. {
  16. stringBuilder.Append(loggingEnabled.ToString()).Append("\n");
  17. }
  18. stringBuilder.Append("}");
  19. return stringBuilder.ToString();
  20. }
  21. public sealed class LoggingEnabled
  22. {
  23. [XmlElement("TargetBucket")]
  24. public string targetBucket;
  25. [XmlElement("TargetPrefix")]
  26. public string targetPrefix;
  27. public string GetInfo()
  28. {
  29. StringBuilder stringBuilder = new StringBuilder("{LoggingEnabled:\n");
  30. stringBuilder.Append("TargetBucket:").Append(targetBucket).Append("\n");
  31. stringBuilder.Append("TargetPrefix:").Append(targetPrefix).Append("\n");
  32. stringBuilder.Append("}");
  33. return stringBuilder.ToString();
  34. }
  35. }
  36. }
  37. }