CompleteResult.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Xml.Serialization;
  4. using System.Text;
  5. namespace COSXML.Model.Tag
  6. {
  7. /// <summary>
  8. /// 分片上传完成结果
  9. /// <see href="https://cloud.tencent.com/document/product/436/7742"/>
  10. /// </summary>
  11. [XmlRoot("CompleteMultipartUploadResult")]
  12. public sealed class CompleteResult
  13. {
  14. /// <summary>
  15. /// 创建的Object的外网访问域名
  16. /// </summary>
  17. [XmlElement("Location")]
  18. public string location;
  19. /// <summary>
  20. /// 分块上传的目标Bucket
  21. /// </summary>
  22. [XmlElement("Bucket")]
  23. public string bucket;
  24. /// <summary>
  25. /// Object的名称
  26. /// </summary>
  27. [XmlElement("Key")]
  28. public string key;
  29. /// <summary>
  30. /// 合并后对象的唯一标签值,该值不是对象内容的 MD5 校验值,仅能用于检查对象唯一性
  31. /// </summary>
  32. [XmlElement("ETag")]
  33. public string eTag;
  34. public string GetInfo()
  35. {
  36. StringBuilder stringBuilder = new StringBuilder("{CompleteMultipartUploadResult:\n");
  37. stringBuilder.Append("Location:").Append(location).Append("\n");
  38. stringBuilder.Append("Bucket:").Append(bucket).Append("\n");
  39. stringBuilder.Append("Key:").Append(key).Append("\n");
  40. stringBuilder.Append("ETag:").Append(eTag).Append("\n");
  41. stringBuilder.Append("}");
  42. return stringBuilder.ToString();
  43. }
  44. }
  45. }