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

     1  package iot
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 获取转发规则列表
     8  // https://cloud.tencent.com/document/api/568/16462
     9  
    10  type GetRulesRequest struct {
    11  	// 长度
    12  	Length *int64 `name:"Length,omitempty"`
    13  	// 偏移
    14  	Offset *int64 `name:"Offset,omitempty"`
    15  	// 区域
    16  	Region string `name:"Region"`
    17  }
    18  
    19  func (req *GetRulesRequest) Invoke(client github_com_morlay_goqcloud.Client) (*GetRulesResponse, error) {
    20  	resp := &GetRulesResponse{}
    21  	err := client.Request("iot", "GetRules", "2018-01-23").Do(req, resp)
    22  	return resp, err
    23  }
    24  
    25  type GetRulesResponse struct {
    26  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    27  	// 规则列表
    28  	Rules []*Rule `json:"Rules"`
    29  }