GetObjectTaggingRequest.cs 967 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using COSXML.Common;
  5. using COSXML.Utils;
  6. using COSXML.Model.Tag;
  7. namespace COSXML.Model.Object
  8. {
  9. /// <summary>
  10. /// 获取对象标签
  11. /// <see href="https://cloud.tencent.com/document/product/436/42998"/>
  12. /// </summary>
  13. public sealed class GetObjectTaggingRequest : ObjectRequest
  14. {
  15. public GetObjectTaggingRequest(string bucket, string key)
  16. : base(bucket, key)
  17. {
  18. this.method = CosRequestMethod.GET;
  19. this.queryParameters.Add("tagging", null);
  20. }
  21. /// <summary>
  22. /// 指定获取对象某个版本的对象标签
  23. /// </summary>
  24. /// <param name="versionId"></param>
  25. public void SetVersionId(string versionId)
  26. {
  27. if (versionId != null)
  28. {
  29. SetQueryParameter(CosRequestHeaderKey.VERSION_ID, versionId);
  30. }
  31. }
  32. }
  33. }