query_template_list.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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) QueryTemplateList(request *QueryTemplateListRequest) (response *QueryTemplateListResponse, err error) {
  21. response = CreateQueryTemplateListResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) QueryTemplateListWithChan(request *QueryTemplateListRequest) (<-chan *QueryTemplateListResponse, <-chan error) {
  26. responseChan := make(chan *QueryTemplateListResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.QueryTemplateList(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) QueryTemplateListWithCallback(request *QueryTemplateListRequest, callback func(response *QueryTemplateListResponse, err error)) <-chan int {
  43. result := make(chan int, 1)
  44. err := client.AddAsyncTask(func() {
  45. var response *QueryTemplateListResponse
  46. var err error
  47. defer close(result)
  48. response, err = client.QueryTemplateList(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 QueryTemplateListRequest struct {
  60. *requests.RpcRequest
  61. ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
  62. TemplateIds string `position:"Query" name:"TemplateIds"`
  63. ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
  64. OwnerAccount string `position:"Query" name:"OwnerAccount"`
  65. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  66. }
  67. type QueryTemplateListResponse struct {
  68. *responses.BaseResponse
  69. RequestId string `json:"RequestId" xml:"RequestId"`
  70. NonExistTids struct {
  71. String []string `json:"String" xml:"String"`
  72. } `json:"NonExistTids" xml:"NonExistTids"`
  73. TemplateList struct {
  74. Template []struct {
  75. Id string `json:"Id" xml:"Id"`
  76. Name string `json:"Name" xml:"Name"`
  77. State string `json:"State" xml:"State"`
  78. Container struct {
  79. Format string `json:"Format" xml:"Format"`
  80. } `json:"Container" xml:"Container"`
  81. Video struct {
  82. Codec string `json:"Codec" xml:"Codec"`
  83. Profile string `json:"Profile" xml:"Profile"`
  84. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  85. Crf string `json:"Crf" xml:"Crf"`
  86. Width string `json:"Width" xml:"Width"`
  87. Height string `json:"Height" xml:"Height"`
  88. Fps string `json:"Fps" xml:"Fps"`
  89. Gop string `json:"Gop" xml:"Gop"`
  90. Preset string `json:"Preset" xml:"Preset"`
  91. ScanMode string `json:"ScanMode" xml:"ScanMode"`
  92. Bufsize string `json:"Bufsize" xml:"Bufsize"`
  93. Maxrate string `json:"Maxrate" xml:"Maxrate"`
  94. PixFmt string `json:"PixFmt" xml:"PixFmt"`
  95. Degrain string `json:"Degrain" xml:"Degrain"`
  96. Qscale string `json:"Qscale" xml:"Qscale"`
  97. Remove string `json:"Remove" xml:"Remove"`
  98. Crop string `json:"Crop" xml:"Crop"`
  99. Pad string `json:"Pad" xml:"Pad"`
  100. MaxFps string `json:"MaxFps" xml:"MaxFps"`
  101. BitrateBnd struct {
  102. Max string `json:"Max" xml:"Max"`
  103. Min string `json:"Min" xml:"Min"`
  104. } `json:"BitrateBnd" xml:"BitrateBnd"`
  105. } `json:"Video" xml:"Video"`
  106. Audio struct {
  107. Codec string `json:"Codec" xml:"Codec"`
  108. Profile string `json:"Profile" xml:"Profile"`
  109. Samplerate string `json:"Samplerate" xml:"Samplerate"`
  110. Bitrate string `json:"Bitrate" xml:"Bitrate"`
  111. Channels string `json:"Channels" xml:"Channels"`
  112. Qscale string `json:"Qscale" xml:"Qscale"`
  113. Remove string `json:"Remove" xml:"Remove"`
  114. } `json:"Audio" xml:"Audio"`
  115. TransConfig struct {
  116. TransMode string `json:"TransMode" xml:"TransMode"`
  117. IsCheckReso string `json:"IsCheckReso" xml:"IsCheckReso"`
  118. IsCheckResoFail string `json:"IsCheckResoFail" xml:"IsCheckResoFail"`
  119. IsCheckVideoBitrate string `json:"IsCheckVideoBitrate" xml:"IsCheckVideoBitrate"`
  120. IsCheckAudioBitrate string `json:"IsCheckAudioBitrate" xml:"IsCheckAudioBitrate"`
  121. AdjDarMethod string `json:"AdjDarMethod" xml:"AdjDarMethod"`
  122. IsCheckVideoBitrateFail string `json:"IsCheckVideoBitrateFail" xml:"IsCheckVideoBitrateFail"`
  123. IsCheckAudioBitrateFail string `json:"IsCheckAudioBitrateFail" xml:"IsCheckAudioBitrateFail"`
  124. } `json:"TransConfig" xml:"TransConfig"`
  125. MuxConfig struct {
  126. Segment struct {
  127. Duration string `json:"Duration" xml:"Duration"`
  128. } `json:"Segment" xml:"Segment"`
  129. Gif struct {
  130. Loop string `json:"Loop" xml:"Loop"`
  131. FinalDelay string `json:"FinalDelay" xml:"FinalDelay"`
  132. IsCustomPalette string `json:"IsCustomPalette" xml:"IsCustomPalette"`
  133. DitherMode string `json:"DitherMode" xml:"DitherMode"`
  134. } `json:"Gif" xml:"Gif"`
  135. } `json:"MuxConfig" xml:"MuxConfig"`
  136. } `json:"Template" xml:"Template"`
  137. } `json:"TemplateList" xml:"TemplateList"`
  138. }
  139. func CreateQueryTemplateListRequest() (request *QueryTemplateListRequest) {
  140. request = &QueryTemplateListRequest{
  141. RpcRequest: &requests.RpcRequest{},
  142. }
  143. request.InitWithApiInfo("Mts", "2014-06-18", "QueryTemplateList", "mts", "openAPI")
  144. return
  145. }
  146. func CreateQueryTemplateListResponse() (response *QueryTemplateListResponse) {
  147. response = &QueryTemplateListResponse{
  148. BaseResponse: &responses.BaseResponse{},
  149. }
  150. return
  151. }