|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | + |
| 4 | +using System.Text; |
| 5 | +using COSXML.Common; |
| 6 | +using COSXML.Model.Object; |
| 7 | +using COSXML.Model.Tag; |
| 8 | +using COSXML.CosException; |
| 9 | +using COSXML.Utils; |
| 10 | + |
| 11 | +namespace COSXML.Model.CI |
| 12 | +{ |
| 13 | + /// <summary> |
| 14 | + /// 提交文档转码任务 |
| 15 | + /// <see href="https://cloud.tencent.com/document/product/460/46942"/> |
| 16 | + /// </summary> |
| 17 | + public sealed class CreateDocProcessJobsRequest : CIRequest |
| 18 | + { |
| 19 | + public DocumentProcessJobInfo documentProcessJobInfo; |
| 20 | + public CreateDocProcessJobsRequest(string bucket) |
| 21 | + : base(bucket) |
| 22 | + { |
| 23 | + documentProcessJobInfo = new DocumentProcessJobInfo(); |
| 24 | + this.method = CosRequestMethod.POST; |
| 25 | + this.SetRequestPath("/doc_jobs"); |
| 26 | + this.SetRequestHeader("Content-Type", "application/xml"); |
| 27 | + documentProcessJobInfo.input = new DocumentProcessJobInfo.Input(); |
| 28 | + documentProcessJobInfo.operation = new DocumentProcessJobInfo.Operation(); |
| 29 | + documentProcessJobInfo.operation.output = new DocumentProcessJobInfo.Output(); |
| 30 | + documentProcessJobInfo.operation.docProcess = new DocumentProcessJobInfo.DocProcess(); |
| 31 | + } |
| 32 | + |
| 33 | + public void SetTag(string tag) |
| 34 | + { |
| 35 | + documentProcessJobInfo.tag = tag; |
| 36 | + } |
| 37 | + |
| 38 | + public void SetInputObject(string inputObject) |
| 39 | + { |
| 40 | + documentProcessJobInfo.input.inputObject = inputObject; |
| 41 | + } |
| 42 | + |
| 43 | + public void SetOutputRegion(string outputRegion) |
| 44 | + { |
| 45 | + documentProcessJobInfo.operation.output.region = outputRegion; |
| 46 | + } |
| 47 | + |
| 48 | + public void SetOutputBucket(string outputBucket) |
| 49 | + { |
| 50 | + documentProcessJobInfo.operation.output.bucket = outputBucket; |
| 51 | + } |
| 52 | + public void SetOutputObject(string outputObject) |
| 53 | + { |
| 54 | + documentProcessJobInfo.operation.output.outPutObject = outputObject; |
| 55 | + } |
| 56 | + public void SetSrcType(string srcType) |
| 57 | + { |
| 58 | + documentProcessJobInfo.operation.docProcess.srcType = srcType; |
| 59 | + } |
| 60 | + public void SetTgtType(string tgtType) |
| 61 | + { |
| 62 | + documentProcessJobInfo.operation.docProcess.tgtType = tgtType; |
| 63 | + } |
| 64 | + public void SetStartPage(string startPage) |
| 65 | + { |
| 66 | + documentProcessJobInfo.operation.docProcess.startPage = startPage; |
| 67 | + } |
| 68 | + public void SetEndPage(string endPage) |
| 69 | + { |
| 70 | + documentProcessJobInfo.operation.docProcess.endPage = endPage; |
| 71 | + } |
| 72 | + public void SetSheetId(string sheetId) |
| 73 | + { |
| 74 | + documentProcessJobInfo.operation.docProcess.sheetId = sheetId; |
| 75 | + } |
| 76 | + public void SetPaperDirection(string paperDirection) |
| 77 | + { |
| 78 | + documentProcessJobInfo.operation.docProcess.paperDirection = paperDirection; |
| 79 | + } |
| 80 | + public void SetPaperSize(string paperSize) |
| 81 | + { |
| 82 | + documentProcessJobInfo.operation.docProcess.paperSize = paperSize; |
| 83 | + } |
| 84 | + |
| 85 | + public void SetImageParams(string imageParams) |
| 86 | + { |
| 87 | + documentProcessJobInfo.operation.docProcess.imageParams = imageParams; |
| 88 | + } |
| 89 | + |
| 90 | + public void SetQuality(string quality) |
| 91 | + { |
| 92 | + documentProcessJobInfo.operation.docProcess.quality = quality; |
| 93 | + } |
| 94 | + |
| 95 | + public void SetZoom(string zoom) |
| 96 | + { |
| 97 | + documentProcessJobInfo.operation.docProcess.zoom = zoom; |
| 98 | + } |
| 99 | + |
| 100 | + public void SetImageDpi(string imageDpi) |
| 101 | + { |
| 102 | + documentProcessJobInfo.operation.docProcess.imageDpi = imageDpi; |
| 103 | + } |
| 104 | + |
| 105 | + public void SetPicPagination(string picPagination) |
| 106 | + { |
| 107 | + documentProcessJobInfo.operation.docProcess.picPagination = picPagination; |
| 108 | + } |
| 109 | + |
| 110 | + |
| 111 | + public override Network.RequestBody GetRequestBody() |
| 112 | + { |
| 113 | + return GetXmlRequestBody(documentProcessJobInfo); |
| 114 | + } |
| 115 | + |
| 116 | + } |
| 117 | +} |
0 commit comments