query_snapshot_job_list.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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) QuerySnapshotJobList(request *QuerySnapshotJobListRequest) (response *QuerySnapshotJobListResponse, err error) {
  21. response = CreateQuerySnapshotJobListResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) QuerySnapshotJobListWithChan(request *QuerySnapshotJobListRequest) (<-chan *QuerySnapshotJobListResponse, <-chan error) {
  26. responseChan := make(chan *QuerySnapshotJobListResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.QuerySnapshotJobList(request)
  32. if err != nil {
  33. errChan <- err
  34. } else {
  35. responseChan <- response
  36. }
  37. })
  38. if err != nil {
  39. errChan <- err
  40. close(responseChan)
  41. close(errChan)
  42. }
  43. return responseChan, errChan
  44. }
  45. func (client *Client) QuerySnapshotJobListWithCallback(request *QuerySnapshotJobListRequest, callback func(response *QuerySnapshotJobListResponse, err error)) <-chan int {
  46. result := make(chan int, 1)
  47. err := client.AddAsyncTask(func() {
  48. var response *QuerySnapshotJobListResponse
  49. var err error
  50. defer close(result)
  51. response, err = client.QuerySnapshotJobList(request)
  52. callback(response, err)
  53. result <- 1
  54. })
  55. if err != nil {
  56. defer close(result)
  57. callback(nil, err)
  58. result <- 0
  59. }
  60. return result
  61. }
  62. type QuerySnapshotJobListRequest struct {
  63. *requests.RpcRequest
  64. SnapshotJobIds string `position:"Query" name:"SnapshotJobIds"`
  65. ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
  66. ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
  67. OwnerAccount string `position:"Query" name:"OwnerAccount"`
  68. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  69. }
  70. type QuerySnapshotJobListResponse struct {
  71. *responses.BaseResponse
  72. RequestId string `json:"RequestId" xml:"RequestId"`
  73. NonExistSnapshotJobIds struct {
  74. String []string `json:"String" xml:"String"`
  75. } `json:"NonExistSnapshotJobIds" xml:"NonExistSnapshotJobIds"`
  76. SnapshotJobList struct {
  77. SnapshotJob []struct {
  78. Id string `json:"Id" xml:"Id"`
  79. UserData string `json:"UserData" xml:"UserData"`
  80. PipelineId string `json:"PipelineId" xml:"PipelineId"`
  81. State string `json:"State" xml:"State"`
  82. Code string `json:"Code" xml:"Code"`
  83. Count string `json:"Count" xml:"Count"`
  84. TileCount string `json:"TileCount" xml:"TileCount"`
  85. Message string `json:"Message" xml:"Message"`
  86. CreationTime string `json:"CreationTime" xml:"CreationTime"`
  87. Input struct {
  88. Bucket string `json:"Bucket" xml:"Bucket"`
  89. Location string `json:"Location" xml:"Location"`
  90. Object string `json:"Object" xml:"Object"`
  91. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  92. } `json:"Input" xml:"Input"`
  93. SnapshotConfig struct {
  94. Time string `json:"Time" xml:"Time"`
  95. Interval string `json:"Interval" xml:"Interval"`
  96. Num string `json:"Num" xml:"Num"`
  97. Width string `json:"Width" xml:"Width"`
  98. Height string `json:"Height" xml:"Height"`
  99. FrameType string `json:"FrameType" xml:"FrameType"`
  100. OutputFile struct {
  101. Bucket string `json:"Bucket" xml:"Bucket"`
  102. Location string `json:"Location" xml:"Location"`
  103. Object string `json:"Object" xml:"Object"`
  104. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  105. } `json:"OutputFile" xml:"OutputFile"`
  106. TileOutputFile struct {
  107. Bucket string `json:"Bucket" xml:"Bucket"`
  108. Location string `json:"Location" xml:"Location"`
  109. Object string `json:"Object" xml:"Object"`
  110. RoleArn string `json:"RoleArn" xml:"RoleArn"`
  111. } `json:"TileOutputFile" xml:"TileOutputFile"`
  112. TileOut struct {
  113. Lines string `json:"Lines" xml:"Lines"`
  114. Columns string `json:"Columns" xml:"Columns"`
  115. CellWidth string `json:"CellWidth" xml:"CellWidth"`
  116. CellHeight string `json:"CellHeight" xml:"CellHeight"`
  117. Margin string `json:"Margin" xml:"Margin"`
  118. Padding string `json:"Padding" xml:"Padding"`
  119. Color string `json:"Color" xml:"Color"`
  120. IsKeepCellPic string `json:"IsKeepCellPic" xml:"IsKeepCellPic"`
  121. CellSelStep string `json:"CellSelStep" xml:"CellSelStep"`
  122. } `json:"TileOut" xml:"TileOut"`
  123. } `json:"SnapshotConfig" xml:"SnapshotConfig"`
  124. MNSMessageResult struct {
  125. MessageId string `json:"MessageId" xml:"MessageId"`
  126. ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
  127. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  128. } `json:"MNSMessageResult" xml:"MNSMessageResult"`
  129. } `json:"SnapshotJob" xml:"SnapshotJob"`
  130. } `json:"SnapshotJobList" xml:"SnapshotJobList"`
  131. }
  132. func CreateQuerySnapshotJobListRequest() (request *QuerySnapshotJobListRequest) {
  133. request = &QuerySnapshotJobListRequest{
  134. RpcRequest: &requests.RpcRequest{},
  135. }
  136. request.InitWithApiInfo("Mts", "2014-06-18", "QuerySnapshotJobList", "mts", "openAPI")
  137. return
  138. }
  139. func CreateQuerySnapshotJobListResponse() (response *QuerySnapshotJobListResponse) {
  140. response = &QuerySnapshotJobListResponse{
  141. BaseResponse: &responses.BaseResponse{},
  142. }
  143. return
  144. }