query_job_list.go 16 KB

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