Browse Source

Generated 2018-01-20 for Iot.

sdk-team 6 years ago
parent
commit
cec539f410

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2020-01-20 Version: v1.60.347
+- Generated 2018-01-20 for `Iot`.
+- Add Thing Model APIs, including QueryThingModel, PublishThingModel, etc.
+
 2020-01-20 Version: v1.60.346
 - Generated 2019-06-25 for `hiknoengine`.
 - Release on full language support.

+ 4 - 1
services/iot/cancel_ota_task_by_job.go

@@ -77,10 +77,13 @@ func (client *Client) CancelOTATaskByJobWithCallback(request *CancelOTATaskByJob
 type CancelOTATaskByJobRequest struct {
 	*requests.RpcRequest
 	CancelScheduledTask  requests.Boolean `position:"Query" name:"CancelScheduledTask"`
-	CancelInProgressTask requests.Boolean `position:"Query" name:"CancelInProgressTask"`
 	JobId                string           `position:"Query" name:"JobId"`
 	IotInstanceId        string           `position:"Query" name:"IotInstanceId"`
 	CancelQueuedTask     requests.Boolean `position:"Query" name:"CancelQueuedTask"`
+	CancelInProgressTask requests.Boolean `position:"Query" name:"CancelInProgressTask"`
+	CancelNotifiedTask   requests.Boolean `position:"Query" name:"CancelNotifiedTask"`
+	ApiProduct           string           `position:"Body" name:"ApiProduct"`
+	ApiRevision          string           `position:"Body" name:"ApiRevision"`
 }
 
 // CancelOTATaskByJobResponse is the response struct for api CancelOTATaskByJob

+ 110 - 0
services/iot/copy_thing_model.go

@@ -0,0 +1,110 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CopyThingModel invokes the iot.CopyThingModel API synchronously
+// api document: https://help.aliyun.com/api/iot/copythingmodel.html
+func (client *Client) CopyThingModel(request *CopyThingModelRequest) (response *CopyThingModelResponse, err error) {
+	response = CreateCopyThingModelResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CopyThingModelWithChan invokes the iot.CopyThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/copythingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CopyThingModelWithChan(request *CopyThingModelRequest) (<-chan *CopyThingModelResponse, <-chan error) {
+	responseChan := make(chan *CopyThingModelResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CopyThingModel(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CopyThingModelWithCallback invokes the iot.CopyThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/copythingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CopyThingModelWithCallback(request *CopyThingModelRequest, callback func(response *CopyThingModelResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CopyThingModelResponse
+		var err error
+		defer close(result)
+		response, err = client.CopyThingModel(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CopyThingModelRequest is the request struct for api CopyThingModel
+type CopyThingModelRequest struct {
+	*requests.RpcRequest
+	SourceProductKey   string `position:"Query" name:"SourceProductKey"`
+	TargetProductKey   string `position:"Query" name:"TargetProductKey"`
+	ResourceGroupId    string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId      string `position:"Query" name:"IotInstanceId"`
+	SourceModelVersion string `position:"Query" name:"SourceModelVersion"`
+}
+
+// CopyThingModelResponse is the response struct for api CopyThingModel
+type CopyThingModelResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateCopyThingModelRequest creates a request to invoke CopyThingModel API
+func CreateCopyThingModelRequest() (request *CopyThingModelRequest) {
+	request = &CopyThingModelRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "CopyThingModel", "iot", "openAPI")
+	return
+}
+
+// CreateCopyThingModelResponse creates a response to parse from CopyThingModel response
+func CreateCopyThingModelResponse() (response *CopyThingModelResponse) {
+	response = &CopyThingModelResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 2 - 0
services/iot/create_product.go

@@ -78,12 +78,14 @@ type CreateProductRequest struct {
 	*requests.RpcRequest
 	NodeType            requests.Integer `position:"Query" name:"NodeType"`
 	Description         string           `position:"Query" name:"Description"`
+	CategoryKey         string           `position:"Query" name:"CategoryKey"`
 	JoinPermissionId    string           `position:"Query" name:"JoinPermissionId"`
 	AuthType            string           `position:"Query" name:"AuthType"`
 	ResourceGroupId     string           `position:"Query" name:"ResourceGroupId"`
 	IotInstanceId       string           `position:"Query" name:"IotInstanceId"`
 	ProductName         string           `position:"Query" name:"ProductName"`
 	AliyunCommodityCode string           `position:"Query" name:"AliyunCommodityCode"`
+	PublishAuto         requests.Boolean `position:"Query" name:"PublishAuto"`
 	CategoryId          requests.Integer `position:"Query" name:"CategoryId"`
 	DataFormat          requests.Integer `position:"Query" name:"DataFormat"`
 	Id2                 requests.Boolean `position:"Query" name:"Id2"`

+ 111 - 0
services/iot/delete_thing_model.go

@@ -0,0 +1,111 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteThingModel invokes the iot.DeleteThingModel API synchronously
+// api document: https://help.aliyun.com/api/iot/deletethingmodel.html
+func (client *Client) DeleteThingModel(request *DeleteThingModelRequest) (response *DeleteThingModelResponse, err error) {
+	response = CreateDeleteThingModelResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteThingModelWithChan invokes the iot.DeleteThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletethingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteThingModelWithChan(request *DeleteThingModelRequest) (<-chan *DeleteThingModelResponse, <-chan error) {
+	responseChan := make(chan *DeleteThingModelResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteThingModel(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteThingModelWithCallback invokes the iot.DeleteThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/deletethingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteThingModelWithCallback(request *DeleteThingModelRequest, callback func(response *DeleteThingModelResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteThingModelResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteThingModel(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteThingModelRequest is the request struct for api DeleteThingModel
+type DeleteThingModelRequest struct {
+	*requests.RpcRequest
+	ServiceIdentifier  *[]string `position:"Query" name:"ServiceIdentifier"  type:"Repeated"`
+	ProductKey         string    `position:"Query" name:"ProductKey"`
+	ResourceGroupId    string    `position:"Query" name:"ResourceGroupId"`
+	PropertyIdentifier *[]string `position:"Query" name:"PropertyIdentifier"  type:"Repeated"`
+	IotInstanceId      string    `position:"Query" name:"IotInstanceId"`
+	EventIdentifier    *[]string `position:"Query" name:"EventIdentifier"  type:"Repeated"`
+}
+
+// DeleteThingModelResponse is the response struct for api DeleteThingModel
+type DeleteThingModelResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateDeleteThingModelRequest creates a request to invoke DeleteThingModel API
+func CreateDeleteThingModelRequest() (request *DeleteThingModelRequest) {
+	request = &DeleteThingModelRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "DeleteThingModel", "iot", "openAPI")
+	return
+}
+
+// CreateDeleteThingModelResponse creates a response to parse from DeleteThingModel response
+func CreateDeleteThingModelResponse() (response *DeleteThingModelResponse) {
+	response = &DeleteThingModelResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 0 - 111
services/iot/get_product_meta_list_by_name.go

@@ -1,111 +0,0 @@
-package iot
-
-//Licensed under the Apache License, Version 2.0 (the "License");
-//you may not use this file except in compliance with the License.
-//You may obtain a copy of the License at
-//
-//http://www.apache.org/licenses/LICENSE-2.0
-//
-//Unless required by applicable law or agreed to in writing, software
-//distributed under the License is distributed on an "AS IS" BASIS,
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//See the License for the specific language governing permissions and
-//limitations under the License.
-//
-// Code generated by Alibaba Cloud SDK Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
-
-import (
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
-	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
-)
-
-// GetProductMetaListByName invokes the iot.GetProductMetaListByName API synchronously
-// api document: https://help.aliyun.com/api/iot/getproductmetalistbyname.html
-func (client *Client) GetProductMetaListByName(request *GetProductMetaListByNameRequest) (response *GetProductMetaListByNameResponse, err error) {
-	response = CreateGetProductMetaListByNameResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// GetProductMetaListByNameWithChan invokes the iot.GetProductMetaListByName API asynchronously
-// api document: https://help.aliyun.com/api/iot/getproductmetalistbyname.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) GetProductMetaListByNameWithChan(request *GetProductMetaListByNameRequest) (<-chan *GetProductMetaListByNameResponse, <-chan error) {
-	responseChan := make(chan *GetProductMetaListByNameResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.GetProductMetaListByName(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// GetProductMetaListByNameWithCallback invokes the iot.GetProductMetaListByName API asynchronously
-// api document: https://help.aliyun.com/api/iot/getproductmetalistbyname.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) GetProductMetaListByNameWithCallback(request *GetProductMetaListByNameRequest, callback func(response *GetProductMetaListByNameResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *GetProductMetaListByNameResponse
-		var err error
-		defer close(result)
-		response, err = client.GetProductMetaListByName(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// GetProductMetaListByNameRequest is the request struct for api GetProductMetaListByName
-type GetProductMetaListByNameRequest struct {
-	*requests.RpcRequest
-	ProductKey      string `position:"Body" name:"ProductKey"`
-	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
-	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
-	DeviceName      string `position:"Body" name:"DeviceName"`
-	Page            string `position:"Body" name:"Page"`
-}
-
-// GetProductMetaListByNameResponse is the response struct for api GetProductMetaListByName
-type GetProductMetaListByNameResponse struct {
-	*responses.BaseResponse
-	RequestId    string `json:"RequestId" xml:"RequestId"`
-	Success      bool   `json:"Success" xml:"Success"`
-	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
-	Code         string `json:"Code" xml:"Code"`
-	Data         string `json:"Data" xml:"Data"`
-}
-
-// CreateGetProductMetaListByNameRequest creates a request to invoke GetProductMetaListByName API
-func CreateGetProductMetaListByNameRequest() (request *GetProductMetaListByNameRequest) {
-	request = &GetProductMetaListByNameRequest{
-		RpcRequest: &requests.RpcRequest{},
-	}
-	request.InitWithApiInfo("Iot", "2018-01-20", "GetProductMetaListByName", "iot", "openAPI")
-	return
-}
-
-// CreateGetProductMetaListByNameResponse creates a response to parse from GetProductMetaListByName response
-func CreateGetProductMetaListByNameResponse() (response *GetProductMetaListByNameResponse) {
-	response = &GetProductMetaListByNameResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 111 - 0
services/iot/get_thing_model_tsl.go

@@ -0,0 +1,111 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetThingModelTsl invokes the iot.GetThingModelTsl API synchronously
+// api document: https://help.aliyun.com/api/iot/getthingmodeltsl.html
+func (client *Client) GetThingModelTsl(request *GetThingModelTslRequest) (response *GetThingModelTslResponse, err error) {
+	response = CreateGetThingModelTslResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetThingModelTslWithChan invokes the iot.GetThingModelTsl API asynchronously
+// api document: https://help.aliyun.com/api/iot/getthingmodeltsl.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetThingModelTslWithChan(request *GetThingModelTslRequest) (<-chan *GetThingModelTslResponse, <-chan error) {
+	responseChan := make(chan *GetThingModelTslResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetThingModelTsl(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetThingModelTslWithCallback invokes the iot.GetThingModelTsl API asynchronously
+// api document: https://help.aliyun.com/api/iot/getthingmodeltsl.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetThingModelTslWithCallback(request *GetThingModelTslRequest, callback func(response *GetThingModelTslResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetThingModelTslResponse
+		var err error
+		defer close(result)
+		response, err = client.GetThingModelTsl(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetThingModelTslRequest is the request struct for api GetThingModelTsl
+type GetThingModelTslRequest struct {
+	*requests.RpcRequest
+	Simple          requests.Boolean `position:"Query" name:"Simple"`
+	ProductKey      string           `position:"Query" name:"ProductKey"`
+	ResourceGroupId string           `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string           `position:"Query" name:"IotInstanceId"`
+	ModelVersion    string           `position:"Query" name:"ModelVersion"`
+}
+
+// GetThingModelTslResponse is the response struct for api GetThingModelTsl
+type GetThingModelTslResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         Data   `json:"Data" xml:"Data"`
+}
+
+// CreateGetThingModelTslRequest creates a request to invoke GetThingModelTsl API
+func CreateGetThingModelTslRequest() (request *GetThingModelTslRequest) {
+	request = &GetThingModelTslRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetThingModelTsl", "iot", "openAPI")
+	return
+}
+
+// CreateGetThingModelTslResponse creates a response to parse from GetThingModelTsl response
+func CreateGetThingModelTslResponse() (response *GetThingModelTslResponse) {
+	response = &GetThingModelTslResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/iot/get_thing_template.go

@@ -0,0 +1,109 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetThingTemplate invokes the iot.GetThingTemplate API synchronously
+// api document: https://help.aliyun.com/api/iot/getthingtemplate.html
+func (client *Client) GetThingTemplate(request *GetThingTemplateRequest) (response *GetThingTemplateResponse, err error) {
+	response = CreateGetThingTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetThingTemplateWithChan invokes the iot.GetThingTemplate API asynchronously
+// api document: https://help.aliyun.com/api/iot/getthingtemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetThingTemplateWithChan(request *GetThingTemplateRequest) (<-chan *GetThingTemplateResponse, <-chan error) {
+	responseChan := make(chan *GetThingTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetThingTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetThingTemplateWithCallback invokes the iot.GetThingTemplate API asynchronously
+// api document: https://help.aliyun.com/api/iot/getthingtemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetThingTemplateWithCallback(request *GetThingTemplateRequest, callback func(response *GetThingTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetThingTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.GetThingTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetThingTemplateRequest is the request struct for api GetThingTemplate
+type GetThingTemplateRequest struct {
+	*requests.RpcRequest
+	CategoryKey     string `position:"Query" name:"CategoryKey"`
+	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
+}
+
+// GetThingTemplateResponse is the response struct for api GetThingTemplate
+type GetThingTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId      string `json:"RequestId" xml:"RequestId"`
+	Success        bool   `json:"Success" xml:"Success"`
+	Code           string `json:"Code" xml:"Code"`
+	ErrorMessage   string `json:"ErrorMessage" xml:"ErrorMessage"`
+	ThingModelJSON string `json:"ThingModelJSON" xml:"ThingModelJSON"`
+}
+
+// CreateGetThingTemplateRequest creates a request to invoke GetThingTemplate API
+func CreateGetThingTemplateRequest() (request *GetThingTemplateRequest) {
+	request = &GetThingTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "GetThingTemplate", "iot", "openAPI")
+	return
+}
+
+// CreateGetThingTemplateResponse creates a response to parse from GetThingTemplate response
+func CreateGetThingTemplateResponse() (response *GetThingTemplateResponse) {
+	response = &GetThingTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/import_thing_model_tsl.go

@@ -0,0 +1,110 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ImportThingModelTsl invokes the iot.ImportThingModelTsl API synchronously
+// api document: https://help.aliyun.com/api/iot/importthingmodeltsl.html
+func (client *Client) ImportThingModelTsl(request *ImportThingModelTslRequest) (response *ImportThingModelTslResponse, err error) {
+	response = CreateImportThingModelTslResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ImportThingModelTslWithChan invokes the iot.ImportThingModelTsl API asynchronously
+// api document: https://help.aliyun.com/api/iot/importthingmodeltsl.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ImportThingModelTslWithChan(request *ImportThingModelTslRequest) (<-chan *ImportThingModelTslResponse, <-chan error) {
+	responseChan := make(chan *ImportThingModelTslResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ImportThingModelTsl(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ImportThingModelTslWithCallback invokes the iot.ImportThingModelTsl API asynchronously
+// api document: https://help.aliyun.com/api/iot/importthingmodeltsl.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ImportThingModelTslWithCallback(request *ImportThingModelTslRequest, callback func(response *ImportThingModelTslResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ImportThingModelTslResponse
+		var err error
+		defer close(result)
+		response, err = client.ImportThingModelTsl(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ImportThingModelTslRequest is the request struct for api ImportThingModelTsl
+type ImportThingModelTslRequest struct {
+	*requests.RpcRequest
+	ProductKey      string `position:"Query" name:"ProductKey"`
+	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
+	TslUrl          string `position:"Query" name:"TslUrl"`
+	TslStr          string `position:"Query" name:"TslStr"`
+}
+
+// ImportThingModelTslResponse is the response struct for api ImportThingModelTsl
+type ImportThingModelTslResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreateImportThingModelTslRequest creates a request to invoke ImportThingModelTsl API
+func CreateImportThingModelTslRequest() (request *ImportThingModelTslRequest) {
+	request = &ImportThingModelTslRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ImportThingModelTsl", "iot", "openAPI")
+	return
+}
+
+// CreateImportThingModelTslResponse creates a response to parse from ImportThingModelTsl response
+func CreateImportThingModelTslResponse() (response *ImportThingModelTslResponse) {
+	response = &ImportThingModelTslResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 9 - 5
services/iot/invoke_data_api_service.go

@@ -76,16 +76,20 @@ func (client *Client) InvokeDataAPIServiceWithCallback(request *InvokeDataAPISer
 // InvokeDataAPIServiceRequest is the request struct for api InvokeDataAPIService
 type InvokeDataAPIServiceRequest struct {
 	*requests.RpcRequest
-	ApiSrn string                       `position:"Query" name:"ApiSrn"`
-	Param  *[]InvokeDataAPIServiceParam `position:"Body" name:"Param"  type:"Repeated"`
+	Param         *[]InvokeDataAPIServiceParam `position:"Body" name:"Param"  type:"Repeated"`
+	IotInstanceId string                       `position:"Body" name:"IotInstanceId"`
+	ApiSrn        string                       `position:"Body" name:"ApiSrn"`
+	ApiProduct    string                       `position:"Body" name:"ApiProduct"`
+	ApiRevision   string                       `position:"Body" name:"ApiRevision"`
 }
 
 // InvokeDataAPIServiceParam is a repeated param struct in InvokeDataAPIServiceRequest
 type InvokeDataAPIServiceParam struct {
-	ListParamType  string    `name:"ListParamType"`
+	ParamType      string    `name:"ParamType"`
 	ListParamValue *[]string `name:"ListParamValue" type:"Repeated"`
-	ParamValue     string    `name:"ParamValue"`
+	ListParamType  string    `name:"ListParamType"`
 	ParamName      string    `name:"ParamName"`
+	ParamValue     string    `name:"ParamValue"`
 }
 
 // InvokeDataAPIServiceResponse is the response struct for api InvokeDataAPIService
@@ -93,8 +97,8 @@ type InvokeDataAPIServiceResponse struct {
 	*responses.BaseResponse
 	RequestId    string `json:"RequestId" xml:"RequestId"`
 	Success      bool   `json:"Success" xml:"Success"`
-	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
 	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
 	Data         Data   `json:"Data" xml:"Data"`
 }
 

+ 109 - 0
services/iot/list_thing_model_version.go

@@ -0,0 +1,109 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListThingModelVersion invokes the iot.ListThingModelVersion API synchronously
+// api document: https://help.aliyun.com/api/iot/listthingmodelversion.html
+func (client *Client) ListThingModelVersion(request *ListThingModelVersionRequest) (response *ListThingModelVersionResponse, err error) {
+	response = CreateListThingModelVersionResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListThingModelVersionWithChan invokes the iot.ListThingModelVersion API asynchronously
+// api document: https://help.aliyun.com/api/iot/listthingmodelversion.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListThingModelVersionWithChan(request *ListThingModelVersionRequest) (<-chan *ListThingModelVersionResponse, <-chan error) {
+	responseChan := make(chan *ListThingModelVersionResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListThingModelVersion(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListThingModelVersionWithCallback invokes the iot.ListThingModelVersion API asynchronously
+// api document: https://help.aliyun.com/api/iot/listthingmodelversion.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListThingModelVersionWithCallback(request *ListThingModelVersionRequest, callback func(response *ListThingModelVersionResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListThingModelVersionResponse
+		var err error
+		defer close(result)
+		response, err = client.ListThingModelVersion(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListThingModelVersionRequest is the request struct for api ListThingModelVersion
+type ListThingModelVersionRequest struct {
+	*requests.RpcRequest
+	ProductKey      string `position:"Query" name:"ProductKey"`
+	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
+}
+
+// ListThingModelVersionResponse is the response struct for api ListThingModelVersion
+type ListThingModelVersionResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         Data   `json:"Data" xml:"Data"`
+}
+
+// CreateListThingModelVersionRequest creates a request to invoke ListThingModelVersion API
+func CreateListThingModelVersionRequest() (request *ListThingModelVersionRequest) {
+	request = &ListThingModelVersionRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ListThingModelVersion", "iot", "openAPI")
+	return
+}
+
+// CreateListThingModelVersionResponse creates a response to parse from ListThingModelVersion response
+func CreateListThingModelVersionResponse() (response *ListThingModelVersionResponse) {
+	response = &ListThingModelVersionResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/iot/list_thing_templates.go

@@ -0,0 +1,108 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// ListThingTemplates invokes the iot.ListThingTemplates API synchronously
+// api document: https://help.aliyun.com/api/iot/listthingtemplates.html
+func (client *Client) ListThingTemplates(request *ListThingTemplatesRequest) (response *ListThingTemplatesResponse, err error) {
+	response = CreateListThingTemplatesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// ListThingTemplatesWithChan invokes the iot.ListThingTemplates API asynchronously
+// api document: https://help.aliyun.com/api/iot/listthingtemplates.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListThingTemplatesWithChan(request *ListThingTemplatesRequest) (<-chan *ListThingTemplatesResponse, <-chan error) {
+	responseChan := make(chan *ListThingTemplatesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.ListThingTemplates(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// ListThingTemplatesWithCallback invokes the iot.ListThingTemplates API asynchronously
+// api document: https://help.aliyun.com/api/iot/listthingtemplates.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) ListThingTemplatesWithCallback(request *ListThingTemplatesRequest, callback func(response *ListThingTemplatesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *ListThingTemplatesResponse
+		var err error
+		defer close(result)
+		response, err = client.ListThingTemplates(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// ListThingTemplatesRequest is the request struct for api ListThingTemplates
+type ListThingTemplatesRequest struct {
+	*requests.RpcRequest
+	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
+}
+
+// ListThingTemplatesResponse is the response struct for api ListThingTemplates
+type ListThingTemplatesResponse struct {
+	*responses.BaseResponse
+	RequestId    string         `json:"RequestId" xml:"RequestId"`
+	Success      bool           `json:"Success" xml:"Success"`
+	Code         string         `json:"Code" xml:"Code"`
+	ErrorMessage string         `json:"ErrorMessage" xml:"ErrorMessage"`
+	Data         []CategoryInfo `json:"Data" xml:"Data"`
+}
+
+// CreateListThingTemplatesRequest creates a request to invoke ListThingTemplates API
+func CreateListThingTemplatesRequest() (request *ListThingTemplatesRequest) {
+	request = &ListThingTemplatesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "ListThingTemplates", "iot", "openAPI")
+	return
+}
+
+// CreateListThingTemplatesResponse creates a response to parse from ListThingTemplates response
+func CreateListThingTemplatesResponse() (response *ListThingTemplatesResponse) {
+	response = &ListThingTemplatesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/iot/publish_thing_model.go

@@ -0,0 +1,110 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// PublishThingModel invokes the iot.PublishThingModel API synchronously
+// api document: https://help.aliyun.com/api/iot/publishthingmodel.html
+func (client *Client) PublishThingModel(request *PublishThingModelRequest) (response *PublishThingModelResponse, err error) {
+	response = CreatePublishThingModelResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// PublishThingModelWithChan invokes the iot.PublishThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/publishthingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PublishThingModelWithChan(request *PublishThingModelRequest) (<-chan *PublishThingModelResponse, <-chan error) {
+	responseChan := make(chan *PublishThingModelResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.PublishThingModel(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// PublishThingModelWithCallback invokes the iot.PublishThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/publishthingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) PublishThingModelWithCallback(request *PublishThingModelRequest, callback func(response *PublishThingModelResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *PublishThingModelResponse
+		var err error
+		defer close(result)
+		response, err = client.PublishThingModel(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// PublishThingModelRequest is the request struct for api PublishThingModel
+type PublishThingModelRequest struct {
+	*requests.RpcRequest
+	Description     string `position:"Query" name:"Description"`
+	ProductKey      string `position:"Query" name:"ProductKey"`
+	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
+	ModelVersion    string `position:"Query" name:"ModelVersion"`
+}
+
+// PublishThingModelResponse is the response struct for api PublishThingModel
+type PublishThingModelResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+}
+
+// CreatePublishThingModelRequest creates a request to invoke PublishThingModel API
+func CreatePublishThingModelRequest() (request *PublishThingModelRequest) {
+	request = &PublishThingModelRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "PublishThingModel", "iot", "openAPI")
+	return
+}
+
+// CreatePublishThingModelResponse creates a response to parse from PublishThingModel response
+func CreatePublishThingModelResponse() (response *PublishThingModelResponse) {
+	response = &PublishThingModelResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/iot/query_thing_model.go

@@ -0,0 +1,111 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// QueryThingModel invokes the iot.QueryThingModel API synchronously
+// api document: https://help.aliyun.com/api/iot/querythingmodel.html
+func (client *Client) QueryThingModel(request *QueryThingModelRequest) (response *QueryThingModelResponse, err error) {
+	response = CreateQueryThingModelResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryThingModelWithChan invokes the iot.QueryThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/querythingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryThingModelWithChan(request *QueryThingModelRequest) (<-chan *QueryThingModelResponse, <-chan error) {
+	responseChan := make(chan *QueryThingModelResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryThingModel(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryThingModelWithCallback invokes the iot.QueryThingModel API asynchronously
+// api document: https://help.aliyun.com/api/iot/querythingmodel.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryThingModelWithCallback(request *QueryThingModelRequest, callback func(response *QueryThingModelResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryThingModelResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryThingModel(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryThingModelRequest is the request struct for api QueryThingModel
+type QueryThingModelRequest struct {
+	*requests.RpcRequest
+	ProductKey      string `position:"Query" name:"ProductKey"`
+	ResourceGroupId string `position:"Query" name:"ResourceGroupId"`
+	IotInstanceId   string `position:"Query" name:"IotInstanceId"`
+	ModelVersion    string `position:"Query" name:"ModelVersion"`
+}
+
+// QueryThingModelResponse is the response struct for api QueryThingModel
+type QueryThingModelResponse struct {
+	*responses.BaseResponse
+	RequestId    string `json:"RequestId" xml:"RequestId"`
+	Success      bool   `json:"Success" xml:"Success"`
+	Code         string `json:"Code" xml:"Code"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	ProductKey   string `json:"ProductKey" xml:"ProductKey"`
+	Data         Data   `json:"Data" xml:"Data"`
+}
+
+// CreateQueryThingModelRequest creates a request to invoke QueryThingModel API
+func CreateQueryThingModelRequest() (request *QueryThingModelRequest) {
+	request = &QueryThingModelRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Iot", "2018-01-20", "QueryThingModel", "iot", "openAPI")
+	return
+}
+
+// CreateQueryThingModelResponse creates a response to parse from QueryThingModel response
+func CreateQueryThingModelResponse() (response *QueryThingModelResponse) {
+	response = &QueryThingModelResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 22 - 0
services/iot/struct_category_info.go

@@ -0,0 +1,22 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// CategoryInfo is a nested struct in iot response
+type CategoryInfo struct {
+	CategoryKey  string `json:"CategoryKey" xml:"CategoryKey"`
+	CategoryName string `json:"CategoryName" xml:"CategoryName"`
+}

+ 4 - 0
services/iot/struct_data.go

@@ -39,9 +39,11 @@ type Data struct {
 	RoleArn                string                `json:"RoleArn" xml:"RoleArn"`
 	Type                   string                `json:"Type" xml:"Type"`
 	FileId                 string                `json:"FileId" xml:"FileId"`
+	ThingModelJson         string                `json:"ThingModelJson" xml:"ThingModelJson"`
 	LastUpdateTime         int64                 `json:"LastUpdateTime" xml:"LastUpdateTime"`
 	Tags                   string                `json:"Tags" xml:"Tags"`
 	Versions               string                `json:"Versions" xml:"Versions"`
+	TslUri                 string                `json:"TslUri" xml:"TslUri"`
 	SelectionType          string                `json:"SelectionType" xml:"SelectionType"`
 	FirmwareId             string                `json:"FirmwareId" xml:"FirmwareId"`
 	AliyunCommodityCode    string                `json:"AliyunCommodityCode" xml:"AliyunCommodityCode"`
@@ -55,6 +57,7 @@ type Data struct {
 	Size                   string                `json:"Size" xml:"Size"`
 	Id2                    bool                  `json:"Id2" xml:"Id2"`
 	NodeType               int                   `json:"NodeType" xml:"NodeType"`
+	TslStr                 string                `json:"TslStr" xml:"TslStr"`
 	UtcScheduleTime        string                `json:"UtcScheduleTime" xml:"UtcScheduleTime"`
 	ApiSrn                 string                `json:"ApiSrn" xml:"ApiSrn"`
 	ProductName            string                `json:"ProductName" xml:"ProductName"`
@@ -104,6 +107,7 @@ type Data struct {
 	InvalidDeviceNameList  InvalidDeviceNameList `json:"InvalidDeviceNameList" xml:"InvalidDeviceNameList"`
 	ResultList             ResultList            `json:"ResultList" xml:"ResultList"`
 	SqlTemplateDTO         SqlTemplateDTO        `json:"SqlTemplateDTO" xml:"SqlTemplateDTO"`
+	ModelVersions          []ModelVersion        `json:"ModelVersions" xml:"ModelVersions"`
 	TaskList               []Task                `json:"TaskList" xml:"TaskList"`
 	List                   ListInGetThingTopo    `json:"List" xml:"List"`
 }

+ 21 - 0
services/iot/struct_data_in_list_thing_templates.go

@@ -0,0 +1,21 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// DataInListThingTemplates is a nested struct in iot response
+type DataInListThingTemplates struct {
+	CategoryInfo []CategoryInfo `json:"CategoryInfo" xml:"CategoryInfo"`
+}

+ 23 - 0
services/iot/struct_model_version.go

@@ -0,0 +1,23 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// ModelVersion is a nested struct in iot response
+type ModelVersion struct {
+	ModelVersion string `json:"ModelVersion" xml:"ModelVersion"`
+	Description  string `json:"Description" xml:"Description"`
+	GmtCreate    int64  `json:"GmtCreate" xml:"GmtCreate"`
+}

+ 21 - 0
services/iot/struct_model_versions.go

@@ -0,0 +1,21 @@
+package iot
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// ModelVersions is a nested struct in iot response
+type ModelVersions struct {
+	ModelVersion []ModelVersion `json:"ModelVersion" xml:"ModelVersion"`
+}