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

     1  package iot
     2  
     3  import (
     4  	github_com_morlay_goqcloud "github.com/morlay/goqcloud"
     5  )
     6  
     7  // 新增Topic
     8  // https://cloud.tencent.com/document/api/568/16444
     9  
    10  type AddTopicRequest struct {
    11  	// 产品Id
    12  	ProductId string `name:"ProductId"`
    13  	// 区域
    14  	Region string `name:"Region"`
    15  	// Topic名称
    16  	TopicName string `name:"TopicName"`
    17  }
    18  
    19  func (req *AddTopicRequest) Invoke(client github_com_morlay_goqcloud.Client) (*AddTopicResponse, error) {
    20  	resp := &AddTopicResponse{}
    21  	err := client.Request("iot", "AddTopic", "2018-01-23").Do(req, resp)
    22  	return resp, err
    23  }
    24  
    25  type AddTopicResponse struct {
    26  	github_com_morlay_goqcloud.TencentCloudBaseResponse
    27  	// Topic信息
    28  	Topic Topic `json:"Topic"`
    29  }