CopyObject.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Xml.Serialization;
  3. using System.Text;
  4. namespace COSXML.Model.Tag
  5. {
  6. /// <summary>
  7. /// 复制结果返回信息
  8. /// <see href="https://cloud.tencent.com/document/product/436/10881"/>
  9. /// </summary>
  10. [XmlRoot("CopyObjectResult")]
  11. public sealed class CopyObject
  12. {
  13. /// <summary>
  14. /// 返回文件的 MD5 算法校验值。ETag 的值可以用于检查 Object 的内容是否发生变化
  15. /// </summary>
  16. [XmlElement("ETag")]
  17. public string eTag;
  18. /// <summary>
  19. /// 返回文件最后修改时间,GMT 格式
  20. /// </summary>
  21. [XmlElement("LastModified")]
  22. public string lastModified;
  23. /// <summary>
  24. /// key 的 versionId
  25. /// </summary>
  26. [XmlElement("VersionId")]
  27. public string versionId;
  28. /// <summary>
  29. /// key 的 versionId
  30. /// </summary>
  31. [XmlElement("CRC64")]
  32. public string crc64;
  33. public string GetInfo()
  34. {
  35. StringBuilder stringBuilder = new StringBuilder("{CopyObject:\n");
  36. stringBuilder.Append("ETag:").Append(eTag).Append("\n");
  37. stringBuilder.Append("LastModified:").Append(lastModified).Append("\n");
  38. stringBuilder.Append("VersionId:").Append(versionId).Append("\n");
  39. stringBuilder.Append("}");
  40. return stringBuilder.ToString();
  41. }
  42. }
  43. }