list_job.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. package mts
  2. //Licensed under the Apache License, Version 2.0 (the "License");
  3. //you may not use this file except in compliance with the License.
  4. //You may obtain a copy of the License at
  5. //
  6. //http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. //Unless required by applicable law or agreed to in writing, software
  9. //distributed under the License is distributed on an "AS IS" BASIS,
  10. //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. //See the License for the specific language governing permissions and
  12. //limitations under the License.
  13. //
  14. // Code generated by Alibaba Cloud SDK Code Generator.
  15. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
  16. import (
  17. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
  18. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
  19. )
  20. func (client *Client) ListJob(request *ListJobRequest) (response *ListJobResponse, err error) {
  21. response = CreateListJobResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) ListJobWithChan(request *ListJobRequest) (<-chan *ListJobResponse, <-chan error) {
  26. responseChan := make(chan *ListJobResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.ListJob(request)
  32. responseChan <- response
  33. errChan <- err
  34. })
  35. if err != nil {
  36. errChan <- err
  37. close(responseChan)
  38. close(errChan)
  39. }
  40. return responseChan, errChan
  41. }
  42. func (client *Client) ListJobWithCallback(request *ListJobRequest, callback func(response *ListJobResponse, err error)) <-chan int {
  43. result := make(chan int, 1)
  44. err := client.AddAsyncTask(func() {
  45. var response *ListJobResponse
  46. var err error
  47. defer close(result)
  48. response, err = client.ListJob(request)
  49. callback(response, err)
  50. result <- 1
  51. })
  52. if err != nil {
  53. defer close(result)
  54. callback(nil, err)
  55. result <- 0
  56. }
  57. return result
  58. }
  59. type ListJobRequest struct {
  60. *requests.RpcRequest
  61. ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
  62. ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
  63. NextPageToken string `position:"Query" name:"NextPageToken"`
  64. StartOfJobCreatedTimeRange string `position:"Query" name:"StartOfJobCreatedTimeRange"`
  65. OwnerAccount string `position:"Query" name:"OwnerAccount"`
  66. MaximumPageSize requests.Integer `position:"Query" name:"MaximumPageSize"`
  67. State string `position:"Query" name:"State"`
  68. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  69. EndOfJobCreatedTimeRange string `position:"Query" name:"EndOfJobCreatedTimeRange"`
  70. PipelineId string `position:"Query" name:"PipelineId"`
  71. }
  72. type ListJobResponse struct {
  73. *responses.BaseResponse
  74. RequestId string `json:"RequestId" xml:"RequestId"`
  75. NextPageToken string `json:"NextPageToken" xml:"NextPageToken"`
  76. JobList struct {
  77. Job []struct {
  78. JobId string `json:"JobId" xml:"JobId"`
  79. State string `json:"State" xml:"State"`
  80. Code string `json:"Code" xml:"Code"`
  81. Message string `json:"Message" xml:"Message"`
  82. Percent int `json:"Percent" xml:"Percent"`
  83. PipelineId string `json:"PipelineId" xml:"PipelineId"`
  84. CreationTime string `json:"CreationTime" xml:"CreationTime"`
  85. FinishTime string `json:"FinishTime" xml:"FinishTime"`
  86. Input struct {
  87. Bucket string `json:"Bucket" xml:"Bucket"`
  88. Location string `json:"Location" xml:"Location"`
  89. Object string `json:"Object" xml:"Object"`
  90. } `json:"Input" xml:"Input"`
  91. Output struct {
  92. TemplateId string `json:"TemplateId" xml:"TemplateId"`
  93. UserData string `json:"UserData" xml:"UserData"`
  94. Rotate string `json:"Rotate" xml:"Rotate"`
  95. VideoStreamMap string `json:"VideoStreamMap" xml:"VideoStreamMap"`
  96. AudioStreamMap string `json:"AudioStreamMap" xml:"AudioStreamMap"`
  97. DeWatermark string `json:"DeWatermark" xml:"DeWatermark"`
  98. Priority string `json:"Priority" xml:"Priority"`
  99. WaterMarkConfigUrl string `json:"WaterMarkConfigUrl" xml:"WaterMarkConfigUrl"`
  100. MergeConfigUrl string `json:"MergeConfigUrl" xml:"MergeConfigUrl"`
  101. OutputFile struct {
  102. Bucket string `json:"Bucket" xml:"Bucket"`
  103. Location string `json:"Location" xml:"Location"`
  104. Object string `json:"Object" xml:"Object"`
  105. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  106. } `json:"OutputFile" xml:"OutputFile"`
  107. M3U8NonStandardSupport struct {
  108. TS struct {
  109. Md5Support bool `json:"Md5Support" xml:"Md5Support"`
  110. SizeSupport bool `json:"SizeSupport" xml:"SizeSupport"`
  111. } `json:"TS" xml:"TS"`
  112. } `json:"M3U8NonStandardSupport" xml:"M3U8NonStandardSupport"`
  113. Properties struct {
  114. Width string `json:"Width" xml:"Width"`
  115. Height string `json:"Height" xml:"Height"`
  116. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  117. Duration string `json:"Duration" xml:"Duration"`
  118. Fps string `json:"Fps" xml:"Fps"`
  119. FileSize string `json:"FileSize" xml:"FileSize"`
  120. FileFormat string `json:"FileFormat" xml:"FileFormat"`
  121. Streams struct {
  122. VideoStreamList struct {
  123. VideoStream []struct {
  124. Index string `json:"Index" xml:"Index"`
  125. CodecName string `json:"CodecName" xml:"CodecName"`
  126. CodecLongName string `json:"CodecLongName" xml:"CodecLongName"`
  127. Profile string `json:"Profile" xml:"Profile"`
  128. CodecTimeBase string `json:"CodecTimeBase" xml:"CodecTimeBase"`
  129. CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
  130. CodecTag string `json:"CodecTag" xml:"CodecTag"`
  131. Width string `json:"Width" xml:"Width"`
  132. Height string `json:"Height" xml:"Height"`
  133. HasBFrames string `json:"HasBFrames" xml:"HasBFrames"`
  134. Sar string `json:"Sar" xml:"Sar"`
  135. Dar string `json:"Dar" xml:"Dar"`
  136. PixFmt string `json:"PixFmt" xml:"PixFmt"`
  137. Level string `json:"Level" xml:"Level"`
  138. Fps string `json:"Fps" xml:"Fps"`
  139. AvgFPS string `json:"AvgFPS" xml:"AvgFPS"`
  140. Timebase string `json:"Timebase" xml:"Timebase"`
  141. StartTime string `json:"StartTime" xml:"StartTime"`
  142. Duration string `json:"Duration" xml:"Duration"`
  143. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  144. NumFrames string `json:"NumFrames" xml:"NumFrames"`
  145. Lang string `json:"Lang" xml:"Lang"`
  146. NetworkCost struct {
  147. PreloadTime string `json:"PreloadTime" xml:"PreloadTime"`
  148. CostBandwidth string `json:"CostBandwidth" xml:"CostBandwidth"`
  149. AvgBitrate string `json:"AvgBitrate" xml:"AvgBitrate"`
  150. } `json:"NetworkCost" xml:"NetworkCost"`
  151. } `json:"VideoStream" xml:"VideoStream"`
  152. } `json:"VideoStreamList" xml:"VideoStreamList"`
  153. AudioStreamList struct {
  154. AudioStream []struct {
  155. Index string `json:"Index" xml:"Index"`
  156. CodecName string `json:"CodecName" xml:"CodecName"`
  157. CodecTimeBase string `json:"CodecTimeBase" xml:"CodecTimeBase"`
  158. CodecLongName string `json:"CodecLongName" xml:"CodecLongName"`
  159. CodecTagString string `json:"CodecTagString" xml:"CodecTagString"`
  160. CodecTag string `json:"CodecTag" xml:"CodecTag"`
  161. SampleFmt string `json:"SampleFmt" xml:"SampleFmt"`
  162. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  163. Channels string `json:"Channels" xml:"Channels"`
  164. ChannelLayout string `json:"ChannelLayout" xml:"ChannelLayout"`
  165. Timebase string `json:"Timebase" xml:"Timebase"`
  166. StartTime string `json:"StartTime" xml:"StartTime"`
  167. Duration string `json:"Duration" xml:"Duration"`
  168. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  169. NumFrames string `json:"NumFrames" xml:"NumFrames"`
  170. Lang string `json:"Lang" xml:"Lang"`
  171. } `json:"AudioStream" xml:"AudioStream"`
  172. } `json:"AudioStreamList" xml:"AudioStreamList"`
  173. SubtitleStreamList struct {
  174. SubtitleStream []struct {
  175. Index string `json:"Index" xml:"Index"`
  176. Lang string `json:"Lang" xml:"Lang"`
  177. } `json:"SubtitleStream" xml:"SubtitleStream"`
  178. } `json:"SubtitleStreamList" xml:"SubtitleStreamList"`
  179. } `json:"Streams" xml:"Streams"`
  180. Format struct {
  181. NumStreams string `json:"NumStreams" xml:"NumStreams"`
  182. NumPrograms string `json:"NumPrograms" xml:"NumPrograms"`
  183. FormatName string `json:"FormatName" xml:"FormatName"`
  184. FormatLongName string `json:"FormatLongName" xml:"FormatLongName"`
  185. StartTime string `json:"StartTime" xml:"StartTime"`
  186. Duration string `json:"Duration" xml:"Duration"`
  187. Size string `json:"Size" xml:"Size"`
  188. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  189. } `json:"Format" xml:"Format"`
  190. } `json:"Properties" xml:"Properties"`
  191. Clip struct {
  192. TimeSpan struct {
  193. Seek string `json:"Seek" xml:"Seek"`
  194. Duration string `json:"Duration" xml:"Duration"`
  195. } `json:"TimeSpan" xml:"TimeSpan"`
  196. } `json:"Clip" xml:"Clip"`
  197. SuperReso struct {
  198. IsHalfSample string `json:"IsHalfSample" xml:"IsHalfSample"`
  199. } `json:"SuperReso" xml:"SuperReso"`
  200. SubtitleConfig struct {
  201. SubtitleList struct {
  202. Subtitle []struct {
  203. Map string `json:"Map" xml:"Map"`
  204. } `json:"Subtitle" xml:"Subtitle"`
  205. } `json:"SubtitleList" xml:"SubtitleList"`
  206. ExtSubtitleList struct {
  207. ExtSubtitle []struct {
  208. FontName string `json:"FontName" xml:"FontName"`
  209. CharEnc string `json:"CharEnc" xml:"CharEnc"`
  210. Input3 struct {
  211. Bucket string `json:"Bucket" xml:"Bucket"`
  212. Location string `json:"Location" xml:"Location"`
  213. Object string `json:"Object" xml:"Object"`
  214. } `json:"Input" xml:"Input"`
  215. } `json:"ExtSubtitle" xml:"ExtSubtitle"`
  216. } `json:"ExtSubtitleList" xml:"ExtSubtitleList"`
  217. } `json:"SubtitleConfig" xml:"SubtitleConfig"`
  218. TransConfig struct {
  219. TransMode string `json:"TransMode" xml:"TransMode"`
  220. IsCheckReso string `json:"IsCheckReso" xml:"IsCheckReso"`
  221. IsCheckResoFail string `json:"IsCheckResoFail" xml:"IsCheckResoFail"`
  222. IsCheckVideoBitrate string `json:"IsCheckVideoBitrate" xml:"IsCheckVideoBitrate"`
  223. IsCheckAudioBitrate string `json:"IsCheckAudioBitrate" xml:"IsCheckAudioBitrate"`
  224. AdjDarMethod string `json:"AdjDarMethod" xml:"AdjDarMethod"`
  225. IsCheckVideoBitrateFail string `json:"IsCheckVideoBitrateFail" xml:"IsCheckVideoBitrateFail"`
  226. IsCheckAudioBitrateFail string `json:"IsCheckAudioBitrateFail" xml:"IsCheckAudioBitrateFail"`
  227. } `json:"TransConfig" xml:"TransConfig"`
  228. MuxConfig struct {
  229. Segment struct {
  230. Duration string `json:"Duration" xml:"Duration"`
  231. } `json:"Segment" xml:"Segment"`
  232. Gif struct {
  233. Loop string `json:"Loop" xml:"Loop"`
  234. FinalDelay string `json:"FinalDelay" xml:"FinalDelay"`
  235. IsCustomPalette string `json:"IsCustomPalette" xml:"IsCustomPalette"`
  236. DitherMode string `json:"DitherMode" xml:"DitherMode"`
  237. } `json:"Gif" xml:"Gif"`
  238. } `json:"MuxConfig" xml:"MuxConfig"`
  239. Audio struct {
  240. Codec string `json:"Codec" xml:"Codec"`
  241. Profile string `json:"Profile" xml:"Profile"`
  242. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  243. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  244. Channels string `json:"Channels" xml:"Channels"`
  245. Qscale string `json:"Qscale" xml:"Qscale"`
  246. Volume struct {
  247. Level string `json:"Level" xml:"Level"`
  248. Method string `json:"Method" xml:"Method"`
  249. } `json:"Volume" xml:"Volume"`
  250. } `json:"Audio" xml:"Audio"`
  251. Video struct {
  252. Codec string `json:"Codec" xml:"Codec"`
  253. Profile string `json:"Profile" xml:"Profile"`
  254. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  255. Crf string `json:"Crf" xml:"Crf"`
  256. Width string `json:"Width" xml:"Width"`
  257. Height string `json:"Height" xml:"Height"`
  258. Fps string `json:"Fps" xml:"Fps"`
  259. Gop string `json:"Gop" xml:"Gop"`
  260. Preset string `json:"Preset" xml:"Preset"`
  261. ScanMode string `json:"ScanMode" xml:"ScanMode"`
  262. Bufsize string `json:"Bufsize" xml:"Bufsize"`
  263. Maxrate string `json:"Maxrate" xml:"Maxrate"`
  264. PixFmt string `json:"PixFmt" xml:"PixFmt"`
  265. Degrain string `json:"Degrain" xml:"Degrain"`
  266. Qscale string `json:"Qscale" xml:"Qscale"`
  267. Crop string `json:"Crop" xml:"Crop"`
  268. Pad string `json:"Pad" xml:"Pad"`
  269. MaxFps string `json:"MaxFps" xml:"MaxFps"`
  270. BitrateBnd struct {
  271. Max string `json:"Max" xml:"Max"`
  272. Min string `json:"Min" xml:"Min"`
  273. } `json:"BitrateBnd" xml:"BitrateBnd"`
  274. } `json:"Video" xml:"Video"`
  275. Container struct {
  276. Format string `json:"Format" xml:"Format"`
  277. } `json:"Container" xml:"Container"`
  278. Encryption struct {
  279. Type string `json:"Type" xml:"Type"`
  280. Id string `json:"Id" xml:"Id"`
  281. Key string `json:"Key" xml:"Key"`
  282. KeyUri string `json:"KeyUri" xml:"KeyUri"`
  283. KeyType string `json:"KeyType" xml:"KeyType"`
  284. SkipCnt string `json:"SkipCnt" xml:"SkipCnt"`
  285. } `json:"Encryption" xml:"Encryption"`
  286. WaterMarkList struct {
  287. WaterMark []struct {
  288. WaterMarkTemplateId string `json:"WaterMarkTemplateId" xml:"WaterMarkTemplateId"`
  289. Width string `json:"Width" xml:"Width"`
  290. Height string `json:"Height" xml:"Height"`
  291. Dx string `json:"Dx" xml:"Dx"`
  292. Dy string `json:"Dy" xml:"Dy"`
  293. ReferPos string `json:"ReferPos" xml:"ReferPos"`
  294. Type string `json:"Type" xml:"Type"`
  295. InputFile struct {
  296. Bucket string `json:"Bucket" xml:"Bucket"`
  297. Location string `json:"Location" xml:"Location"`
  298. Object string `json:"Object" xml:"Object"`
  299. } `json:"InputFile" xml:"InputFile"`
  300. } `json:"WaterMark" xml:"WaterMark"`
  301. } `json:"WaterMarkList" xml:"WaterMarkList"`
  302. MergeList struct {
  303. Merge []struct {
  304. MergeURL string `json:"MergeURL" xml:"MergeURL"`
  305. Start string `json:"Start" xml:"Start"`
  306. Duration string `json:"Duration" xml:"Duration"`
  307. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  308. } `json:"Merge" xml:"Merge"`
  309. } `json:"MergeList" xml:"MergeList"`
  310. OpeningList struct {
  311. Merge []struct {
  312. OpenUrl string `json:"openUrl" xml:"openUrl"`
  313. Start string `json:"Start" xml:"Start"`
  314. Width string `json:"Width" xml:"Width"`
  315. Height string `json:"Height" xml:"Height"`
  316. } `json:"Merge" xml:"Merge"`
  317. } `json:"OpeningList" xml:"OpeningList"`
  318. TailSlateList struct {
  319. Merge []struct {
  320. TailUrl string `json:"TailUrl" xml:"TailUrl"`
  321. Start string `json:"Start" xml:"Start"`
  322. BlendDuration string `json:"BlendDuration" xml:"BlendDuration"`
  323. Width string `json:"Width" xml:"Width"`
  324. Height string `json:"Height" xml:"Height"`
  325. IsMergeAudio bool `json:"IsMergeAudio" xml:"IsMergeAudio"`
  326. BgColor string `json:"BgColor" xml:"BgColor"`
  327. } `json:"Merge" xml:"Merge"`
  328. } `json:"TailSlateList" xml:"TailSlateList"`
  329. } `json:"Output" xml:"Output"`
  330. MNSMessageResult struct {
  331. MessageId string `json:"MessageId" xml:"MessageId"`
  332. ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
  333. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  334. } `json:"MNSMessageResult" xml:"MNSMessageResult"`
  335. } `json:"Job" xml:"Job"`
  336. } `json:"JobList" xml:"JobList"`
  337. }
  338. func CreateListJobRequest() (request *ListJobRequest) {
  339. request = &ListJobRequest{
  340. RpcRequest: &requests.RpcRequest{},
  341. }
  342. request.InitWithApiInfo("Mts", "2014-06-18", "ListJob", "mts", "openAPI")
  343. return
  344. }
  345. func CreateListJobResponse() (response *ListJobResponse) {
  346. response = &ListJobResponse{
  347. BaseResponse: &responses.BaseResponse{},
  348. }
  349. return
  350. }