github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/iotcloud/describe_tasks.go (about)

     1  package iotcloud
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 获取任务列表
     8  // https://cloud.tencent.com/document/api/634/19481
     9  
    10  type DescribeTasksRequest struct {
    11  	// 分页的大小,数值范围 1-250
    12  	Limit int64 `name:"Limit"`
    13  	// 分页偏移,从0开始
    14  	Offset int64 `name:"Offset"`
    15  	// 区域
    16  	Region string `name:"Region"`
    17  }
    18  
    19  func (req *DescribeTasksRequest) Invoke(client github_com_morlay_goqcloud.Client) (*DescribeTasksResponse, error) {
    20  	resp := &DescribeTasksResponse{}
    21  	err := client.Request("iotcloud", "DescribeTasks", "2018-06-14").Do(req, resp)
    22  	return resp, err
    23  }
    24  
    25  type DescribeTasksResponse struct {
    26  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    27  	// 此页任务对象的数组,按创建时间排序
    28  	Tasks []*TaskInfo `json:"Tasks"`
    29  	// 用户一个月内创建的任务总数
    30  	TotalCount int64 `json:"TotalCount"`
    31  }