list_job.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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 string `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. Action string `position:"Query" name:"Action"`
  67. MaximumPageSize string `position:"Query" name:"MaximumPageSize"`
  68. State string `position:"Query" name:"State"`
  69. OwnerId string `position:"Query" name:"OwnerId"`
  70. AccessKeyId string `position:"Query" name:"AccessKeyId"`
  71. EndOfJobCreatedTimeRange string `position:"Query" name:"EndOfJobCreatedTimeRange"`
  72. PipelineId string `position:"Query" name:"PipelineId"`
  73. }
  74. type ListJobResponse struct {
  75. *responses.BaseResponse
  76. RequestId string `json:"RequestId"`
  77. NextPageToken string `json:"NextPageToken"`
  78. JobList []struct {
  79. JobId string `json:"JobId"`
  80. State string `json:"State"`
  81. Code string `json:"Code"`
  82. Message string `json:"Message"`
  83. Percent int64 `json:"Percent"`
  84. PipelineId string `json:"PipelineId"`
  85. CreationTime string `json:"CreationTime"`
  86. FinishTime string `json:"FinishTime"`
  87. Input struct {
  88. Bucket string `json:"Bucket"`
  89. Location string `json:"Location"`
  90. Object string `json:"Object"`
  91. } `json:"Input"`
  92. Output struct {
  93. TemplateId string `json:"TemplateId"`
  94. UserData string `json:"UserData"`
  95. Rotate string `json:"Rotate"`
  96. VideoStreamMap string `json:"VideoStreamMap"`
  97. AudioStreamMap string `json:"AudioStreamMap"`
  98. DeWatermark string `json:"DeWatermark"`
  99. Priority string `json:"Priority"`
  100. WaterMarkConfigUrl string `json:"WaterMarkConfigUrl"`
  101. MergeConfigUrl string `json:"MergeConfigUrl"`
  102. OutputFile struct {
  103. Bucket string `json:"Bucket"`
  104. Location string `json:"Location"`
  105. Object string `json:"Object"`
  106. RoleArn string `json:"RoleArn"`
  107. } `json:"OutputFile"`
  108. M3U8NonStandardSupport struct {
  109. TS struct {
  110. Md5Support bool `json:"Md5Support"`
  111. SizeSupport bool `json:"SizeSupport"`
  112. } `json:"TS"`
  113. } `json:"M3U8NonStandardSupport"`
  114. Properties struct {
  115. Width string `json:"Width"`
  116. Height string `json:"Height"`
  117. Bitrate string `json:"Bitrate"`
  118. Duration string `json:"Duration"`
  119. Fps string `json:"Fps"`
  120. FileSize string `json:"FileSize"`
  121. FileFormat string `json:"FileFormat"`
  122. Streams struct {
  123. VideoStreamList []struct {
  124. Index string `json:"Index"`
  125. CodecName string `json:"CodecName"`
  126. CodecLongName string `json:"CodecLongName"`
  127. Profile string `json:"Profile"`
  128. CodecTimeBase string `json:"CodecTimeBase"`
  129. CodecTagString string `json:"CodecTagString"`
  130. CodecTag string `json:"CodecTag"`
  131. Width string `json:"Width"`
  132. Height string `json:"Height"`
  133. HasBFrames string `json:"HasBFrames"`
  134. Sar string `json:"Sar"`
  135. Dar string `json:"Dar"`
  136. PixFmt string `json:"PixFmt"`
  137. Level string `json:"Level"`
  138. Fps string `json:"Fps"`
  139. AvgFPS string `json:"AvgFPS"`
  140. Timebase string `json:"Timebase"`
  141. StartTime string `json:"StartTime"`
  142. Duration string `json:"Duration"`
  143. Bitrate string `json:"Bitrate"`
  144. NumFrames string `json:"NumFrames"`
  145. Lang string `json:"Lang"`
  146. NetworkCost struct {
  147. PreloadTime string `json:"PreloadTime"`
  148. CostBandwidth string `json:"CostBandwidth"`
  149. AvgBitrate string `json:"AvgBitrate"`
  150. } `json:"NetworkCost"`
  151. } `json:"VideoStreamList"`
  152. AudioStreamList []struct {
  153. Index string `json:"Index"`
  154. CodecName string `json:"CodecName"`
  155. CodecTimeBase string `json:"CodecTimeBase"`
  156. CodecLongName string `json:"CodecLongName"`
  157. CodecTagString string `json:"CodecTagString"`
  158. CodecTag string `json:"CodecTag"`
  159. SampleFmt string `json:"SampleFmt"`
  160. Samplerate string `json:"Samplerate"`
  161. Channels string `json:"Channels"`
  162. ChannelLayout string `json:"ChannelLayout"`
  163. Timebase string `json:"Timebase"`
  164. StartTime string `json:"StartTime"`
  165. Duration string `json:"Duration"`
  166. Bitrate string `json:"Bitrate"`
  167. NumFrames string `json:"NumFrames"`
  168. Lang string `json:"Lang"`
  169. } `json:"AudioStreamList"`
  170. SubtitleStreamList []struct {
  171. Index string `json:"Index"`
  172. Lang string `json:"Lang"`
  173. } `json:"SubtitleStreamList"`
  174. } `json:"Streams"`
  175. Format struct {
  176. NumStreams string `json:"NumStreams"`
  177. NumPrograms string `json:"NumPrograms"`
  178. FormatName string `json:"FormatName"`
  179. FormatLongName string `json:"FormatLongName"`
  180. StartTime string `json:"StartTime"`
  181. Duration string `json:"Duration"`
  182. Size string `json:"Size"`
  183. Bitrate string `json:"Bitrate"`
  184. } `json:"Format"`
  185. } `json:"Properties"`
  186. Clip struct {
  187. TimeSpan struct {
  188. Seek string `json:"Seek"`
  189. Duration string `json:"Duration"`
  190. } `json:"TimeSpan"`
  191. } `json:"Clip"`
  192. SuperReso struct {
  193. IsHalfSample string `json:"IsHalfSample"`
  194. } `json:"SuperReso"`
  195. SubtitleConfig struct {
  196. SubtitleList []struct {
  197. Map string `json:"Map"`
  198. } `json:"SubtitleList"`
  199. ExtSubtitleList []struct {
  200. FontName string `json:"FontName"`
  201. CharEnc string `json:"CharEnc"`
  202. Input3 struct {
  203. Bucket string `json:"Bucket"`
  204. Location string `json:"Location"`
  205. Object string `json:"Object"`
  206. } `json:"Input"`
  207. } `json:"ExtSubtitleList"`
  208. } `json:"SubtitleConfig"`
  209. TransConfig struct {
  210. TransMode string `json:"TransMode"`
  211. IsCheckReso string `json:"IsCheckReso"`
  212. IsCheckResoFail string `json:"IsCheckResoFail"`
  213. IsCheckVideoBitrate string `json:"IsCheckVideoBitrate"`
  214. IsCheckAudioBitrate string `json:"IsCheckAudioBitrate"`
  215. AdjDarMethod string `json:"AdjDarMethod"`
  216. IsCheckVideoBitrateFail string `json:"IsCheckVideoBitrateFail"`
  217. IsCheckAudioBitrateFail string `json:"IsCheckAudioBitrateFail"`
  218. } `json:"TransConfig"`
  219. MuxConfig struct {
  220. Segment struct {
  221. Duration string `json:"Duration"`
  222. } `json:"Segment"`
  223. Gif struct {
  224. Loop string `json:"Loop"`
  225. FinalDelay string `json:"FinalDelay"`
  226. IsCustomPalette string `json:"IsCustomPalette"`
  227. DitherMode string `json:"DitherMode"`
  228. } `json:"Gif"`
  229. } `json:"MuxConfig"`
  230. Audio struct {
  231. Codec string `json:"Codec"`
  232. Profile string `json:"Profile"`
  233. Samplerate string `json:"Samplerate"`
  234. Bitrate string `json:"Bitrate"`
  235. Channels string `json:"Channels"`
  236. Qscale string `json:"Qscale"`
  237. Volume struct {
  238. Level string `json:"Level"`
  239. Method string `json:"Method"`
  240. } `json:"Volume"`
  241. } `json:"Audio"`
  242. Video struct {
  243. Codec string `json:"Codec"`
  244. Profile string `json:"Profile"`
  245. Bitrate string `json:"Bitrate"`
  246. Crf string `json:"Crf"`
  247. Width string `json:"Width"`
  248. Height string `json:"Height"`
  249. Fps string `json:"Fps"`
  250. Gop string `json:"Gop"`
  251. Preset string `json:"Preset"`
  252. ScanMode string `json:"ScanMode"`
  253. Bufsize string `json:"Bufsize"`
  254. Maxrate string `json:"Maxrate"`
  255. PixFmt string `json:"PixFmt"`
  256. Degrain string `json:"Degrain"`
  257. Qscale string `json:"Qscale"`
  258. Crop string `json:"Crop"`
  259. Pad string `json:"Pad"`
  260. MaxFps string `json:"MaxFps"`
  261. BitrateBnd struct {
  262. Max string `json:"Max"`
  263. Min string `json:"Min"`
  264. } `json:"BitrateBnd"`
  265. } `json:"Video"`
  266. Container struct {
  267. Format string `json:"Format"`
  268. } `json:"Container"`
  269. Encryption struct {
  270. Type string `json:"Type"`
  271. Id string `json:"Id"`
  272. Key string `json:"Key"`
  273. KeyUri string `json:"KeyUri"`
  274. KeyType string `json:"KeyType"`
  275. SkipCnt string `json:"SkipCnt"`
  276. } `json:"Encryption"`
  277. WaterMarkList []struct {
  278. WaterMarkTemplateId string `json:"WaterMarkTemplateId"`
  279. Width string `json:"Width"`
  280. Height string `json:"Height"`
  281. Dx string `json:"Dx"`
  282. Dy string `json:"Dy"`
  283. ReferPos string `json:"ReferPos"`
  284. Type string `json:"Type"`
  285. InputFile struct {
  286. Bucket string `json:"Bucket"`
  287. Location string `json:"Location"`
  288. Object string `json:"Object"`
  289. } `json:"InputFile"`
  290. } `json:"WaterMarkList"`
  291. MergeList []struct {
  292. MergeURL string `json:"MergeURL"`
  293. Start string `json:"Start"`
  294. Duration string `json:"Duration"`
  295. RoleArn string `json:"RoleArn"`
  296. } `json:"MergeList"`
  297. OpeningList []struct {
  298. OpenUrl string `json:"openUrl"`
  299. Start string `json:"Start"`
  300. Width string `json:"Width"`
  301. Height string `json:"Height"`
  302. } `json:"OpeningList"`
  303. TailSlateList []struct {
  304. TailUrl string `json:"TailUrl"`
  305. Start string `json:"Start"`
  306. BlendDuration string `json:"BlendDuration"`
  307. Width string `json:"Width"`
  308. Height string `json:"Height"`
  309. IsMergeAudio bool `json:"IsMergeAudio"`
  310. BgColor string `json:"BgColor"`
  311. } `json:"TailSlateList"`
  312. } `json:"Output"`
  313. MNSMessageResult struct {
  314. MessageId string `json:"MessageId"`
  315. ErrorMessage string `json:"ErrorMessage"`
  316. ErrorCode string `json:"ErrorCode"`
  317. } `json:"MNSMessageResult"`
  318. } `json:"JobList"`
  319. }
  320. func CreateListJobRequest() (request *ListJobRequest) {
  321. request = &ListJobRequest{
  322. RpcRequest: &requests.RpcRequest{},
  323. }
  324. request.InitWithApiInfo("Mts", "2014-06-18", "ListJob", "", "")
  325. return
  326. }
  327. func CreateListJobResponse() (response *ListJobResponse) {
  328. response = &ListJobResponse{
  329. BaseResponse: &responses.BaseResponse{},
  330. }
  331. return
  332. }