SensitiveContentRecognitionRequest.cs 930 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using COSXML.Common;
  5. using COSXML.Model.Object;
  6. using COSXML.CosException;
  7. using COSXML.Utils;
  8. namespace COSXML.Model.CI
  9. {
  10. /// <summary>
  11. /// 图片审核
  12. /// <see href="https://cloud.tencent.com/document/product/436/45434"/>
  13. /// </summary>
  14. public sealed class SensitiveContentRecognitionRequest : ObjectRequest
  15. {
  16. public SensitiveContentRecognitionRequest(string bucket, string key, string type)
  17. : base(bucket, key)
  18. {
  19. if (type == null)
  20. {
  21. throw new CosClientException((int)CosClientError.InvalidArgument, "type = null");
  22. }
  23. this.method = CosRequestMethod.GET;
  24. this.queryParameters.Add("ci-process", "sensitive-content-recognition");
  25. this.queryParameters.Add("detect-type", URLEncodeUtils.Encode(type));
  26. }
  27. }
  28. }