From e17e27754b58bce10a574df3ef5cb13627e0d330 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 15 May 2020 18:02:51 +0800 Subject: [PATCH] Generated 2018-01-20 for Iot. --- ChangeLog.txt | 6 + .../iot/batch_add_device_group_relations.go | 4 +- services/iot/batch_add_thing_topo.go | 6 +- services/iot/batch_check_device_names.go | 4 +- .../batch_delete_device_group_relations.go | 4 +- .../iot/batch_delete_edge_instance_channel.go | 111 ++++++++++++++++ services/iot/batch_get_device_bind_status.go | 110 ++++++++++++++++ services/iot/batch_get_device_driver.go | 111 ---------------- services/iot/batch_get_device_state.go | 4 +- .../iot/batch_get_edge_instance_channel.go | 112 ++++++++++++++++ .../batch_get_edge_instance_device_channel.go | 112 ++++++++++++++++ .../batch_get_edge_instance_device_driver.go | 111 ++++++++++++++++ services/iot/batch_query_device_detail.go | 4 +- services/iot/batch_register_device.go | 4 +- .../batch_register_device_with_apply_id.go | 4 +- .../batch_set_edge_instance_device_channel.go | 112 ++++++++++++++++ services/iot/batch_update_device_nickname.go | 4 +- .../iot/bind_application_to_edge_instance.go | 111 ++++++++++++++++ services/iot/copy_thing_model.go | 4 +- services/iot/create_data_api_service.go | 1 - services/iot/create_device_group.go | 4 +- services/iot/create_edge_instance_channel.go | 120 ++++++++++++++++++ services/iot/create_lo_ra_nodes_task.go | 4 +- .../iot/create_ota_dynamic_upgrade_job.go | 6 +- services/iot/create_product.go | 2 + services/iot/create_product_tags.go | 4 +- services/iot/create_product_topic.go | 4 +- services/iot/create_rule.go | 2 + services/iot/create_rule_action.go | 4 +- services/iot/create_thing_model.go | 1 + services/iot/delete_device.go | 4 +- services/iot/delete_device_file.go | 6 +- services/iot/delete_device_group.go | 4 +- services/iot/delete_device_prop.go | 4 +- services/iot/delete_product.go | 4 +- services/iot/delete_product_tags.go | 4 +- services/iot/delete_product_topic.go | 2 + services/iot/delete_rule.go | 2 + services/iot/delete_rule_action.go | 2 + services/iot/delete_thing_model.go | 6 +- services/iot/delete_topic_route_table.go | 4 +- services/iot/disable_thing.go | 4 +- services/iot/enable_thing.go | 4 +- services/iot/get_device_shadow.go | 5 +- services/iot/get_device_status.go | 4 +- services/iot/get_edge_instance_deployment.go | 10 +- services/iot/get_gateway_by_sub_device.go | 4 +- services/iot/get_lora_nodes_task.go | 2 + services/iot/get_nodes_adding_task.go | 2 + services/iot/get_rule.go | 2 + services/iot/get_rule_action.go | 2 + services/iot/get_thing_model_tsl.go | 4 +- services/iot/get_thing_template.go | 2 + services/iot/get_thing_topo.go | 6 +- services/iot/gis_query_device_location.go | 110 ---------------- services/iot/import_thing_model_tsl.go | 4 +- services/iot/invoke_thing_service.go | 6 +- services/iot/invoke_things_service.go | 4 +- services/iot/list_product_by_tags.go | 6 +- services/iot/list_product_tags.go | 4 +- services/iot/list_rule.go | 4 +- services/iot/list_rule_actions.go | 2 + services/iot/list_thing_model_version.go | 14 +- services/iot/list_thing_templates.go | 2 + services/iot/notify_add_thing_topo.go | 4 +- services/iot/pub.go | 6 +- services/iot/pub_broadcast.go | 6 +- services/iot/publish_thing_model.go | 4 +- .../iot/query_batch_register_device_status.go | 4 +- services/iot/query_device.go | 6 +- services/iot/query_device_by_driver.go | 113 ----------------- services/iot/query_device_by_status.go | 6 +- services/iot/query_device_by_tags.go | 4 +- services/iot/query_device_desired_property.go | 6 +- services/iot/query_device_detail.go | 4 +- services/iot/query_device_event_data.go | 4 +- services/iot/query_device_file.go | 6 +- services/iot/query_device_file_list.go | 6 +- services/iot/query_device_group_by_device.go | 4 +- services/iot/query_device_group_by_tags.go | 4 +- services/iot/query_device_group_info.go | 4 +- services/iot/query_device_group_list.go | 6 +- services/iot/query_device_group_tag_list.go | 4 +- .../iot/query_device_list_by_device_group.go | 6 +- services/iot/query_device_prop.go | 4 +- services/iot/query_device_properties_data.go | 2 + services/iot/query_device_property_data.go | 10 +- services/iot/query_device_property_status.go | 4 +- services/iot/query_device_service_data.go | 10 +- services/iot/query_device_statistics.go | 4 +- services/iot/query_edge_instance_channel.go | 114 +++++++++++++++++ .../query_edge_instance_device_by_driver.go | 114 +++++++++++++++++ services/iot/query_lo_ra_join_permissions.go | 2 + services/iot/query_ota_job.go | 4 - services/iot/query_page_by_apply_id.go | 6 +- services/iot/query_product.go | 4 +- services/iot/query_product_list.go | 4 +- services/iot/query_product_topic.go | 4 +- services/iot/query_super_device_group.go | 4 +- services/iot/query_thing_model.go | 4 +- .../iot/query_topic_reverse_route_table.go | 2 + services/iot/query_topic_route_table.go | 2 + services/iot/r_rpc.go | 6 +- services/iot/register_device.go | 6 +- services/iot/release_edge_driver_version.go | 110 ++++++++++++++++ services/iot/remove_thing_topo.go | 4 +- services/iot/replace_edge_instance_gateway.go | 111 ++++++++++++++++ services/iot/save_device_prop.go | 6 +- services/iot/set_device_desired_property.go | 6 +- services/iot/set_device_group_tags.go | 4 +- services/iot/set_device_property.go | 4 +- services/iot/set_devices_property.go | 4 +- services/iot/start_rule.go | 2 + services/iot/stop_rule.go | 2 + services/iot/struct_channel.go | 27 ++++ services/iot/struct_channel_list.go | 21 +++ ...list_in_batch_get_edge_instance_channel.go | 21 +++ ..._batch_get_edge_instance_driver_configs.go | 21 +++ ...ig_list_in_query_edge_instance_channel.go} | 4 +- ...ct_data_in_batch_get_device_bind_status.go | 21 +++ ...data_in_batch_get_edge_instance_channel.go | 21 +++ ...ct_data_in_get_edge_instance_deployment.go | 31 +++++ ...struct_data_in_list_thing_model_version.go | 21 +++ ...uct_data_in_query_edge_instance_channel.go | 24 ++++ ...n_query_edge_instance_device_by_driver.go} | 4 +- services/iot/struct_device_channel.go | 23 ++++ services/iot/struct_device_channel_list.go | 21 +++ ...n_query_edge_instance_device_by_driver.go} | 4 +- services/iot/struct_device_status.go | 7 +- services/iot/struct_dst_topics.go | 2 +- ...lure_topics_in_delete_topic_route_table.go | 2 +- .../iot/struct_invalid_device_name_list.go | 2 +- services/iot/struct_invalid_list.go | 2 +- services/iot/struct_src_topics.go | 2 +- services/iot/struct_valid_list.go | 2 +- .../unbind_application_from_edge_instance.go | 110 ++++++++++++++++ services/iot/update_device_group.go | 4 +- services/iot/update_device_shadow.go | 4 +- services/iot/update_edge_instance_channel.go | 120 ++++++++++++++++++ services/iot/update_product.go | 4 +- services/iot/update_product_filter_config.go | 1 + services/iot/update_product_tags.go | 4 +- services/iot/update_product_topic.go | 4 +- services/iot/update_rule.go | 2 + services/iot/update_rule_action.go | 2 + services/iot/update_thing_model.go | 1 + 146 files changed, 2175 insertions(+), 473 deletions(-) create mode 100644 services/iot/batch_delete_edge_instance_channel.go create mode 100644 services/iot/batch_get_device_bind_status.go delete mode 100644 services/iot/batch_get_device_driver.go create mode 100644 services/iot/batch_get_edge_instance_channel.go create mode 100644 services/iot/batch_get_edge_instance_device_channel.go create mode 100644 services/iot/batch_get_edge_instance_device_driver.go create mode 100644 services/iot/batch_set_edge_instance_device_channel.go create mode 100644 services/iot/bind_application_to_edge_instance.go create mode 100644 services/iot/create_edge_instance_channel.go delete mode 100644 services/iot/gis_query_device_location.go delete mode 100644 services/iot/query_device_by_driver.go create mode 100644 services/iot/query_edge_instance_channel.go create mode 100644 services/iot/query_edge_instance_device_by_driver.go create mode 100644 services/iot/release_edge_driver_version.go create mode 100644 services/iot/replace_edge_instance_gateway.go create mode 100644 services/iot/struct_channel.go create mode 100644 services/iot/struct_channel_list.go create mode 100644 services/iot/struct_config_list_in_batch_get_edge_instance_channel.go create mode 100644 services/iot/struct_config_list_in_batch_get_edge_instance_driver_configs.go rename services/iot/{struct_config_list.go => struct_config_list_in_query_edge_instance_channel.go} (85%) create mode 100644 services/iot/struct_data_in_batch_get_device_bind_status.go create mode 100644 services/iot/struct_data_in_batch_get_edge_instance_channel.go create mode 100644 services/iot/struct_data_in_get_edge_instance_deployment.go create mode 100644 services/iot/struct_data_in_list_thing_model_version.go create mode 100644 services/iot/struct_data_in_query_edge_instance_channel.go rename services/iot/{struct_data_in_query_device_by_driver.go => struct_data_in_query_edge_instance_device_by_driver.go} (87%) create mode 100644 services/iot/struct_device_channel.go create mode 100644 services/iot/struct_device_channel_list.go rename services/iot/{struct_device_list_in_query_device_by_driver.go => struct_device_list_in_query_edge_instance_device_by_driver.go} (84%) create mode 100644 services/iot/unbind_application_from_edge_instance.go create mode 100644 services/iot/update_edge_instance_channel.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 5c19b316ec..7dda767ce0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,9 @@ +2020-05-15 Version: v1.61.194 +- Generated 2018-01-20 for `Iot`. +- Add LinkIoTEdge CreateEdgeInstanceChannel, BatchDeleteEdgeInstanceChannel, UpdateEdgeInstanceChannel, BatchGetEdgeInstanceChannel, QueryEdgeInstanceChannel, QueryEdgeInstanceDeviceByDriver, BatchGetEdgeInstanceDeviceDriver, BatchSetEdgeInstanceDeviceChannel, BatchGetEdgeInstanceDeviceChannel API. +- Add LinkIoTEdge BindApplicationToEdgeInstance, UnbindApplicationFromEdgeInstance API. +- Add LinkIoTEdge ReplaceEdgeInstanceGateway, ReleaseEdgeDriverVersion, BatchGetDeviceBindStatus API. + 2020-05-14 Version: v1.61.193 - Generated 2019-04-30 for `schedulerx2`. - Supported Grant Permission. diff --git a/services/iot/batch_add_device_group_relations.go b/services/iot/batch_add_device_group_relations.go index 9c1ea1078c..0ff717060d 100644 --- a/services/iot/batch_add_device_group_relations.go +++ b/services/iot/batch_add_device_group_relations.go @@ -76,8 +76,10 @@ func (client *Client) BatchAddDeviceGroupRelationsWithCallback(request *BatchAdd // BatchAddDeviceGroupRelationsRequest is the request struct for api BatchAddDeviceGroupRelations type BatchAddDeviceGroupRelationsRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + GroupId string `position:"Query" name:"GroupId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` Device *[]BatchAddDeviceGroupRelationsDevice `position:"Query" name:"Device" type:"Repeated"` } diff --git a/services/iot/batch_add_thing_topo.go b/services/iot/batch_add_thing_topo.go index d763271b4e..ea7a3d8157 100644 --- a/services/iot/batch_add_thing_topo.go +++ b/services/iot/batch_add_thing_topo.go @@ -76,11 +76,13 @@ func (client *Client) BatchAddThingTopoWithCallback(request *BatchAddThingTopoRe // BatchAddThingTopoRequest is the request struct for api BatchAddThingTopo type BatchAddThingTopoRequest struct { *requests.RpcRequest - Ext string `position:"Query" name:"Ext"` GwProductKey string `position:"Query" name:"GwProductKey"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + Ext string `position:"Query" name:"Ext"` TopoAddItem *[]BatchAddThingTopoTopoAddItem `position:"Query" name:"TopoAddItem" type:"Repeated"` GwDeviceName string `position:"Query" name:"GwDeviceName"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // BatchAddThingTopoTopoAddItem is a repeated param struct in BatchAddThingTopoRequest diff --git a/services/iot/batch_check_device_names.go b/services/iot/batch_check_device_names.go index 7b6d7a62ca..111ea74129 100644 --- a/services/iot/batch_check_device_names.go +++ b/services/iot/batch_check_device_names.go @@ -76,8 +76,10 @@ func (client *Client) BatchCheckDeviceNamesWithCallback(request *BatchCheckDevic // BatchCheckDeviceNamesRequest is the request struct for api BatchCheckDeviceNames type BatchCheckDeviceNamesRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName *[]string `position:"Query" name:"DeviceName" type:"Repeated"` } diff --git a/services/iot/batch_delete_device_group_relations.go b/services/iot/batch_delete_device_group_relations.go index f63c456c43..05de6874e9 100644 --- a/services/iot/batch_delete_device_group_relations.go +++ b/services/iot/batch_delete_device_group_relations.go @@ -76,8 +76,10 @@ func (client *Client) BatchDeleteDeviceGroupRelationsWithCallback(request *Batch // BatchDeleteDeviceGroupRelationsRequest is the request struct for api BatchDeleteDeviceGroupRelations type BatchDeleteDeviceGroupRelationsRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + GroupId string `position:"Query" name:"GroupId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` Device *[]BatchDeleteDeviceGroupRelationsDevice `position:"Query" name:"Device" type:"Repeated"` } diff --git a/services/iot/batch_delete_edge_instance_channel.go b/services/iot/batch_delete_edge_instance_channel.go new file mode 100644 index 0000000000..964f91dd67 --- /dev/null +++ b/services/iot/batch_delete_edge_instance_channel.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" +) + +// BatchDeleteEdgeInstanceChannel invokes the iot.BatchDeleteEdgeInstanceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/batchdeleteedgeinstancechannel.html +func (client *Client) BatchDeleteEdgeInstanceChannel(request *BatchDeleteEdgeInstanceChannelRequest) (response *BatchDeleteEdgeInstanceChannelResponse, err error) { + response = CreateBatchDeleteEdgeInstanceChannelResponse() + err = client.DoAction(request, response) + return +} + +// BatchDeleteEdgeInstanceChannelWithChan invokes the iot.BatchDeleteEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchdeleteedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchDeleteEdgeInstanceChannelWithChan(request *BatchDeleteEdgeInstanceChannelRequest) (<-chan *BatchDeleteEdgeInstanceChannelResponse, <-chan error) { + responseChan := make(chan *BatchDeleteEdgeInstanceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchDeleteEdgeInstanceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchDeleteEdgeInstanceChannelWithCallback invokes the iot.BatchDeleteEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchdeleteedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchDeleteEdgeInstanceChannelWithCallback(request *BatchDeleteEdgeInstanceChannelRequest, callback func(response *BatchDeleteEdgeInstanceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchDeleteEdgeInstanceChannelResponse + var err error + defer close(result) + response, err = client.BatchDeleteEdgeInstanceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchDeleteEdgeInstanceChannelRequest is the request struct for api BatchDeleteEdgeInstanceChannel +type BatchDeleteEdgeInstanceChannelRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + ChannelIds *[]string `position:"Query" name:"ChannelIds" type:"Repeated"` +} + +// BatchDeleteEdgeInstanceChannelResponse is the response struct for api BatchDeleteEdgeInstanceChannel +type BatchDeleteEdgeInstanceChannelResponse 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"` +} + +// CreateBatchDeleteEdgeInstanceChannelRequest creates a request to invoke BatchDeleteEdgeInstanceChannel API +func CreateBatchDeleteEdgeInstanceChannelRequest() (request *BatchDeleteEdgeInstanceChannelRequest) { + request = &BatchDeleteEdgeInstanceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BatchDeleteEdgeInstanceChannel", "Iot", "openAPI") + return +} + +// CreateBatchDeleteEdgeInstanceChannelResponse creates a response to parse from BatchDeleteEdgeInstanceChannel response +func CreateBatchDeleteEdgeInstanceChannelResponse() (response *BatchDeleteEdgeInstanceChannelResponse) { + response = &BatchDeleteEdgeInstanceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/batch_get_device_bind_status.go b/services/iot/batch_get_device_bind_status.go new file mode 100644 index 0000000000..2d5e96f2f3 --- /dev/null +++ b/services/iot/batch_get_device_bind_status.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" +) + +// BatchGetDeviceBindStatus invokes the iot.BatchGetDeviceBindStatus API synchronously +// api document: https://help.aliyun.com/api/iot/batchgetdevicebindstatus.html +func (client *Client) BatchGetDeviceBindStatus(request *BatchGetDeviceBindStatusRequest) (response *BatchGetDeviceBindStatusResponse, err error) { + response = CreateBatchGetDeviceBindStatusResponse() + err = client.DoAction(request, response) + return +} + +// BatchGetDeviceBindStatusWithChan invokes the iot.BatchGetDeviceBindStatus API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetdevicebindstatus.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetDeviceBindStatusWithChan(request *BatchGetDeviceBindStatusRequest) (<-chan *BatchGetDeviceBindStatusResponse, <-chan error) { + responseChan := make(chan *BatchGetDeviceBindStatusResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchGetDeviceBindStatus(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchGetDeviceBindStatusWithCallback invokes the iot.BatchGetDeviceBindStatus API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetdevicebindstatus.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetDeviceBindStatusWithCallback(request *BatchGetDeviceBindStatusRequest, callback func(response *BatchGetDeviceBindStatusResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchGetDeviceBindStatusResponse + var err error + defer close(result) + response, err = client.BatchGetDeviceBindStatus(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchGetDeviceBindStatusRequest is the request struct for api BatchGetDeviceBindStatus +type BatchGetDeviceBindStatusRequest struct { + *requests.RpcRequest + IotIds *[]string `position:"Query" name:"IotIds" type:"Repeated"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// BatchGetDeviceBindStatusResponse is the response struct for api BatchGetDeviceBindStatus +type BatchGetDeviceBindStatusResponse 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 []DeviceStatus `json:"Data" xml:"Data"` +} + +// CreateBatchGetDeviceBindStatusRequest creates a request to invoke BatchGetDeviceBindStatus API +func CreateBatchGetDeviceBindStatusRequest() (request *BatchGetDeviceBindStatusRequest) { + request = &BatchGetDeviceBindStatusRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BatchGetDeviceBindStatus", "Iot", "openAPI") + return +} + +// CreateBatchGetDeviceBindStatusResponse creates a response to parse from BatchGetDeviceBindStatus response +func CreateBatchGetDeviceBindStatusResponse() (response *BatchGetDeviceBindStatusResponse) { + response = &BatchGetDeviceBindStatusResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/batch_get_device_driver.go b/services/iot/batch_get_device_driver.go deleted file mode 100644 index 40f9a5f641..0000000000 --- a/services/iot/batch_get_device_driver.go +++ /dev/null @@ -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" -) - -// BatchGetDeviceDriver invokes the iot.BatchGetDeviceDriver API synchronously -// api document: https://help.aliyun.com/api/iot/batchgetdevicedriver.html -func (client *Client) BatchGetDeviceDriver(request *BatchGetDeviceDriverRequest) (response *BatchGetDeviceDriverResponse, err error) { - response = CreateBatchGetDeviceDriverResponse() - err = client.DoAction(request, response) - return -} - -// BatchGetDeviceDriverWithChan invokes the iot.BatchGetDeviceDriver API asynchronously -// api document: https://help.aliyun.com/api/iot/batchgetdevicedriver.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) BatchGetDeviceDriverWithChan(request *BatchGetDeviceDriverRequest) (<-chan *BatchGetDeviceDriverResponse, <-chan error) { - responseChan := make(chan *BatchGetDeviceDriverResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.BatchGetDeviceDriver(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// BatchGetDeviceDriverWithCallback invokes the iot.BatchGetDeviceDriver API asynchronously -// api document: https://help.aliyun.com/api/iot/batchgetdevicedriver.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) BatchGetDeviceDriverWithCallback(request *BatchGetDeviceDriverRequest, callback func(response *BatchGetDeviceDriverResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *BatchGetDeviceDriverResponse - var err error - defer close(result) - response, err = client.BatchGetDeviceDriver(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// BatchGetDeviceDriverRequest is the request struct for api BatchGetDeviceDriver -type BatchGetDeviceDriverRequest struct { - *requests.RpcRequest - IotIds *[]string `position:"Query" name:"IotIds" type:"Repeated"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` - InstanceId string `position:"Query" name:"InstanceId"` - ApiProduct string `position:"Body" name:"ApiProduct"` - ApiRevision string `position:"Body" name:"ApiRevision"` -} - -// BatchGetDeviceDriverResponse is the response struct for api BatchGetDeviceDriver -type BatchGetDeviceDriverResponse 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"` - DeviceDriverList []DeviceDriver `json:"DeviceDriverList" xml:"DeviceDriverList"` -} - -// CreateBatchGetDeviceDriverRequest creates a request to invoke BatchGetDeviceDriver API -func CreateBatchGetDeviceDriverRequest() (request *BatchGetDeviceDriverRequest) { - request = &BatchGetDeviceDriverRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Iot", "2018-01-20", "BatchGetDeviceDriver", "Iot", "openAPI") - return -} - -// CreateBatchGetDeviceDriverResponse creates a response to parse from BatchGetDeviceDriver response -func CreateBatchGetDeviceDriverResponse() (response *BatchGetDeviceDriverResponse) { - response = &BatchGetDeviceDriverResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/iot/batch_get_device_state.go b/services/iot/batch_get_device_state.go index df33de2199..595997bed4 100644 --- a/services/iot/batch_get_device_state.go +++ b/services/iot/batch_get_device_state.go @@ -76,9 +76,11 @@ func (client *Client) BatchGetDeviceStateWithCallback(request *BatchGetDeviceSta // BatchGetDeviceStateRequest is the request struct for api BatchGetDeviceState type BatchGetDeviceStateRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId *[]string `position:"Query" name:"IotId" type:"Repeated"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName *[]string `position:"Query" name:"DeviceName" type:"Repeated"` } diff --git a/services/iot/batch_get_edge_instance_channel.go b/services/iot/batch_get_edge_instance_channel.go new file mode 100644 index 0000000000..499d321a24 --- /dev/null +++ b/services/iot/batch_get_edge_instance_channel.go @@ -0,0 +1,112 @@ +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" +) + +// BatchGetEdgeInstanceChannel invokes the iot.BatchGetEdgeInstanceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancechannel.html +func (client *Client) BatchGetEdgeInstanceChannel(request *BatchGetEdgeInstanceChannelRequest) (response *BatchGetEdgeInstanceChannelResponse, err error) { + response = CreateBatchGetEdgeInstanceChannelResponse() + err = client.DoAction(request, response) + return +} + +// BatchGetEdgeInstanceChannelWithChan invokes the iot.BatchGetEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetEdgeInstanceChannelWithChan(request *BatchGetEdgeInstanceChannelRequest) (<-chan *BatchGetEdgeInstanceChannelResponse, <-chan error) { + responseChan := make(chan *BatchGetEdgeInstanceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchGetEdgeInstanceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchGetEdgeInstanceChannelWithCallback invokes the iot.BatchGetEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetEdgeInstanceChannelWithCallback(request *BatchGetEdgeInstanceChannelRequest, callback func(response *BatchGetEdgeInstanceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchGetEdgeInstanceChannelResponse + var err error + defer close(result) + response, err = client.BatchGetEdgeInstanceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchGetEdgeInstanceChannelRequest is the request struct for api BatchGetEdgeInstanceChannel +type BatchGetEdgeInstanceChannelRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + ChannelIds *[]string `position:"Query" name:"ChannelIds" type:"Repeated"` +} + +// BatchGetEdgeInstanceChannelResponse is the response struct for api BatchGetEdgeInstanceChannel +type BatchGetEdgeInstanceChannelResponse 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 DataInBatchGetEdgeInstanceChannel `json:"Data" xml:"Data"` +} + +// CreateBatchGetEdgeInstanceChannelRequest creates a request to invoke BatchGetEdgeInstanceChannel API +func CreateBatchGetEdgeInstanceChannelRequest() (request *BatchGetEdgeInstanceChannelRequest) { + request = &BatchGetEdgeInstanceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BatchGetEdgeInstanceChannel", "Iot", "openAPI") + return +} + +// CreateBatchGetEdgeInstanceChannelResponse creates a response to parse from BatchGetEdgeInstanceChannel response +func CreateBatchGetEdgeInstanceChannelResponse() (response *BatchGetEdgeInstanceChannelResponse) { + response = &BatchGetEdgeInstanceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/batch_get_edge_instance_device_channel.go b/services/iot/batch_get_edge_instance_device_channel.go new file mode 100644 index 0000000000..1e069e53fb --- /dev/null +++ b/services/iot/batch_get_edge_instance_device_channel.go @@ -0,0 +1,112 @@ +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" +) + +// BatchGetEdgeInstanceDeviceChannel invokes the iot.BatchGetEdgeInstanceDeviceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancedevicechannel.html +func (client *Client) BatchGetEdgeInstanceDeviceChannel(request *BatchGetEdgeInstanceDeviceChannelRequest) (response *BatchGetEdgeInstanceDeviceChannelResponse, err error) { + response = CreateBatchGetEdgeInstanceDeviceChannelResponse() + err = client.DoAction(request, response) + return +} + +// BatchGetEdgeInstanceDeviceChannelWithChan invokes the iot.BatchGetEdgeInstanceDeviceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancedevicechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetEdgeInstanceDeviceChannelWithChan(request *BatchGetEdgeInstanceDeviceChannelRequest) (<-chan *BatchGetEdgeInstanceDeviceChannelResponse, <-chan error) { + responseChan := make(chan *BatchGetEdgeInstanceDeviceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchGetEdgeInstanceDeviceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchGetEdgeInstanceDeviceChannelWithCallback invokes the iot.BatchGetEdgeInstanceDeviceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancedevicechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetEdgeInstanceDeviceChannelWithCallback(request *BatchGetEdgeInstanceDeviceChannelRequest, callback func(response *BatchGetEdgeInstanceDeviceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchGetEdgeInstanceDeviceChannelResponse + var err error + defer close(result) + response, err = client.BatchGetEdgeInstanceDeviceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchGetEdgeInstanceDeviceChannelRequest is the request struct for api BatchGetEdgeInstanceDeviceChannel +type BatchGetEdgeInstanceDeviceChannelRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotIds *[]string `position:"Query" name:"IotIds" type:"Repeated"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// BatchGetEdgeInstanceDeviceChannelResponse is the response struct for api BatchGetEdgeInstanceDeviceChannel +type BatchGetEdgeInstanceDeviceChannelResponse 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"` + DeviceChannelList []DeviceChannel `json:"DeviceChannelList" xml:"DeviceChannelList"` +} + +// CreateBatchGetEdgeInstanceDeviceChannelRequest creates a request to invoke BatchGetEdgeInstanceDeviceChannel API +func CreateBatchGetEdgeInstanceDeviceChannelRequest() (request *BatchGetEdgeInstanceDeviceChannelRequest) { + request = &BatchGetEdgeInstanceDeviceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BatchGetEdgeInstanceDeviceChannel", "Iot", "openAPI") + return +} + +// CreateBatchGetEdgeInstanceDeviceChannelResponse creates a response to parse from BatchGetEdgeInstanceDeviceChannel response +func CreateBatchGetEdgeInstanceDeviceChannelResponse() (response *BatchGetEdgeInstanceDeviceChannelResponse) { + response = &BatchGetEdgeInstanceDeviceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/batch_get_edge_instance_device_driver.go b/services/iot/batch_get_edge_instance_device_driver.go new file mode 100644 index 0000000000..e85244bdd0 --- /dev/null +++ b/services/iot/batch_get_edge_instance_device_driver.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" +) + +// BatchGetEdgeInstanceDeviceDriver invokes the iot.BatchGetEdgeInstanceDeviceDriver API synchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancedevicedriver.html +func (client *Client) BatchGetEdgeInstanceDeviceDriver(request *BatchGetEdgeInstanceDeviceDriverRequest) (response *BatchGetEdgeInstanceDeviceDriverResponse, err error) { + response = CreateBatchGetEdgeInstanceDeviceDriverResponse() + err = client.DoAction(request, response) + return +} + +// BatchGetEdgeInstanceDeviceDriverWithChan invokes the iot.BatchGetEdgeInstanceDeviceDriver API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancedevicedriver.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetEdgeInstanceDeviceDriverWithChan(request *BatchGetEdgeInstanceDeviceDriverRequest) (<-chan *BatchGetEdgeInstanceDeviceDriverResponse, <-chan error) { + responseChan := make(chan *BatchGetEdgeInstanceDeviceDriverResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchGetEdgeInstanceDeviceDriver(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchGetEdgeInstanceDeviceDriverWithCallback invokes the iot.BatchGetEdgeInstanceDeviceDriver API asynchronously +// api document: https://help.aliyun.com/api/iot/batchgetedgeinstancedevicedriver.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchGetEdgeInstanceDeviceDriverWithCallback(request *BatchGetEdgeInstanceDeviceDriverRequest, callback func(response *BatchGetEdgeInstanceDeviceDriverResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchGetEdgeInstanceDeviceDriverResponse + var err error + defer close(result) + response, err = client.BatchGetEdgeInstanceDeviceDriver(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchGetEdgeInstanceDeviceDriverRequest is the request struct for api BatchGetEdgeInstanceDeviceDriver +type BatchGetEdgeInstanceDeviceDriverRequest struct { + *requests.RpcRequest + IotIds *[]string `position:"Query" name:"IotIds" type:"Repeated"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// BatchGetEdgeInstanceDeviceDriverResponse is the response struct for api BatchGetEdgeInstanceDeviceDriver +type BatchGetEdgeInstanceDeviceDriverResponse 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"` + DeviceDriverList []DeviceDriver `json:"DeviceDriverList" xml:"DeviceDriverList"` +} + +// CreateBatchGetEdgeInstanceDeviceDriverRequest creates a request to invoke BatchGetEdgeInstanceDeviceDriver API +func CreateBatchGetEdgeInstanceDeviceDriverRequest() (request *BatchGetEdgeInstanceDeviceDriverRequest) { + request = &BatchGetEdgeInstanceDeviceDriverRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BatchGetEdgeInstanceDeviceDriver", "Iot", "openAPI") + return +} + +// CreateBatchGetEdgeInstanceDeviceDriverResponse creates a response to parse from BatchGetEdgeInstanceDeviceDriver response +func CreateBatchGetEdgeInstanceDeviceDriverResponse() (response *BatchGetEdgeInstanceDeviceDriverResponse) { + response = &BatchGetEdgeInstanceDeviceDriverResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/batch_query_device_detail.go b/services/iot/batch_query_device_detail.go index c440f0173a..63ef6cccba 100644 --- a/services/iot/batch_query_device_detail.go +++ b/services/iot/batch_query_device_detail.go @@ -76,8 +76,10 @@ func (client *Client) BatchQueryDeviceDetailWithCallback(request *BatchQueryDevi // BatchQueryDeviceDetailRequest is the request struct for api BatchQueryDeviceDetail type BatchQueryDeviceDetailRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName *[]string `position:"Query" name:"DeviceName" type:"Repeated"` } diff --git a/services/iot/batch_register_device.go b/services/iot/batch_register_device.go index b487cb0b2d..dbbb1dc54a 100644 --- a/services/iot/batch_register_device.go +++ b/services/iot/batch_register_device.go @@ -76,9 +76,11 @@ func (client *Client) BatchRegisterDeviceWithCallback(request *BatchRegisterDevi // BatchRegisterDeviceRequest is the request struct for api BatchRegisterDevice type BatchRegisterDeviceRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` Count requests.Integer `position:"Query" name:"Count"` ProductKey string `position:"Query" name:"ProductKey"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // BatchRegisterDeviceResponse is the response struct for api BatchRegisterDevice diff --git a/services/iot/batch_register_device_with_apply_id.go b/services/iot/batch_register_device_with_apply_id.go index cec582175d..b33c6c5cbe 100644 --- a/services/iot/batch_register_device_with_apply_id.go +++ b/services/iot/batch_register_device_with_apply_id.go @@ -76,9 +76,11 @@ func (client *Client) BatchRegisterDeviceWithApplyIdWithCallback(request *BatchR // BatchRegisterDeviceWithApplyIdRequest is the request struct for api BatchRegisterDeviceWithApplyId type BatchRegisterDeviceWithApplyIdRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductKey string `position:"Query" name:"ProductKey"` ApplyId requests.Integer `position:"Query" name:"ApplyId"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // BatchRegisterDeviceWithApplyIdResponse is the response struct for api BatchRegisterDeviceWithApplyId diff --git a/services/iot/batch_set_edge_instance_device_channel.go b/services/iot/batch_set_edge_instance_device_channel.go new file mode 100644 index 0000000000..c7645aaac1 --- /dev/null +++ b/services/iot/batch_set_edge_instance_device_channel.go @@ -0,0 +1,112 @@ +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" +) + +// BatchSetEdgeInstanceDeviceChannel invokes the iot.BatchSetEdgeInstanceDeviceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/batchsetedgeinstancedevicechannel.html +func (client *Client) BatchSetEdgeInstanceDeviceChannel(request *BatchSetEdgeInstanceDeviceChannelRequest) (response *BatchSetEdgeInstanceDeviceChannelResponse, err error) { + response = CreateBatchSetEdgeInstanceDeviceChannelResponse() + err = client.DoAction(request, response) + return +} + +// BatchSetEdgeInstanceDeviceChannelWithChan invokes the iot.BatchSetEdgeInstanceDeviceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchsetedgeinstancedevicechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchSetEdgeInstanceDeviceChannelWithChan(request *BatchSetEdgeInstanceDeviceChannelRequest) (<-chan *BatchSetEdgeInstanceDeviceChannelResponse, <-chan error) { + responseChan := make(chan *BatchSetEdgeInstanceDeviceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchSetEdgeInstanceDeviceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchSetEdgeInstanceDeviceChannelWithCallback invokes the iot.BatchSetEdgeInstanceDeviceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/batchsetedgeinstancedevicechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchSetEdgeInstanceDeviceChannelWithCallback(request *BatchSetEdgeInstanceDeviceChannelRequest, callback func(response *BatchSetEdgeInstanceDeviceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchSetEdgeInstanceDeviceChannelResponse + var err error + defer close(result) + response, err = client.BatchSetEdgeInstanceDeviceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchSetEdgeInstanceDeviceChannelRequest is the request struct for api BatchSetEdgeInstanceDeviceChannel +type BatchSetEdgeInstanceDeviceChannelRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotIds *[]string `position:"Query" name:"IotIds" type:"Repeated"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + ChannelId string `position:"Query" name:"ChannelId"` +} + +// BatchSetEdgeInstanceDeviceChannelResponse is the response struct for api BatchSetEdgeInstanceDeviceChannel +type BatchSetEdgeInstanceDeviceChannelResponse 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"` +} + +// CreateBatchSetEdgeInstanceDeviceChannelRequest creates a request to invoke BatchSetEdgeInstanceDeviceChannel API +func CreateBatchSetEdgeInstanceDeviceChannelRequest() (request *BatchSetEdgeInstanceDeviceChannelRequest) { + request = &BatchSetEdgeInstanceDeviceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BatchSetEdgeInstanceDeviceChannel", "Iot", "openAPI") + return +} + +// CreateBatchSetEdgeInstanceDeviceChannelResponse creates a response to parse from BatchSetEdgeInstanceDeviceChannel response +func CreateBatchSetEdgeInstanceDeviceChannelResponse() (response *BatchSetEdgeInstanceDeviceChannelResponse) { + response = &BatchSetEdgeInstanceDeviceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/batch_update_device_nickname.go b/services/iot/batch_update_device_nickname.go index 6b04c3f6fb..0b13305ece 100644 --- a/services/iot/batch_update_device_nickname.go +++ b/services/iot/batch_update_device_nickname.go @@ -76,8 +76,10 @@ func (client *Client) BatchUpdateDeviceNicknameWithCallback(request *BatchUpdate // BatchUpdateDeviceNicknameRequest is the request struct for api BatchUpdateDeviceNickname type BatchUpdateDeviceNicknameRequest struct { *requests.RpcRequest - DeviceNicknameInfo *[]BatchUpdateDeviceNicknameDeviceNicknameInfo `position:"Query" name:"DeviceNicknameInfo" type:"Repeated"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + DeviceNicknameInfo *[]BatchUpdateDeviceNicknameDeviceNicknameInfo `position:"Query" name:"DeviceNicknameInfo" type:"Repeated"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // BatchUpdateDeviceNicknameDeviceNicknameInfo is a repeated param struct in BatchUpdateDeviceNicknameRequest diff --git a/services/iot/bind_application_to_edge_instance.go b/services/iot/bind_application_to_edge_instance.go new file mode 100644 index 0000000000..69ffa8a43c --- /dev/null +++ b/services/iot/bind_application_to_edge_instance.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" +) + +// BindApplicationToEdgeInstance invokes the iot.BindApplicationToEdgeInstance API synchronously +// api document: https://help.aliyun.com/api/iot/bindapplicationtoedgeinstance.html +func (client *Client) BindApplicationToEdgeInstance(request *BindApplicationToEdgeInstanceRequest) (response *BindApplicationToEdgeInstanceResponse, err error) { + response = CreateBindApplicationToEdgeInstanceResponse() + err = client.DoAction(request, response) + return +} + +// BindApplicationToEdgeInstanceWithChan invokes the iot.BindApplicationToEdgeInstance API asynchronously +// api document: https://help.aliyun.com/api/iot/bindapplicationtoedgeinstance.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BindApplicationToEdgeInstanceWithChan(request *BindApplicationToEdgeInstanceRequest) (<-chan *BindApplicationToEdgeInstanceResponse, <-chan error) { + responseChan := make(chan *BindApplicationToEdgeInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BindApplicationToEdgeInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BindApplicationToEdgeInstanceWithCallback invokes the iot.BindApplicationToEdgeInstance API asynchronously +// api document: https://help.aliyun.com/api/iot/bindapplicationtoedgeinstance.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BindApplicationToEdgeInstanceWithCallback(request *BindApplicationToEdgeInstanceRequest, callback func(response *BindApplicationToEdgeInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BindApplicationToEdgeInstanceResponse + var err error + defer close(result) + response, err = client.BindApplicationToEdgeInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BindApplicationToEdgeInstanceRequest is the request struct for api BindApplicationToEdgeInstance +type BindApplicationToEdgeInstanceRequest struct { + *requests.RpcRequest + ApplicationVersion string `position:"Query" name:"ApplicationVersion"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApplicationId string `position:"Query" name:"ApplicationId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// BindApplicationToEdgeInstanceResponse is the response struct for api BindApplicationToEdgeInstance +type BindApplicationToEdgeInstanceResponse 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"` +} + +// CreateBindApplicationToEdgeInstanceRequest creates a request to invoke BindApplicationToEdgeInstance API +func CreateBindApplicationToEdgeInstanceRequest() (request *BindApplicationToEdgeInstanceRequest) { + request = &BindApplicationToEdgeInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "BindApplicationToEdgeInstance", "Iot", "openAPI") + return +} + +// CreateBindApplicationToEdgeInstanceResponse creates a response to parse from BindApplicationToEdgeInstance response +func CreateBindApplicationToEdgeInstanceResponse() (response *BindApplicationToEdgeInstanceResponse) { + response = &BindApplicationToEdgeInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/copy_thing_model.go b/services/iot/copy_thing_model.go index 8d392bd72d..031f59eabf 100644 --- a/services/iot/copy_thing_model.go +++ b/services/iot/copy_thing_model.go @@ -76,11 +76,13 @@ func (client *Client) CopyThingModelWithCallback(request *CopyThingModelRequest, // 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"` + SourceProductKey string `position:"Query" name:"SourceProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // CopyThingModelResponse is the response struct for api CopyThingModel diff --git a/services/iot/create_data_api_service.go b/services/iot/create_data_api_service.go index 7589d82dec..5677283099 100644 --- a/services/iot/create_data_api_service.go +++ b/services/iot/create_data_api_service.go @@ -77,7 +77,6 @@ func (client *Client) CreateDataAPIServiceWithCallback(request *CreateDataAPISer type CreateDataAPIServiceRequest struct { *requests.RpcRequest RequestParam *[]CreateDataAPIServiceRequestParam `position:"Body" name:"RequestParam" type:"Repeated"` - FolderId string `position:"Body" name:"FolderId"` IotInstanceId string `position:"Body" name:"IotInstanceId"` ApiPath string `position:"Body" name:"ApiPath"` TemplateSql string `position:"Body" name:"TemplateSql"` diff --git a/services/iot/create_device_group.go b/services/iot/create_device_group.go index 634ddec161..2bbf8389ce 100644 --- a/services/iot/create_device_group.go +++ b/services/iot/create_device_group.go @@ -77,9 +77,11 @@ func (client *Client) CreateDeviceGroupWithCallback(request *CreateDeviceGroupRe type CreateDeviceGroupRequest struct { *requests.RpcRequest SuperGroupId string `position:"Query" name:"SuperGroupId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` GroupName string `position:"Query" name:"GroupName"` GroupDesc string `position:"Query" name:"GroupDesc"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // CreateDeviceGroupResponse is the response struct for api CreateDeviceGroup diff --git a/services/iot/create_edge_instance_channel.go b/services/iot/create_edge_instance_channel.go new file mode 100644 index 0000000000..afd070f4b7 --- /dev/null +++ b/services/iot/create_edge_instance_channel.go @@ -0,0 +1,120 @@ +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" +) + +// CreateEdgeInstanceChannel invokes the iot.CreateEdgeInstanceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/createedgeinstancechannel.html +func (client *Client) CreateEdgeInstanceChannel(request *CreateEdgeInstanceChannelRequest) (response *CreateEdgeInstanceChannelResponse, err error) { + response = CreateCreateEdgeInstanceChannelResponse() + err = client.DoAction(request, response) + return +} + +// CreateEdgeInstanceChannelWithChan invokes the iot.CreateEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/createedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateEdgeInstanceChannelWithChan(request *CreateEdgeInstanceChannelRequest) (<-chan *CreateEdgeInstanceChannelResponse, <-chan error) { + responseChan := make(chan *CreateEdgeInstanceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateEdgeInstanceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateEdgeInstanceChannelWithCallback invokes the iot.CreateEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/createedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateEdgeInstanceChannelWithCallback(request *CreateEdgeInstanceChannelRequest, callback func(response *CreateEdgeInstanceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateEdgeInstanceChannelResponse + var err error + defer close(result) + response, err = client.CreateEdgeInstanceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateEdgeInstanceChannelRequest is the request struct for api CreateEdgeInstanceChannel +type CreateEdgeInstanceChannelRequest struct { + *requests.RpcRequest + Configs *[]CreateEdgeInstanceChannelConfigs `position:"Query" name:"Configs" type:"Repeated"` + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + ChannelName string `position:"Query" name:"ChannelName"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// CreateEdgeInstanceChannelConfigs is a repeated param struct in CreateEdgeInstanceChannelRequest +type CreateEdgeInstanceChannelConfigs struct { + Format string `name:"Format"` + Content string `name:"Content"` + Key string `name:"Key"` +} + +// CreateEdgeInstanceChannelResponse is the response struct for api CreateEdgeInstanceChannel +type CreateEdgeInstanceChannelResponse 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 string `json:"Data" xml:"Data"` +} + +// CreateCreateEdgeInstanceChannelRequest creates a request to invoke CreateEdgeInstanceChannel API +func CreateCreateEdgeInstanceChannelRequest() (request *CreateEdgeInstanceChannelRequest) { + request = &CreateEdgeInstanceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "CreateEdgeInstanceChannel", "Iot", "openAPI") + return +} + +// CreateCreateEdgeInstanceChannelResponse creates a response to parse from CreateEdgeInstanceChannel response +func CreateCreateEdgeInstanceChannelResponse() (response *CreateEdgeInstanceChannelResponse) { + response = &CreateEdgeInstanceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/create_lo_ra_nodes_task.go b/services/iot/create_lo_ra_nodes_task.go index 11ddd18b03..eb204117b9 100644 --- a/services/iot/create_lo_ra_nodes_task.go +++ b/services/iot/create_lo_ra_nodes_task.go @@ -76,9 +76,11 @@ func (client *Client) CreateLoRaNodesTaskWithCallback(request *CreateLoRaNodesTa // CreateLoRaNodesTaskRequest is the request struct for api CreateLoRaNodesTask type CreateLoRaNodesTaskRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` DeviceInfo *[]CreateLoRaNodesTaskDeviceInfo `position:"Query" name:"DeviceInfo" type:"Repeated"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // CreateLoRaNodesTaskDeviceInfo is a repeated param struct in CreateLoRaNodesTaskRequest diff --git a/services/iot/create_ota_dynamic_upgrade_job.go b/services/iot/create_ota_dynamic_upgrade_job.go index d4586088b7..01c2281384 100644 --- a/services/iot/create_ota_dynamic_upgrade_job.go +++ b/services/iot/create_ota_dynamic_upgrade_job.go @@ -77,12 +77,14 @@ func (client *Client) CreateOTADynamicUpgradeJobWithCallback(request *CreateOTAD type CreateOTADynamicUpgradeJobRequest struct { *requests.RpcRequest RetryCount requests.Integer `position:"Query" name:"RetryCount"` + TimeoutInMinutes requests.Integer `position:"Query" name:"TimeoutInMinutes"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` FirmwareId string `position:"Query" name:"FirmwareId"` ProductKey string `position:"Query" name:"ProductKey"` - TimeoutInMinutes requests.Integer `position:"Query" name:"TimeoutInMinutes"` RetryInterval requests.Integer `position:"Query" name:"RetryInterval"` SrcVersion *[]string `position:"Query" name:"SrcVersion" type:"Repeated"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` MaximumPerMinute requests.Integer `position:"Query" name:"MaximumPerMinute"` } diff --git a/services/iot/create_product.go b/services/iot/create_product.go index 846990c7e7..9bf9a5fe11 100644 --- a/services/iot/create_product.go +++ b/services/iot/create_product.go @@ -90,6 +90,8 @@ type CreateProductRequest struct { DataFormat requests.Integer `position:"Query" name:"DataFormat"` Id2 requests.Boolean `position:"Query" name:"Id2"` NetType string `position:"Query" name:"NetType"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` ProtocolType string `position:"Query" name:"ProtocolType"` } diff --git a/services/iot/create_product_tags.go b/services/iot/create_product_tags.go index d3bc9c8e53..8164e0c317 100644 --- a/services/iot/create_product_tags.go +++ b/services/iot/create_product_tags.go @@ -76,9 +76,11 @@ func (client *Client) CreateProductTagsWithCallback(request *CreateProductTagsRe // CreateProductTagsRequest is the request struct for api CreateProductTags type CreateProductTagsRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductKey string `position:"Query" name:"ProductKey"` ProductTag *[]CreateProductTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // CreateProductTagsProductTag is a repeated param struct in CreateProductTagsRequest diff --git a/services/iot/create_product_topic.go b/services/iot/create_product_topic.go index e8155f9454..19d1443abf 100644 --- a/services/iot/create_product_topic.go +++ b/services/iot/create_product_topic.go @@ -76,9 +76,11 @@ func (client *Client) CreateProductTopicWithCallback(request *CreateProductTopic // CreateProductTopicRequest is the request struct for api CreateProductTopic type CreateProductTopicRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` TopicShortName string `position:"Query" name:"TopicShortName"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` Operation string `position:"Query" name:"Operation"` Desc string `position:"Query" name:"Desc"` } diff --git a/services/iot/create_rule.go b/services/iot/create_rule.go index 556851bf57..944a2f4243 100644 --- a/services/iot/create_rule.go +++ b/services/iot/create_rule.go @@ -85,7 +85,9 @@ type CreateRuleRequest struct { Where string `position:"Query" name:"Where"` TopicType requests.Integer `position:"Query" name:"TopicType"` ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` Name string `position:"Query" name:"Name"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // CreateRuleResponse is the response struct for api CreateRule diff --git a/services/iot/create_rule_action.go b/services/iot/create_rule_action.go index 28c73d6add..f185b7b2b7 100644 --- a/services/iot/create_rule_action.go +++ b/services/iot/create_rule_action.go @@ -79,8 +79,10 @@ type CreateRuleActionRequest struct { Configuration string `position:"Query" name:"Configuration"` Type string `position:"Query" name:"Type"` IotInstanceId string `position:"Query" name:"IotInstanceId"` - RuleId requests.Integer `position:"Query" name:"RuleId"` ErrorActionFlag requests.Boolean `position:"Query" name:"ErrorActionFlag"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + RuleId requests.Integer `position:"Query" name:"RuleId"` } // CreateRuleActionResponse is the response struct for api CreateRuleAction diff --git a/services/iot/create_thing_model.go b/services/iot/create_thing_model.go index fd223f1669..dd38a06441 100644 --- a/services/iot/create_thing_model.go +++ b/services/iot/create_thing_model.go @@ -76,6 +76,7 @@ func (client *Client) CreateThingModelWithCallback(request *CreateThingModelRequ // CreateThingModelRequest is the request struct for api CreateThingModel type CreateThingModelRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductKey string `position:"Query" name:"ProductKey"` ApiProduct string `position:"Body" name:"ApiProduct"` ThingModelJson string `position:"Query" name:"ThingModelJson"` diff --git a/services/iot/delete_device.go b/services/iot/delete_device.go index fe1a03b42a..53cd8315b0 100644 --- a/services/iot/delete_device.go +++ b/services/iot/delete_device.go @@ -76,9 +76,11 @@ func (client *Client) DeleteDeviceWithCallback(request *DeleteDeviceRequest, cal // DeleteDeviceRequest is the request struct for api DeleteDevice type DeleteDeviceRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/delete_device_file.go b/services/iot/delete_device_file.go index f780da336a..a28f6a5959 100644 --- a/services/iot/delete_device_file.go +++ b/services/iot/delete_device_file.go @@ -76,11 +76,13 @@ func (client *Client) DeleteDeviceFileWithCallback(request *DeleteDeviceFileRequ // DeleteDeviceFileRequest is the request struct for api DeleteDeviceFile type DeleteDeviceFileRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` - DeviceName string `position:"Query" name:"DeviceName"` FileId string `position:"Query" name:"FileId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + DeviceName string `position:"Query" name:"DeviceName"` } // DeleteDeviceFileResponse is the response struct for api DeleteDeviceFile diff --git a/services/iot/delete_device_group.go b/services/iot/delete_device_group.go index 3f10f6650b..c44a17a497 100644 --- a/services/iot/delete_device_group.go +++ b/services/iot/delete_device_group.go @@ -76,8 +76,10 @@ func (client *Client) DeleteDeviceGroupWithCallback(request *DeleteDeviceGroupRe // DeleteDeviceGroupRequest is the request struct for api DeleteDeviceGroup type DeleteDeviceGroupRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + GroupId string `position:"Query" name:"GroupId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // DeleteDeviceGroupResponse is the response struct for api DeleteDeviceGroup diff --git a/services/iot/delete_device_prop.go b/services/iot/delete_device_prop.go index f781f90a21..65e75d7f75 100644 --- a/services/iot/delete_device_prop.go +++ b/services/iot/delete_device_prop.go @@ -76,10 +76,12 @@ func (client *Client) DeleteDevicePropWithCallback(request *DeleteDevicePropRequ // DeleteDevicePropRequest is the request struct for api DeleteDeviceProp type DeleteDevicePropRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` PropKey string `position:"Query" name:"PropKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/delete_product.go b/services/iot/delete_product.go index 2e51c68524..2d634fff0a 100644 --- a/services/iot/delete_product.go +++ b/services/iot/delete_product.go @@ -76,8 +76,10 @@ func (client *Client) DeleteProductWithCallback(request *DeleteProductRequest, c // DeleteProductRequest is the request struct for api DeleteProduct type DeleteProductRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // DeleteProductResponse is the response struct for api DeleteProduct diff --git a/services/iot/delete_product_tags.go b/services/iot/delete_product_tags.go index 8558edca71..4736cb4856 100644 --- a/services/iot/delete_product_tags.go +++ b/services/iot/delete_product_tags.go @@ -76,9 +76,11 @@ func (client *Client) DeleteProductTagsWithCallback(request *DeleteProductTagsRe // DeleteProductTagsRequest is the request struct for api DeleteProductTags type DeleteProductTagsRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductTagKey *[]string `position:"Query" name:"ProductTagKey" type:"Repeated"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // DeleteProductTagsResponse is the response struct for api DeleteProductTags diff --git a/services/iot/delete_product_topic.go b/services/iot/delete_product_topic.go index 3d24c708b7..da0dedd196 100644 --- a/services/iot/delete_product_topic.go +++ b/services/iot/delete_product_topic.go @@ -78,6 +78,8 @@ type DeleteProductTopicRequest struct { *requests.RpcRequest TopicId string `position:"Query" name:"TopicId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // DeleteProductTopicResponse is the response struct for api DeleteProductTopic diff --git a/services/iot/delete_rule.go b/services/iot/delete_rule.go index 88429f0c9b..cf9c324175 100644 --- a/services/iot/delete_rule.go +++ b/services/iot/delete_rule.go @@ -77,6 +77,8 @@ func (client *Client) DeleteRuleWithCallback(request *DeleteRuleRequest, callbac type DeleteRuleRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` RuleId requests.Integer `position:"Query" name:"RuleId"` } diff --git a/services/iot/delete_rule_action.go b/services/iot/delete_rule_action.go index add923fb50..30b9614b55 100644 --- a/services/iot/delete_rule_action.go +++ b/services/iot/delete_rule_action.go @@ -78,6 +78,8 @@ type DeleteRuleActionRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` ActionId requests.Integer `position:"Query" name:"ActionId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // DeleteRuleActionResponse is the response struct for api DeleteRuleAction diff --git a/services/iot/delete_thing_model.go b/services/iot/delete_thing_model.go index 338407fff0..4131b178b3 100644 --- a/services/iot/delete_thing_model.go +++ b/services/iot/delete_thing_model.go @@ -76,11 +76,13 @@ func (client *Client) DeleteThingModelWithCallback(request *DeleteThingModelRequ // 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"` + ServiceIdentifier *[]string `position:"Query" name:"ServiceIdentifier" type:"Repeated"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` EventIdentifier *[]string `position:"Query" name:"EventIdentifier" type:"Repeated"` } diff --git a/services/iot/delete_topic_route_table.go b/services/iot/delete_topic_route_table.go index ecd5d27eed..c9212eb263 100644 --- a/services/iot/delete_topic_route_table.go +++ b/services/iot/delete_topic_route_table.go @@ -76,8 +76,10 @@ func (client *Client) DeleteTopicRouteTableWithCallback(request *DeleteTopicRout // DeleteTopicRouteTableRequest is the request struct for api DeleteTopicRouteTable type DeleteTopicRouteTableRequest struct { *requests.RpcRequest - DstTopic *[]string `position:"Query" name:"DstTopic" type:"Repeated"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + DstTopic *[]string `position:"Query" name:"DstTopic" type:"Repeated"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` SrcTopic string `position:"Query" name:"SrcTopic"` } diff --git a/services/iot/disable_thing.go b/services/iot/disable_thing.go index 8fa0183d1f..108d282fd6 100644 --- a/services/iot/disable_thing.go +++ b/services/iot/disable_thing.go @@ -76,9 +76,11 @@ func (client *Client) DisableThingWithCallback(request *DisableThingRequest, cal // DisableThingRequest is the request struct for api DisableThing type DisableThingRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/enable_thing.go b/services/iot/enable_thing.go index c22d1eec45..e0ecebec8d 100644 --- a/services/iot/enable_thing.go +++ b/services/iot/enable_thing.go @@ -76,9 +76,11 @@ func (client *Client) EnableThingWithCallback(request *EnableThingRequest, callb // EnableThingRequest is the request struct for api EnableThing type EnableThingRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/get_device_shadow.go b/services/iot/get_device_shadow.go index 0e74b57369..95f9674375 100644 --- a/services/iot/get_device_shadow.go +++ b/services/iot/get_device_shadow.go @@ -76,9 +76,10 @@ func (client *Client) GetDeviceShadowWithCallback(request *GetDeviceShadowReques // GetDeviceShadowRequest is the request struct for api GetDeviceShadow type GetDeviceShadowRequest struct { *requests.RpcRequest - ShadowMessage string `position:"Query" name:"ShadowMessage"` - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/get_device_status.go b/services/iot/get_device_status.go index a8b974f125..66ea474659 100644 --- a/services/iot/get_device_status.go +++ b/services/iot/get_device_status.go @@ -76,9 +76,11 @@ func (client *Client) GetDeviceStatusWithCallback(request *GetDeviceStatusReques // GetDeviceStatusRequest is the request struct for api GetDeviceStatus type GetDeviceStatusRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/get_edge_instance_deployment.go b/services/iot/get_edge_instance_deployment.go index a3a49e1989..f5eade9eb9 100644 --- a/services/iot/get_edge_instance_deployment.go +++ b/services/iot/get_edge_instance_deployment.go @@ -86,11 +86,11 @@ type GetEdgeInstanceDeploymentRequest struct { // GetEdgeInstanceDeploymentResponse is the response struct for api GetEdgeInstanceDeployment type GetEdgeInstanceDeploymentResponse 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"` + 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 DataInGetEdgeInstanceDeployment `json:"Data" xml:"Data"` } // CreateGetEdgeInstanceDeploymentRequest creates a request to invoke GetEdgeInstanceDeployment API diff --git a/services/iot/get_gateway_by_sub_device.go b/services/iot/get_gateway_by_sub_device.go index c6c85d45f9..3896440955 100644 --- a/services/iot/get_gateway_by_sub_device.go +++ b/services/iot/get_gateway_by_sub_device.go @@ -76,9 +76,11 @@ func (client *Client) GetGatewayBySubDeviceWithCallback(request *GetGatewayBySub // GetGatewayBySubDeviceRequest is the request struct for api GetGatewayBySubDevice type GetGatewayBySubDeviceRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/get_lora_nodes_task.go b/services/iot/get_lora_nodes_task.go index d90d522ff7..1e3f1fd6cf 100644 --- a/services/iot/get_lora_nodes_task.go +++ b/services/iot/get_lora_nodes_task.go @@ -78,6 +78,8 @@ type GetLoraNodesTaskRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` TaskId string `position:"Query" name:"TaskId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // GetLoraNodesTaskResponse is the response struct for api GetLoraNodesTask diff --git a/services/iot/get_nodes_adding_task.go b/services/iot/get_nodes_adding_task.go index 08aaeab216..2f1a37639c 100644 --- a/services/iot/get_nodes_adding_task.go +++ b/services/iot/get_nodes_adding_task.go @@ -78,6 +78,8 @@ type GetNodesAddingTaskRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` TaskId string `position:"Query" name:"TaskId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // GetNodesAddingTaskResponse is the response struct for api GetNodesAddingTask diff --git a/services/iot/get_rule.go b/services/iot/get_rule.go index 4fd9781fec..f53f6c9e69 100644 --- a/services/iot/get_rule.go +++ b/services/iot/get_rule.go @@ -77,6 +77,8 @@ func (client *Client) GetRuleWithCallback(request *GetRuleRequest, callback func type GetRuleRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` RuleId requests.Integer `position:"Query" name:"RuleId"` } diff --git a/services/iot/get_rule_action.go b/services/iot/get_rule_action.go index e511afafa4..a008a73e67 100644 --- a/services/iot/get_rule_action.go +++ b/services/iot/get_rule_action.go @@ -78,6 +78,8 @@ type GetRuleActionRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` ActionId requests.Integer `position:"Query" name:"ActionId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // GetRuleActionResponse is the response struct for api GetRuleAction diff --git a/services/iot/get_thing_model_tsl.go b/services/iot/get_thing_model_tsl.go index 05db716eb3..acbdf50ffa 100644 --- a/services/iot/get_thing_model_tsl.go +++ b/services/iot/get_thing_model_tsl.go @@ -77,9 +77,11 @@ func (client *Client) GetThingModelTslWithCallback(request *GetThingModelTslRequ 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"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` ModelVersion string `position:"Query" name:"ModelVersion"` } diff --git a/services/iot/get_thing_template.go b/services/iot/get_thing_template.go index 15e6cef7cf..d340a01bb3 100644 --- a/services/iot/get_thing_template.go +++ b/services/iot/get_thing_template.go @@ -79,6 +79,8 @@ type GetThingTemplateRequest struct { CategoryKey string `position:"Query" name:"CategoryKey"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // GetThingTemplateResponse is the response struct for api GetThingTemplate diff --git a/services/iot/get_thing_topo.go b/services/iot/get_thing_topo.go index 75f161a244..356cdf56df 100644 --- a/services/iot/get_thing_topo.go +++ b/services/iot/get_thing_topo.go @@ -76,11 +76,13 @@ func (client *Client) GetThingTopoWithCallback(request *GetThingTopoRequest, cal // GetThingTopoRequest is the request struct for api GetThingTopo type GetThingTopoRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` - PageNo requests.Integer `position:"Query" name:"PageNo"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + ProductKey string `position:"Query" name:"ProductKey"` + PageNo requests.Integer `position:"Query" name:"PageNo"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/gis_query_device_location.go b/services/iot/gis_query_device_location.go deleted file mode 100644 index 63d7d29f48..0000000000 --- a/services/iot/gis_query_device_location.go +++ /dev/null @@ -1,110 +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" -) - -// GisQueryDeviceLocation invokes the iot.GisQueryDeviceLocation API synchronously -// api document: https://help.aliyun.com/api/iot/gisquerydevicelocation.html -func (client *Client) GisQueryDeviceLocation(request *GisQueryDeviceLocationRequest) (response *GisQueryDeviceLocationResponse, err error) { - response = CreateGisQueryDeviceLocationResponse() - err = client.DoAction(request, response) - return -} - -// GisQueryDeviceLocationWithChan invokes the iot.GisQueryDeviceLocation API asynchronously -// api document: https://help.aliyun.com/api/iot/gisquerydevicelocation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GisQueryDeviceLocationWithChan(request *GisQueryDeviceLocationRequest) (<-chan *GisQueryDeviceLocationResponse, <-chan error) { - responseChan := make(chan *GisQueryDeviceLocationResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.GisQueryDeviceLocation(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// GisQueryDeviceLocationWithCallback invokes the iot.GisQueryDeviceLocation API asynchronously -// api document: https://help.aliyun.com/api/iot/gisquerydevicelocation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GisQueryDeviceLocationWithCallback(request *GisQueryDeviceLocationRequest, callback func(response *GisQueryDeviceLocationResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *GisQueryDeviceLocationResponse - var err error - defer close(result) - response, err = client.GisQueryDeviceLocation(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// GisQueryDeviceLocationRequest is the request struct for api GisQueryDeviceLocation -type GisQueryDeviceLocationRequest struct { - *requests.RpcRequest - IotInstanceId string `position:"Query" name:"IotInstanceId"` - ThingList string `position:"Query" name:"ThingList"` - ApiProduct string `position:"Body" name:"ApiProduct"` - ApiRevision string `position:"Body" name:"ApiRevision"` -} - -// GisQueryDeviceLocationResponse is the response struct for api GisQueryDeviceLocation -type GisQueryDeviceLocationResponse 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 map[string]interface{} `json:"Data" xml:"Data"` -} - -// CreateGisQueryDeviceLocationRequest creates a request to invoke GisQueryDeviceLocation API -func CreateGisQueryDeviceLocationRequest() (request *GisQueryDeviceLocationRequest) { - request = &GisQueryDeviceLocationRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Iot", "2018-01-20", "GisQueryDeviceLocation", "Iot", "openAPI") - return -} - -// CreateGisQueryDeviceLocationResponse creates a response to parse from GisQueryDeviceLocation response -func CreateGisQueryDeviceLocationResponse() (response *GisQueryDeviceLocationResponse) { - response = &GisQueryDeviceLocationResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/iot/import_thing_model_tsl.go b/services/iot/import_thing_model_tsl.go index d336ce6443..eb65f3d39d 100644 --- a/services/iot/import_thing_model_tsl.go +++ b/services/iot/import_thing_model_tsl.go @@ -76,9 +76,11 @@ func (client *Client) ImportThingModelTslWithCallback(request *ImportThingModelT // 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"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` TslUrl string `position:"Query" name:"TslUrl"` TslStr string `position:"Query" name:"TslStr"` } diff --git a/services/iot/invoke_thing_service.go b/services/iot/invoke_thing_service.go index 770f3dacca..d450c10d97 100644 --- a/services/iot/invoke_thing_service.go +++ b/services/iot/invoke_thing_service.go @@ -76,11 +76,13 @@ func (client *Client) InvokeThingServiceWithCallback(request *InvokeThingService // InvokeThingServiceRequest is the request struct for api InvokeThingService type InvokeThingServiceRequest struct { *requests.RpcRequest + IotId string `position:"Query" name:"IotId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` Identifier string `position:"Query" name:"Identifier"` ProductKey string `position:"Query" name:"ProductKey"` Args string `position:"Query" name:"Args"` - IotId string `position:"Query" name:"IotId"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/invoke_things_service.go b/services/iot/invoke_things_service.go index 051ec4e63b..67b7a22089 100644 --- a/services/iot/invoke_things_service.go +++ b/services/iot/invoke_things_service.go @@ -76,10 +76,12 @@ func (client *Client) InvokeThingsServiceWithCallback(request *InvokeThingsServi // InvokeThingsServiceRequest is the request struct for api InvokeThingsService type InvokeThingsServiceRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` Identifier string `position:"Query" name:"Identifier"` ProductKey string `position:"Query" name:"ProductKey"` Args string `position:"Query" name:"Args"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName *[]string `position:"Query" name:"DeviceName" type:"Repeated"` } diff --git a/services/iot/list_product_by_tags.go b/services/iot/list_product_by_tags.go index da6f20a7f5..4c3fb44261 100644 --- a/services/iot/list_product_by_tags.go +++ b/services/iot/list_product_by_tags.go @@ -76,10 +76,12 @@ func (client *Client) ListProductByTagsWithCallback(request *ListProductByTagsRe // ListProductByTagsRequest is the request struct for api ListProductByTags type ListProductByTagsRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - ProductTag *[]ListProductByTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ProductTag *[]ListProductByTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // ListProductByTagsProductTag is a repeated param struct in ListProductByTagsRequest diff --git a/services/iot/list_product_tags.go b/services/iot/list_product_tags.go index a3b39f3b7e..3bbba9f563 100644 --- a/services/iot/list_product_tags.go +++ b/services/iot/list_product_tags.go @@ -76,8 +76,10 @@ func (client *Client) ListProductTagsWithCallback(request *ListProductTagsReques // ListProductTagsRequest is the request struct for api ListProductTags type ListProductTagsRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // ListProductTagsResponse is the response struct for api ListProductTags diff --git a/services/iot/list_rule.go b/services/iot/list_rule.go index ab5fb29125..1f15bacedb 100644 --- a/services/iot/list_rule.go +++ b/services/iot/list_rule.go @@ -77,10 +77,12 @@ func (client *Client) ListRuleWithCallback(request *ListRuleRequest, callback fu type ListRuleRequest struct { *requests.RpcRequest SearchName string `position:"Query" name:"SearchName"` - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // ListRuleResponse is the response struct for api ListRule diff --git a/services/iot/list_rule_actions.go b/services/iot/list_rule_actions.go index e5ff0dfaf1..f513fe04c2 100644 --- a/services/iot/list_rule_actions.go +++ b/services/iot/list_rule_actions.go @@ -77,6 +77,8 @@ func (client *Client) ListRuleActionsWithCallback(request *ListRuleActionsReques type ListRuleActionsRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` RuleId requests.Integer `position:"Query" name:"RuleId"` } diff --git a/services/iot/list_thing_model_version.go b/services/iot/list_thing_model_version.go index 59a3729513..69167b7656 100644 --- a/services/iot/list_thing_model_version.go +++ b/services/iot/list_thing_model_version.go @@ -76,19 +76,21 @@ func (client *Client) ListThingModelVersionWithCallback(request *ListThingModelV // 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"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // 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"` + 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 DataInListThingModelVersion `json:"Data" xml:"Data"` } // CreateListThingModelVersionRequest creates a request to invoke ListThingModelVersion API diff --git a/services/iot/list_thing_templates.go b/services/iot/list_thing_templates.go index c030fc3d07..6cbdafb174 100644 --- a/services/iot/list_thing_templates.go +++ b/services/iot/list_thing_templates.go @@ -78,6 +78,8 @@ type ListThingTemplatesRequest struct { *requests.RpcRequest ResourceGroupId string `position:"Query" name:"ResourceGroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // ListThingTemplatesResponse is the response struct for api ListThingTemplates diff --git a/services/iot/notify_add_thing_topo.go b/services/iot/notify_add_thing_topo.go index f156c62f95..813456dd17 100644 --- a/services/iot/notify_add_thing_topo.go +++ b/services/iot/notify_add_thing_topo.go @@ -78,9 +78,11 @@ type NotifyAddThingTopoRequest struct { *requests.RpcRequest GwProductKey string `position:"Query" name:"GwProductKey"` DeviceListStr string `position:"Query" name:"DeviceListStr"` - GwDeviceName string `position:"Query" name:"GwDeviceName"` IotInstanceId string `position:"Query" name:"IotInstanceId"` GwIotId string `position:"Query" name:"GwIotId"` + GwDeviceName string `position:"Query" name:"GwDeviceName"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // NotifyAddThingTopoResponse is the response struct for api NotifyAddThingTopo diff --git a/services/iot/pub.go b/services/iot/pub.go index b06d8fd77e..f480bd857d 100644 --- a/services/iot/pub.go +++ b/services/iot/pub.go @@ -76,11 +76,13 @@ func (client *Client) PubWithCallback(request *PubRequest, callback func(respons // PubRequest is the request struct for api Pub type PubRequest struct { *requests.RpcRequest - TopicFullName string `position:"Query" name:"TopicFullName"` MessageContent string `position:"Query" name:"MessageContent"` - ProductKey string `position:"Query" name:"ProductKey"` Qos requests.Integer `position:"Query" name:"Qos"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + TopicFullName string `position:"Query" name:"TopicFullName"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // PubResponse is the response struct for api Pub diff --git a/services/iot/pub_broadcast.go b/services/iot/pub_broadcast.go index 142a2d22be..e9231be461 100644 --- a/services/iot/pub_broadcast.go +++ b/services/iot/pub_broadcast.go @@ -76,10 +76,12 @@ func (client *Client) PubBroadcastWithCallback(request *PubBroadcastRequest, cal // PubBroadcastRequest is the request struct for api PubBroadcast type PubBroadcastRequest struct { *requests.RpcRequest - TopicFullName string `position:"Query" name:"TopicFullName"` MessageContent string `position:"Query" name:"MessageContent"` - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + TopicFullName string `position:"Query" name:"TopicFullName"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // PubBroadcastResponse is the response struct for api PubBroadcast diff --git a/services/iot/publish_thing_model.go b/services/iot/publish_thing_model.go index d8ce5dd3b2..7ef9917f9b 100644 --- a/services/iot/publish_thing_model.go +++ b/services/iot/publish_thing_model.go @@ -77,9 +77,11 @@ func (client *Client) PublishThingModelWithCallback(request *PublishThingModelRe 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"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` ModelVersion string `position:"Query" name:"ModelVersion"` } diff --git a/services/iot/query_batch_register_device_status.go b/services/iot/query_batch_register_device_status.go index a07e1665fc..629ccb3f20 100644 --- a/services/iot/query_batch_register_device_status.go +++ b/services/iot/query_batch_register_device_status.go @@ -76,9 +76,11 @@ func (client *Client) QueryBatchRegisterDeviceStatusWithCallback(request *QueryB // QueryBatchRegisterDeviceStatusRequest is the request struct for api QueryBatchRegisterDeviceStatus type QueryBatchRegisterDeviceStatusRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductKey string `position:"Query" name:"ProductKey"` ApplyId requests.Integer `position:"Query" name:"ApplyId"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryBatchRegisterDeviceStatusResponse is the response struct for api QueryBatchRegisterDeviceStatus diff --git a/services/iot/query_device.go b/services/iot/query_device.go index ab23c9592d..b2e3e154f1 100644 --- a/services/iot/query_device.go +++ b/services/iot/query_device.go @@ -76,10 +76,12 @@ func (client *Client) QueryDeviceWithCallback(request *QueryDeviceRequest, callb // QueryDeviceRequest is the request struct for api QueryDevice type QueryDeviceRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceResponse is the response struct for api QueryDevice diff --git a/services/iot/query_device_by_driver.go b/services/iot/query_device_by_driver.go deleted file mode 100644 index 6c77546e79..0000000000 --- a/services/iot/query_device_by_driver.go +++ /dev/null @@ -1,113 +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" -) - -// QueryDeviceByDriver invokes the iot.QueryDeviceByDriver API synchronously -// api document: https://help.aliyun.com/api/iot/querydevicebydriver.html -func (client *Client) QueryDeviceByDriver(request *QueryDeviceByDriverRequest) (response *QueryDeviceByDriverResponse, err error) { - response = CreateQueryDeviceByDriverResponse() - err = client.DoAction(request, response) - return -} - -// QueryDeviceByDriverWithChan invokes the iot.QueryDeviceByDriver API asynchronously -// api document: https://help.aliyun.com/api/iot/querydevicebydriver.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryDeviceByDriverWithChan(request *QueryDeviceByDriverRequest) (<-chan *QueryDeviceByDriverResponse, <-chan error) { - responseChan := make(chan *QueryDeviceByDriverResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.QueryDeviceByDriver(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// QueryDeviceByDriverWithCallback invokes the iot.QueryDeviceByDriver API asynchronously -// api document: https://help.aliyun.com/api/iot/querydevicebydriver.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) QueryDeviceByDriverWithCallback(request *QueryDeviceByDriverRequest, callback func(response *QueryDeviceByDriverResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *QueryDeviceByDriverResponse - var err error - defer close(result) - response, err = client.QueryDeviceByDriver(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// QueryDeviceByDriverRequest is the request struct for api QueryDeviceByDriver -type QueryDeviceByDriverRequest struct { - *requests.RpcRequest - DriverId string `position:"Query" name:"DriverId"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - InstanceId string `position:"Query" name:"InstanceId"` - ApiProduct string `position:"Body" name:"ApiProduct"` - ApiRevision string `position:"Body" name:"ApiRevision"` -} - -// QueryDeviceByDriverResponse is the response struct for api QueryDeviceByDriver -type QueryDeviceByDriverResponse 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 DataInQueryDeviceByDriver `json:"Data" xml:"Data"` -} - -// CreateQueryDeviceByDriverRequest creates a request to invoke QueryDeviceByDriver API -func CreateQueryDeviceByDriverRequest() (request *QueryDeviceByDriverRequest) { - request = &QueryDeviceByDriverRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Iot", "2018-01-20", "QueryDeviceByDriver", "Iot", "openAPI") - return -} - -// CreateQueryDeviceByDriverResponse creates a response to parse from QueryDeviceByDriver response -func CreateQueryDeviceByDriverResponse() (response *QueryDeviceByDriverResponse) { - response = &QueryDeviceByDriverResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/iot/query_device_by_status.go b/services/iot/query_device_by_status.go index 693c00ea01..ba4e23e427 100644 --- a/services/iot/query_device_by_status.go +++ b/services/iot/query_device_by_status.go @@ -76,11 +76,13 @@ func (client *Client) QueryDeviceByStatusWithCallback(request *QueryDeviceByStat // QueryDeviceByStatusRequest is the request struct for api QueryDeviceByStatus type QueryDeviceByStatusRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - ProductKey string `position:"Query" name:"ProductKey"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` BizTenantId string `position:"Query" name:"BizTenantId"` Status requests.Integer `position:"Query" name:"Status"` } diff --git a/services/iot/query_device_by_tags.go b/services/iot/query_device_by_tags.go index bb799bdc17..1ba285133c 100644 --- a/services/iot/query_device_by_tags.go +++ b/services/iot/query_device_by_tags.go @@ -76,10 +76,12 @@ func (client *Client) QueryDeviceByTagsWithCallback(request *QueryDeviceByTagsRe // QueryDeviceByTagsRequest is the request struct for api QueryDeviceByTags type QueryDeviceByTagsRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` Tag *[]QueryDeviceByTagsTag `position:"Query" name:"Tag" type:"Repeated"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceByTagsTag is a repeated param struct in QueryDeviceByTagsRequest diff --git a/services/iot/query_device_desired_property.go b/services/iot/query_device_desired_property.go index a15e518243..030fda9e6c 100644 --- a/services/iot/query_device_desired_property.go +++ b/services/iot/query_device_desired_property.go @@ -76,10 +76,12 @@ func (client *Client) QueryDeviceDesiredPropertyWithCallback(request *QueryDevic // QueryDeviceDesiredPropertyRequest is the request struct for api QueryDeviceDesiredProperty type QueryDeviceDesiredPropertyRequest struct { *requests.RpcRequest - Identifier *[]string `position:"Query" name:"Identifier" type:"Repeated"` - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + Identifier *[]string `position:"Query" name:"Identifier" type:"Repeated"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_detail.go b/services/iot/query_device_detail.go index 195af2b2bd..5fe973e514 100644 --- a/services/iot/query_device_detail.go +++ b/services/iot/query_device_detail.go @@ -76,9 +76,11 @@ func (client *Client) QueryDeviceDetailWithCallback(request *QueryDeviceDetailRe // QueryDeviceDetailRequest is the request struct for api QueryDeviceDetail type QueryDeviceDetailRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_event_data.go b/services/iot/query_device_event_data.go index 42bbca70f8..b3057391b2 100644 --- a/services/iot/query_device_event_data.go +++ b/services/iot/query_device_event_data.go @@ -84,8 +84,10 @@ type QueryDeviceEventDataRequest struct { EndTime requests.Integer `position:"Query" name:"EndTime"` ProductKey string `position:"Query" name:"ProductKey"` Asc requests.Integer `position:"Query" name:"Asc"` - EventType string `position:"Query" name:"EventType"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` + EventType string `position:"Query" name:"EventType"` } // QueryDeviceEventDataResponse is the response struct for api QueryDeviceEventData diff --git a/services/iot/query_device_file.go b/services/iot/query_device_file.go index 39dce4e8f6..c4f2a9ab83 100644 --- a/services/iot/query_device_file.go +++ b/services/iot/query_device_file.go @@ -76,11 +76,13 @@ func (client *Client) QueryDeviceFileWithCallback(request *QueryDeviceFileReques // QueryDeviceFileRequest is the request struct for api QueryDeviceFile type QueryDeviceFileRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` - DeviceName string `position:"Query" name:"DeviceName"` FileId string `position:"Query" name:"FileId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + DeviceName string `position:"Query" name:"DeviceName"` } // QueryDeviceFileResponse is the response struct for api QueryDeviceFile diff --git a/services/iot/query_device_file_list.go b/services/iot/query_device_file_list.go index 9ba20f0d2d..895844d3b6 100644 --- a/services/iot/query_device_file_list.go +++ b/services/iot/query_device_file_list.go @@ -76,11 +76,13 @@ func (client *Client) QueryDeviceFileListWithCallback(request *QueryDeviceFileLi // QueryDeviceFileListRequest is the request struct for api QueryDeviceFileList type QueryDeviceFileListRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_group_by_device.go b/services/iot/query_device_group_by_device.go index 082ab7f31d..a8b2244ee1 100644 --- a/services/iot/query_device_group_by_device.go +++ b/services/iot/query_device_group_by_device.go @@ -76,8 +76,10 @@ func (client *Client) QueryDeviceGroupByDeviceWithCallback(request *QueryDeviceG // QueryDeviceGroupByDeviceRequest is the request struct for api QueryDeviceGroupByDevice type QueryDeviceGroupByDeviceRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_group_by_tags.go b/services/iot/query_device_group_by_tags.go index 7aeb7c5aba..49e6e1c69f 100644 --- a/services/iot/query_device_group_by_tags.go +++ b/services/iot/query_device_group_by_tags.go @@ -76,10 +76,12 @@ func (client *Client) QueryDeviceGroupByTagsWithCallback(request *QueryDeviceGro // QueryDeviceGroupByTagsRequest is the request struct for api QueryDeviceGroupByTags type QueryDeviceGroupByTagsRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` Tag *[]QueryDeviceGroupByTagsTag `position:"Query" name:"Tag" type:"Repeated"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceGroupByTagsTag is a repeated param struct in QueryDeviceGroupByTagsRequest diff --git a/services/iot/query_device_group_info.go b/services/iot/query_device_group_info.go index c54ebaced0..e0753d6171 100644 --- a/services/iot/query_device_group_info.go +++ b/services/iot/query_device_group_info.go @@ -76,8 +76,10 @@ func (client *Client) QueryDeviceGroupInfoWithCallback(request *QueryDeviceGroup // QueryDeviceGroupInfoRequest is the request struct for api QueryDeviceGroupInfo type QueryDeviceGroupInfoRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + GroupId string `position:"Query" name:"GroupId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceGroupInfoResponse is the response struct for api QueryDeviceGroupInfo diff --git a/services/iot/query_device_group_list.go b/services/iot/query_device_group_list.go index f4d5b9ec62..1435ba5d0a 100644 --- a/services/iot/query_device_group_list.go +++ b/services/iot/query_device_group_list.go @@ -77,10 +77,12 @@ func (client *Client) QueryDeviceGroupListWithCallback(request *QueryDeviceGroup type QueryDeviceGroupListRequest struct { *requests.RpcRequest SuperGroupId string `position:"Query" name:"SuperGroupId"` - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - GroupName string `position:"Query" name:"GroupName"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + GroupName string `position:"Query" name:"GroupName"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceGroupListResponse is the response struct for api QueryDeviceGroupList diff --git a/services/iot/query_device_group_tag_list.go b/services/iot/query_device_group_tag_list.go index ab7846f527..c5d2d09225 100644 --- a/services/iot/query_device_group_tag_list.go +++ b/services/iot/query_device_group_tag_list.go @@ -76,8 +76,10 @@ func (client *Client) QueryDeviceGroupTagListWithCallback(request *QueryDeviceGr // QueryDeviceGroupTagListRequest is the request struct for api QueryDeviceGroupTagList type QueryDeviceGroupTagListRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + GroupId string `position:"Query" name:"GroupId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceGroupTagListResponse is the response struct for api QueryDeviceGroupTagList diff --git a/services/iot/query_device_list_by_device_group.go b/services/iot/query_device_list_by_device_group.go index f3599f8bb0..2280830f77 100644 --- a/services/iot/query_device_list_by_device_group.go +++ b/services/iot/query_device_list_by_device_group.go @@ -76,10 +76,12 @@ func (client *Client) QueryDeviceListByDeviceGroupWithCallback(request *QueryDev // QueryDeviceListByDeviceGroupRequest is the request struct for api QueryDeviceListByDeviceGroup type QueryDeviceListByDeviceGroupRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + GroupId string `position:"Query" name:"GroupId"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceListByDeviceGroupResponse is the response struct for api QueryDeviceListByDeviceGroup diff --git a/services/iot/query_device_prop.go b/services/iot/query_device_prop.go index 67c2d604b2..abf4d1a97f 100644 --- a/services/iot/query_device_prop.go +++ b/services/iot/query_device_prop.go @@ -76,9 +76,11 @@ func (client *Client) QueryDevicePropWithCallback(request *QueryDevicePropReques // QueryDevicePropRequest is the request struct for api QueryDeviceProp type QueryDevicePropRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_properties_data.go b/services/iot/query_device_properties_data.go index e4aaf365c5..a1bb4f21c0 100644 --- a/services/iot/query_device_properties_data.go +++ b/services/iot/query_device_properties_data.go @@ -84,6 +84,8 @@ type QueryDevicePropertiesDataRequest struct { EndTime requests.Integer `position:"Query" name:"EndTime"` ProductKey string `position:"Query" name:"ProductKey"` Asc requests.Integer `position:"Query" name:"Asc"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_property_data.go b/services/iot/query_device_property_data.go index 357485e266..c5275c7414 100644 --- a/services/iot/query_device_property_data.go +++ b/services/iot/query_device_property_data.go @@ -76,14 +76,16 @@ func (client *Client) QueryDevicePropertyDataWithCallback(request *QueryDevicePr // QueryDevicePropertyDataRequest is the request struct for api QueryDevicePropertyData type QueryDevicePropertyDataRequest struct { *requests.RpcRequest - Identifier string `position:"Query" name:"Identifier"` - EndTime requests.Integer `position:"Query" name:"EndTime"` StartTime requests.Integer `position:"Query" name:"StartTime"` - ProductKey string `position:"Query" name:"ProductKey"` - Asc requests.Integer `position:"Query" name:"Asc"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + Identifier string `position:"Query" name:"Identifier"` + EndTime requests.Integer `position:"Query" name:"EndTime"` + ProductKey string `position:"Query" name:"ProductKey"` + Asc requests.Integer `position:"Query" name:"Asc"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_property_status.go b/services/iot/query_device_property_status.go index cd0646a725..ab0f2715e7 100644 --- a/services/iot/query_device_property_status.go +++ b/services/iot/query_device_property_status.go @@ -76,9 +76,11 @@ func (client *Client) QueryDevicePropertyStatusWithCallback(request *QueryDevice // QueryDevicePropertyStatusRequest is the request struct for api QueryDevicePropertyStatus type QueryDevicePropertyStatusRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_service_data.go b/services/iot/query_device_service_data.go index e0ea578ab3..ebca9b64cd 100644 --- a/services/iot/query_device_service_data.go +++ b/services/iot/query_device_service_data.go @@ -76,14 +76,16 @@ func (client *Client) QueryDeviceServiceDataWithCallback(request *QueryDeviceSer // QueryDeviceServiceDataRequest is the request struct for api QueryDeviceServiceData type QueryDeviceServiceDataRequest struct { *requests.RpcRequest - Identifier string `position:"Query" name:"Identifier"` - EndTime requests.Integer `position:"Query" name:"EndTime"` StartTime requests.Integer `position:"Query" name:"StartTime"` - ProductKey string `position:"Query" name:"ProductKey"` - Asc requests.Integer `position:"Query" name:"Asc"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + Identifier string `position:"Query" name:"Identifier"` + EndTime requests.Integer `position:"Query" name:"EndTime"` + ProductKey string `position:"Query" name:"ProductKey"` + Asc requests.Integer `position:"Query" name:"Asc"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/query_device_statistics.go b/services/iot/query_device_statistics.go index 567956538a..24b9f2a82b 100644 --- a/services/iot/query_device_statistics.go +++ b/services/iot/query_device_statistics.go @@ -76,8 +76,10 @@ func (client *Client) QueryDeviceStatisticsWithCallback(request *QueryDeviceStat // QueryDeviceStatisticsRequest is the request struct for api QueryDeviceStatistics type QueryDeviceStatisticsRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryDeviceStatisticsResponse is the response struct for api QueryDeviceStatistics diff --git a/services/iot/query_edge_instance_channel.go b/services/iot/query_edge_instance_channel.go new file mode 100644 index 0000000000..73282516b5 --- /dev/null +++ b/services/iot/query_edge_instance_channel.go @@ -0,0 +1,114 @@ +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" +) + +// QueryEdgeInstanceChannel invokes the iot.QueryEdgeInstanceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/queryedgeinstancechannel.html +func (client *Client) QueryEdgeInstanceChannel(request *QueryEdgeInstanceChannelRequest) (response *QueryEdgeInstanceChannelResponse, err error) { + response = CreateQueryEdgeInstanceChannelResponse() + err = client.DoAction(request, response) + return +} + +// QueryEdgeInstanceChannelWithChan invokes the iot.QueryEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/queryedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryEdgeInstanceChannelWithChan(request *QueryEdgeInstanceChannelRequest) (<-chan *QueryEdgeInstanceChannelResponse, <-chan error) { + responseChan := make(chan *QueryEdgeInstanceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryEdgeInstanceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryEdgeInstanceChannelWithCallback invokes the iot.QueryEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/queryedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryEdgeInstanceChannelWithCallback(request *QueryEdgeInstanceChannelRequest, callback func(response *QueryEdgeInstanceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryEdgeInstanceChannelResponse + var err error + defer close(result) + response, err = client.QueryEdgeInstanceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryEdgeInstanceChannelRequest is the request struct for api QueryEdgeInstanceChannel +type QueryEdgeInstanceChannelRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ChannelName string `position:"Query" name:"ChannelName"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// QueryEdgeInstanceChannelResponse is the response struct for api QueryEdgeInstanceChannel +type QueryEdgeInstanceChannelResponse 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 DataInQueryEdgeInstanceChannel `json:"Data" xml:"Data"` +} + +// CreateQueryEdgeInstanceChannelRequest creates a request to invoke QueryEdgeInstanceChannel API +func CreateQueryEdgeInstanceChannelRequest() (request *QueryEdgeInstanceChannelRequest) { + request = &QueryEdgeInstanceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "QueryEdgeInstanceChannel", "Iot", "openAPI") + return +} + +// CreateQueryEdgeInstanceChannelResponse creates a response to parse from QueryEdgeInstanceChannel response +func CreateQueryEdgeInstanceChannelResponse() (response *QueryEdgeInstanceChannelResponse) { + response = &QueryEdgeInstanceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/query_edge_instance_device_by_driver.go b/services/iot/query_edge_instance_device_by_driver.go new file mode 100644 index 0000000000..da49ca4241 --- /dev/null +++ b/services/iot/query_edge_instance_device_by_driver.go @@ -0,0 +1,114 @@ +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" +) + +// QueryEdgeInstanceDeviceByDriver invokes the iot.QueryEdgeInstanceDeviceByDriver API synchronously +// api document: https://help.aliyun.com/api/iot/queryedgeinstancedevicebydriver.html +func (client *Client) QueryEdgeInstanceDeviceByDriver(request *QueryEdgeInstanceDeviceByDriverRequest) (response *QueryEdgeInstanceDeviceByDriverResponse, err error) { + response = CreateQueryEdgeInstanceDeviceByDriverResponse() + err = client.DoAction(request, response) + return +} + +// QueryEdgeInstanceDeviceByDriverWithChan invokes the iot.QueryEdgeInstanceDeviceByDriver API asynchronously +// api document: https://help.aliyun.com/api/iot/queryedgeinstancedevicebydriver.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryEdgeInstanceDeviceByDriverWithChan(request *QueryEdgeInstanceDeviceByDriverRequest) (<-chan *QueryEdgeInstanceDeviceByDriverResponse, <-chan error) { + responseChan := make(chan *QueryEdgeInstanceDeviceByDriverResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryEdgeInstanceDeviceByDriver(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryEdgeInstanceDeviceByDriverWithCallback invokes the iot.QueryEdgeInstanceDeviceByDriver API asynchronously +// api document: https://help.aliyun.com/api/iot/queryedgeinstancedevicebydriver.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) QueryEdgeInstanceDeviceByDriverWithCallback(request *QueryEdgeInstanceDeviceByDriverRequest, callback func(response *QueryEdgeInstanceDeviceByDriverResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryEdgeInstanceDeviceByDriverResponse + var err error + defer close(result) + response, err = client.QueryEdgeInstanceDeviceByDriver(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryEdgeInstanceDeviceByDriverRequest is the request struct for api QueryEdgeInstanceDeviceByDriver +type QueryEdgeInstanceDeviceByDriverRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + ChannelId string `position:"Query" name:"ChannelId"` +} + +// QueryEdgeInstanceDeviceByDriverResponse is the response struct for api QueryEdgeInstanceDeviceByDriver +type QueryEdgeInstanceDeviceByDriverResponse 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 DataInQueryEdgeInstanceDeviceByDriver `json:"Data" xml:"Data"` +} + +// CreateQueryEdgeInstanceDeviceByDriverRequest creates a request to invoke QueryEdgeInstanceDeviceByDriver API +func CreateQueryEdgeInstanceDeviceByDriverRequest() (request *QueryEdgeInstanceDeviceByDriverRequest) { + request = &QueryEdgeInstanceDeviceByDriverRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "QueryEdgeInstanceDeviceByDriver", "Iot", "openAPI") + return +} + +// CreateQueryEdgeInstanceDeviceByDriverResponse creates a response to parse from QueryEdgeInstanceDeviceByDriver response +func CreateQueryEdgeInstanceDeviceByDriverResponse() (response *QueryEdgeInstanceDeviceByDriverResponse) { + response = &QueryEdgeInstanceDeviceByDriverResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/query_lo_ra_join_permissions.go b/services/iot/query_lo_ra_join_permissions.go index c03e5acb7e..a6e458f367 100644 --- a/services/iot/query_lo_ra_join_permissions.go +++ b/services/iot/query_lo_ra_join_permissions.go @@ -77,6 +77,8 @@ func (client *Client) QueryLoRaJoinPermissionsWithCallback(request *QueryLoRaJoi type QueryLoRaJoinPermissionsRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryLoRaJoinPermissionsResponse is the response struct for api QueryLoRaJoinPermissions diff --git a/services/iot/query_ota_job.go b/services/iot/query_ota_job.go index bc5bf90cac..20b53a2852 100644 --- a/services/iot/query_ota_job.go +++ b/services/iot/query_ota_job.go @@ -89,10 +89,6 @@ type QueryOTAJobResponse struct { Success bool `json:"Success" xml:"Success"` Code string `json:"Code" xml:"Code"` ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` - Total int `json:"Total" xml:"Total"` - PageSize int `json:"PageSize" xml:"PageSize"` - PageCount int `json:"PageCount" xml:"PageCount"` - CurrentPage int `json:"CurrentPage" xml:"CurrentPage"` Data Data `json:"Data" xml:"Data"` } diff --git a/services/iot/query_page_by_apply_id.go b/services/iot/query_page_by_apply_id.go index e84acb60a6..78ee1780d7 100644 --- a/services/iot/query_page_by_apply_id.go +++ b/services/iot/query_page_by_apply_id.go @@ -76,10 +76,12 @@ func (client *Client) QueryPageByApplyIdWithCallback(request *QueryPageByApplyId // QueryPageByApplyIdRequest is the request struct for api QueryPageByApplyId type QueryPageByApplyIdRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` - ApplyId requests.Integer `position:"Query" name:"ApplyId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ApplyId requests.Integer `position:"Query" name:"ApplyId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryPageByApplyIdResponse is the response struct for api QueryPageByApplyId diff --git a/services/iot/query_product.go b/services/iot/query_product.go index 28df7395c0..d07f2e0a5f 100644 --- a/services/iot/query_product.go +++ b/services/iot/query_product.go @@ -76,8 +76,10 @@ func (client *Client) QueryProductWithCallback(request *QueryProductRequest, cal // QueryProductRequest is the request struct for api QueryProduct type QueryProductRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryProductResponse is the response struct for api QueryProduct diff --git a/services/iot/query_product_list.go b/services/iot/query_product_list.go index 4353a2d608..c839cab9a7 100644 --- a/services/iot/query_product_list.go +++ b/services/iot/query_product_list.go @@ -76,11 +76,13 @@ func (client *Client) QueryProductListWithCallback(request *QueryProductListRequ // QueryProductListRequest is the request struct for api QueryProductList type QueryProductListRequest struct { *requests.RpcRequest - CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` PageSize requests.Integer `position:"Query" name:"PageSize"` AliyunCommodityCode string `position:"Query" name:"AliyunCommodityCode"` + CurrentPage requests.Integer `position:"Query" name:"CurrentPage"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryProductListResponse is the response struct for api QueryProductList diff --git a/services/iot/query_product_topic.go b/services/iot/query_product_topic.go index 65bf73cd10..af41973129 100644 --- a/services/iot/query_product_topic.go +++ b/services/iot/query_product_topic.go @@ -76,8 +76,10 @@ func (client *Client) QueryProductTopicWithCallback(request *QueryProductTopicRe // QueryProductTopicRequest is the request struct for api QueryProductTopic type QueryProductTopicRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryProductTopicResponse is the response struct for api QueryProductTopic diff --git a/services/iot/query_super_device_group.go b/services/iot/query_super_device_group.go index e4c6579481..497d8ec4b2 100644 --- a/services/iot/query_super_device_group.go +++ b/services/iot/query_super_device_group.go @@ -76,8 +76,10 @@ func (client *Client) QuerySuperDeviceGroupWithCallback(request *QuerySuperDevic // QuerySuperDeviceGroupRequest is the request struct for api QuerySuperDeviceGroup type QuerySuperDeviceGroupRequest struct { *requests.RpcRequest - GroupId string `position:"Query" name:"GroupId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + GroupId string `position:"Query" name:"GroupId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QuerySuperDeviceGroupResponse is the response struct for api QuerySuperDeviceGroup diff --git a/services/iot/query_thing_model.go b/services/iot/query_thing_model.go index 4ed6dc0653..2bd4623cad 100644 --- a/services/iot/query_thing_model.go +++ b/services/iot/query_thing_model.go @@ -76,9 +76,11 @@ func (client *Client) QueryThingModelWithCallback(request *QueryThingModelReques // 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"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` ModelVersion string `position:"Query" name:"ModelVersion"` } diff --git a/services/iot/query_topic_reverse_route_table.go b/services/iot/query_topic_reverse_route_table.go index 0467f29a76..da4c5dad51 100644 --- a/services/iot/query_topic_reverse_route_table.go +++ b/services/iot/query_topic_reverse_route_table.go @@ -77,7 +77,9 @@ func (client *Client) QueryTopicReverseRouteTableWithCallback(request *QueryTopi type QueryTopicReverseRouteTableRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` Topic string `position:"Query" name:"Topic"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryTopicReverseRouteTableResponse is the response struct for api QueryTopicReverseRouteTable diff --git a/services/iot/query_topic_route_table.go b/services/iot/query_topic_route_table.go index b748f2a130..da3d332a7b 100644 --- a/services/iot/query_topic_route_table.go +++ b/services/iot/query_topic_route_table.go @@ -77,7 +77,9 @@ func (client *Client) QueryTopicRouteTableWithCallback(request *QueryTopicRouteT type QueryTopicRouteTableRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` Topic string `position:"Query" name:"Topic"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // QueryTopicRouteTableResponse is the response struct for api QueryTopicRouteTable diff --git a/services/iot/r_rpc.go b/services/iot/r_rpc.go index 5de16a1112..7fba11d320 100644 --- a/services/iot/r_rpc.go +++ b/services/iot/r_rpc.go @@ -76,11 +76,13 @@ func (client *Client) RRpcWithCallback(request *RRpcRequest, callback func(respo // RRpcRequest is the request struct for api RRpc type RRpcRequest struct { *requests.RpcRequest - RequestBase64Byte string `position:"Query" name:"RequestBase64Byte"` - ProductKey string `position:"Query" name:"ProductKey"` Timeout requests.Integer `position:"Query" name:"Timeout"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + RequestBase64Byte string `position:"Query" name:"RequestBase64Byte"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` Topic string `position:"Query" name:"Topic"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/register_device.go b/services/iot/register_device.go index 04845b0156..aaee4b0add 100644 --- a/services/iot/register_device.go +++ b/services/iot/register_device.go @@ -76,11 +76,13 @@ func (client *Client) RegisterDeviceWithCallback(request *RegisterDeviceRequest, // RegisterDeviceRequest is the request struct for api RegisterDevice type RegisterDeviceRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` + Nickname string `position:"Query" name:"Nickname"` PinCode string `position:"Query" name:"PinCode"` ProductKey string `position:"Query" name:"ProductKey"` DevEui string `position:"Query" name:"DevEui"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` - Nickname string `position:"Query" name:"Nickname"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/release_edge_driver_version.go b/services/iot/release_edge_driver_version.go new file mode 100644 index 0000000000..f2d3b0b8b1 --- /dev/null +++ b/services/iot/release_edge_driver_version.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" +) + +// ReleaseEdgeDriverVersion invokes the iot.ReleaseEdgeDriverVersion API synchronously +// api document: https://help.aliyun.com/api/iot/releaseedgedriverversion.html +func (client *Client) ReleaseEdgeDriverVersion(request *ReleaseEdgeDriverVersionRequest) (response *ReleaseEdgeDriverVersionResponse, err error) { + response = CreateReleaseEdgeDriverVersionResponse() + err = client.DoAction(request, response) + return +} + +// ReleaseEdgeDriverVersionWithChan invokes the iot.ReleaseEdgeDriverVersion API asynchronously +// api document: https://help.aliyun.com/api/iot/releaseedgedriverversion.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ReleaseEdgeDriverVersionWithChan(request *ReleaseEdgeDriverVersionRequest) (<-chan *ReleaseEdgeDriverVersionResponse, <-chan error) { + responseChan := make(chan *ReleaseEdgeDriverVersionResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ReleaseEdgeDriverVersion(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ReleaseEdgeDriverVersionWithCallback invokes the iot.ReleaseEdgeDriverVersion API asynchronously +// api document: https://help.aliyun.com/api/iot/releaseedgedriverversion.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ReleaseEdgeDriverVersionWithCallback(request *ReleaseEdgeDriverVersionRequest, callback func(response *ReleaseEdgeDriverVersionResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ReleaseEdgeDriverVersionResponse + var err error + defer close(result) + response, err = client.ReleaseEdgeDriverVersion(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ReleaseEdgeDriverVersionRequest is the request struct for api ReleaseEdgeDriverVersion +type ReleaseEdgeDriverVersionRequest struct { + *requests.RpcRequest + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + DriverVersion string `position:"Query" name:"DriverVersion"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// ReleaseEdgeDriverVersionResponse is the response struct for api ReleaseEdgeDriverVersion +type ReleaseEdgeDriverVersionResponse 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"` +} + +// CreateReleaseEdgeDriverVersionRequest creates a request to invoke ReleaseEdgeDriverVersion API +func CreateReleaseEdgeDriverVersionRequest() (request *ReleaseEdgeDriverVersionRequest) { + request = &ReleaseEdgeDriverVersionRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "ReleaseEdgeDriverVersion", "Iot", "openAPI") + return +} + +// CreateReleaseEdgeDriverVersionResponse creates a response to parse from ReleaseEdgeDriverVersion response +func CreateReleaseEdgeDriverVersionResponse() (response *ReleaseEdgeDriverVersionResponse) { + response = &ReleaseEdgeDriverVersionResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/remove_thing_topo.go b/services/iot/remove_thing_topo.go index 5a500a1738..ad5a199a5d 100644 --- a/services/iot/remove_thing_topo.go +++ b/services/iot/remove_thing_topo.go @@ -76,9 +76,11 @@ func (client *Client) RemoveThingTopoWithCallback(request *RemoveThingTopoReques // RemoveThingTopoRequest is the request struct for api RemoveThingTopo type RemoveThingTopoRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/replace_edge_instance_gateway.go b/services/iot/replace_edge_instance_gateway.go new file mode 100644 index 0000000000..7950d76ebf --- /dev/null +++ b/services/iot/replace_edge_instance_gateway.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" +) + +// ReplaceEdgeInstanceGateway invokes the iot.ReplaceEdgeInstanceGateway API synchronously +// api document: https://help.aliyun.com/api/iot/replaceedgeinstancegateway.html +func (client *Client) ReplaceEdgeInstanceGateway(request *ReplaceEdgeInstanceGatewayRequest) (response *ReplaceEdgeInstanceGatewayResponse, err error) { + response = CreateReplaceEdgeInstanceGatewayResponse() + err = client.DoAction(request, response) + return +} + +// ReplaceEdgeInstanceGatewayWithChan invokes the iot.ReplaceEdgeInstanceGateway API asynchronously +// api document: https://help.aliyun.com/api/iot/replaceedgeinstancegateway.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ReplaceEdgeInstanceGatewayWithChan(request *ReplaceEdgeInstanceGatewayRequest) (<-chan *ReplaceEdgeInstanceGatewayResponse, <-chan error) { + responseChan := make(chan *ReplaceEdgeInstanceGatewayResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ReplaceEdgeInstanceGateway(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ReplaceEdgeInstanceGatewayWithCallback invokes the iot.ReplaceEdgeInstanceGateway API asynchronously +// api document: https://help.aliyun.com/api/iot/replaceedgeinstancegateway.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ReplaceEdgeInstanceGatewayWithCallback(request *ReplaceEdgeInstanceGatewayRequest, callback func(response *ReplaceEdgeInstanceGatewayResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ReplaceEdgeInstanceGatewayResponse + var err error + defer close(result) + response, err = client.ReplaceEdgeInstanceGateway(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ReplaceEdgeInstanceGatewayRequest is the request struct for api ReplaceEdgeInstanceGateway +type ReplaceEdgeInstanceGatewayRequest struct { + *requests.RpcRequest + NewGatewayId string `position:"Query" name:"NewGatewayId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + InstanceId string `position:"Query" name:"InstanceId"` + CurrentGatewayId string `position:"Query" name:"CurrentGatewayId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// ReplaceEdgeInstanceGatewayResponse is the response struct for api ReplaceEdgeInstanceGateway +type ReplaceEdgeInstanceGatewayResponse 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"` +} + +// CreateReplaceEdgeInstanceGatewayRequest creates a request to invoke ReplaceEdgeInstanceGateway API +func CreateReplaceEdgeInstanceGatewayRequest() (request *ReplaceEdgeInstanceGatewayRequest) { + request = &ReplaceEdgeInstanceGatewayRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "ReplaceEdgeInstanceGateway", "Iot", "openAPI") + return +} + +// CreateReplaceEdgeInstanceGatewayResponse creates a response to parse from ReplaceEdgeInstanceGateway response +func CreateReplaceEdgeInstanceGatewayResponse() (response *ReplaceEdgeInstanceGatewayResponse) { + response = &ReplaceEdgeInstanceGatewayResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/save_device_prop.go b/services/iot/save_device_prop.go index c16d72d9d5..4807e86e35 100644 --- a/services/iot/save_device_prop.go +++ b/services/iot/save_device_prop.go @@ -76,10 +76,12 @@ func (client *Client) SaveDevicePropWithCallback(request *SaveDevicePropRequest, // SaveDevicePropRequest is the request struct for api SaveDeviceProp type SaveDevicePropRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` - Props string `position:"Query" name:"Props"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + Props string `position:"Query" name:"Props"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/set_device_desired_property.go b/services/iot/set_device_desired_property.go index 4c5577288c..1e93e3f5a9 100644 --- a/services/iot/set_device_desired_property.go +++ b/services/iot/set_device_desired_property.go @@ -76,10 +76,12 @@ func (client *Client) SetDeviceDesiredPropertyWithCallback(request *SetDeviceDes // SetDeviceDesiredPropertyRequest is the request struct for api SetDeviceDesiredProperty type SetDeviceDesiredPropertyRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` - Versions string `position:"Query" name:"Versions"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + Versions string `position:"Query" name:"Versions"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` Items string `position:"Query" name:"Items"` } diff --git a/services/iot/set_device_group_tags.go b/services/iot/set_device_group_tags.go index 673736670b..ac5eed62b3 100644 --- a/services/iot/set_device_group_tags.go +++ b/services/iot/set_device_group_tags.go @@ -76,9 +76,11 @@ func (client *Client) SetDeviceGroupTagsWithCallback(request *SetDeviceGroupTags // SetDeviceGroupTagsRequest is the request struct for api SetDeviceGroupTags type SetDeviceGroupTagsRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` TagString string `position:"Query" name:"TagString"` GroupId string `position:"Query" name:"GroupId"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // SetDeviceGroupTagsResponse is the response struct for api SetDeviceGroupTags diff --git a/services/iot/set_device_property.go b/services/iot/set_device_property.go index 91b59d9049..865f053176 100644 --- a/services/iot/set_device_property.go +++ b/services/iot/set_device_property.go @@ -76,9 +76,11 @@ func (client *Client) SetDevicePropertyWithCallback(request *SetDevicePropertyRe // SetDevicePropertyRequest is the request struct for api SetDeviceProperty type SetDevicePropertyRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotId string `position:"Query" name:"IotId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` Items string `position:"Query" name:"Items"` } diff --git a/services/iot/set_devices_property.go b/services/iot/set_devices_property.go index bdaac10ceb..e422d9ea34 100644 --- a/services/iot/set_devices_property.go +++ b/services/iot/set_devices_property.go @@ -76,8 +76,10 @@ func (client *Client) SetDevicesPropertyWithCallback(request *SetDevicesProperty // SetDevicesPropertyRequest is the request struct for api SetDevicesProperty type SetDevicesPropertyRequest struct { *requests.RpcRequest - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName *[]string `position:"Query" name:"DeviceName" type:"Repeated"` Items string `position:"Query" name:"Items"` } diff --git a/services/iot/start_rule.go b/services/iot/start_rule.go index f9fe7e7445..07fabae9b6 100644 --- a/services/iot/start_rule.go +++ b/services/iot/start_rule.go @@ -77,6 +77,8 @@ func (client *Client) StartRuleWithCallback(request *StartRuleRequest, callback type StartRuleRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` RuleId requests.Integer `position:"Query" name:"RuleId"` } diff --git a/services/iot/stop_rule.go b/services/iot/stop_rule.go index 7a209b0a08..3e86fff085 100644 --- a/services/iot/stop_rule.go +++ b/services/iot/stop_rule.go @@ -77,6 +77,8 @@ func (client *Client) StopRuleWithCallback(request *StopRuleRequest, callback fu type StopRuleRequest struct { *requests.RpcRequest IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` RuleId requests.Integer `position:"Query" name:"RuleId"` } diff --git a/services/iot/struct_channel.go b/services/iot/struct_channel.go new file mode 100644 index 0000000000..2f27c5edb9 --- /dev/null +++ b/services/iot/struct_channel.go @@ -0,0 +1,27 @@ +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. + +// Channel is a nested struct in iot response +type Channel struct { + GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` + ChannelId string `json:"ChannelId" xml:"ChannelId"` + GmtCreateTimestamp int64 `json:"GmtCreateTimestamp" xml:"GmtCreateTimestamp"` + GmtModified string `json:"GmtModified" xml:"GmtModified"` + ChannelName string `json:"ChannelName" xml:"ChannelName"` + GmtModifiedTimestamp int64 `json:"GmtModifiedTimestamp" xml:"GmtModifiedTimestamp"` + ConfigList ConfigListInBatchGetEdgeInstanceChannel `json:"ConfigList" xml:"ConfigList"` +} diff --git a/services/iot/struct_channel_list.go b/services/iot/struct_channel_list.go new file mode 100644 index 0000000000..48765aacc5 --- /dev/null +++ b/services/iot/struct_channel_list.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. + +// ChannelList is a nested struct in iot response +type ChannelList struct { + Channel []Channel `json:"Channel" xml:"Channel"` +} diff --git a/services/iot/struct_config_list_in_batch_get_edge_instance_channel.go b/services/iot/struct_config_list_in_batch_get_edge_instance_channel.go new file mode 100644 index 0000000000..de03900441 --- /dev/null +++ b/services/iot/struct_config_list_in_batch_get_edge_instance_channel.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. + +// ConfigListInBatchGetEdgeInstanceChannel is a nested struct in iot response +type ConfigListInBatchGetEdgeInstanceChannel struct { + Config []Config `json:"Config" xml:"Config"` +} diff --git a/services/iot/struct_config_list_in_batch_get_edge_instance_driver_configs.go b/services/iot/struct_config_list_in_batch_get_edge_instance_driver_configs.go new file mode 100644 index 0000000000..b69bdb86e6 --- /dev/null +++ b/services/iot/struct_config_list_in_batch_get_edge_instance_driver_configs.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. + +// ConfigListInBatchGetEdgeInstanceDriverConfigs is a nested struct in iot response +type ConfigListInBatchGetEdgeInstanceDriverConfigs struct { + Config []Config `json:"Config" xml:"Config"` +} diff --git a/services/iot/struct_config_list.go b/services/iot/struct_config_list_in_query_edge_instance_channel.go similarity index 85% rename from services/iot/struct_config_list.go rename to services/iot/struct_config_list_in_query_edge_instance_channel.go index bb8cff5d46..f3cfb146d2 100644 --- a/services/iot/struct_config_list.go +++ b/services/iot/struct_config_list_in_query_edge_instance_channel.go @@ -15,7 +15,7 @@ package iot // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// ConfigList is a nested struct in iot response -type ConfigList struct { +// ConfigListInQueryEdgeInstanceChannel is a nested struct in iot response +type ConfigListInQueryEdgeInstanceChannel struct { Config []Config `json:"Config" xml:"Config"` } diff --git a/services/iot/struct_data_in_batch_get_device_bind_status.go b/services/iot/struct_data_in_batch_get_device_bind_status.go new file mode 100644 index 0000000000..c55b8a650d --- /dev/null +++ b/services/iot/struct_data_in_batch_get_device_bind_status.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. + +// DataInBatchGetDeviceBindStatus is a nested struct in iot response +type DataInBatchGetDeviceBindStatus struct { + DeviceStatus []DeviceStatus `json:"DeviceStatus" xml:"DeviceStatus"` +} diff --git a/services/iot/struct_data_in_batch_get_edge_instance_channel.go b/services/iot/struct_data_in_batch_get_edge_instance_channel.go new file mode 100644 index 0000000000..7c6a8b4a42 --- /dev/null +++ b/services/iot/struct_data_in_batch_get_edge_instance_channel.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. + +// DataInBatchGetEdgeInstanceChannel is a nested struct in iot response +type DataInBatchGetEdgeInstanceChannel struct { + Channel []Channel `json:"Channel" xml:"Channel"` +} diff --git a/services/iot/struct_data_in_get_edge_instance_deployment.go b/services/iot/struct_data_in_get_edge_instance_deployment.go new file mode 100644 index 0000000000..f13644643f --- /dev/null +++ b/services/iot/struct_data_in_get_edge_instance_deployment.go @@ -0,0 +1,31 @@ +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. + +// DataInGetEdgeInstanceDeployment is a nested struct in iot response +type DataInGetEdgeInstanceDeployment struct { + GmtCreate string `json:"GmtCreate" xml:"GmtCreate"` + GmtModified string `json:"GmtModified" xml:"GmtModified"` + GmtCompleted string `json:"GmtCompleted" xml:"GmtCompleted"` + DeploymentId string `json:"DeploymentId" xml:"DeploymentId"` + Description string `json:"Description" xml:"Description"` + Status int `json:"Status" xml:"Status"` + Type string `json:"Type" xml:"Type"` + GmtCreateTimestamp int64 `json:"GmtCreateTimestamp" xml:"GmtCreateTimestamp"` + GmtModifiedTimestamp int64 `json:"GmtModifiedTimestamp" xml:"GmtModifiedTimestamp"` + GmtCompletedTimestamp int64 `json:"GmtCompletedTimestamp" xml:"GmtCompletedTimestamp"` + TaskList []Task `json:"TaskList" xml:"TaskList"` +} diff --git a/services/iot/struct_data_in_list_thing_model_version.go b/services/iot/struct_data_in_list_thing_model_version.go new file mode 100644 index 0000000000..c716041117 --- /dev/null +++ b/services/iot/struct_data_in_list_thing_model_version.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. + +// DataInListThingModelVersion is a nested struct in iot response +type DataInListThingModelVersion struct { + ModelVersions []ModelVersion `json:"ModelVersions" xml:"ModelVersions"` +} diff --git a/services/iot/struct_data_in_query_edge_instance_channel.go b/services/iot/struct_data_in_query_edge_instance_channel.go new file mode 100644 index 0000000000..c7a94029b9 --- /dev/null +++ b/services/iot/struct_data_in_query_edge_instance_channel.go @@ -0,0 +1,24 @@ +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. + +// DataInQueryEdgeInstanceChannel is a nested struct in iot response +type DataInQueryEdgeInstanceChannel struct { + Total int `json:"Total" xml:"Total"` + PageSize int `json:"PageSize" xml:"PageSize"` + CurrentPage int `json:"CurrentPage" xml:"CurrentPage"` + ChannelList ChannelList `json:"ChannelList" xml:"ChannelList"` +} diff --git a/services/iot/struct_data_in_query_device_by_driver.go b/services/iot/struct_data_in_query_edge_instance_device_by_driver.go similarity index 87% rename from services/iot/struct_data_in_query_device_by_driver.go rename to services/iot/struct_data_in_query_edge_instance_device_by_driver.go index 4c4980c0e5..753017e81f 100644 --- a/services/iot/struct_data_in_query_device_by_driver.go +++ b/services/iot/struct_data_in_query_edge_instance_device_by_driver.go @@ -15,8 +15,8 @@ package iot // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DataInQueryDeviceByDriver is a nested struct in iot response -type DataInQueryDeviceByDriver struct { +// DataInQueryEdgeInstanceDeviceByDriver is a nested struct in iot response +type DataInQueryEdgeInstanceDeviceByDriver struct { Total int `json:"Total" xml:"Total"` PageSize int `json:"PageSize" xml:"PageSize"` CurrentPage int `json:"CurrentPage" xml:"CurrentPage"` diff --git a/services/iot/struct_device_channel.go b/services/iot/struct_device_channel.go new file mode 100644 index 0000000000..045930c67a --- /dev/null +++ b/services/iot/struct_device_channel.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. + +// DeviceChannel is a nested struct in iot response +type DeviceChannel struct { + ChannelId string `json:"ChannelId" xml:"ChannelId"` + ChannelName string `json:"ChannelName" xml:"ChannelName"` + IotId string `json:"IotId" xml:"IotId"` +} diff --git a/services/iot/struct_device_channel_list.go b/services/iot/struct_device_channel_list.go new file mode 100644 index 0000000000..6e8e0ffc43 --- /dev/null +++ b/services/iot/struct_device_channel_list.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. + +// DeviceChannelList is a nested struct in iot response +type DeviceChannelList struct { + DeviceChannel []DeviceChannel `json:"DeviceChannel" xml:"DeviceChannel"` +} diff --git a/services/iot/struct_device_list_in_query_device_by_driver.go b/services/iot/struct_device_list_in_query_edge_instance_device_by_driver.go similarity index 84% rename from services/iot/struct_device_list_in_query_device_by_driver.go rename to services/iot/struct_device_list_in_query_edge_instance_device_by_driver.go index 992ce21857..4cde826db6 100644 --- a/services/iot/struct_device_list_in_query_device_by_driver.go +++ b/services/iot/struct_device_list_in_query_edge_instance_device_by_driver.go @@ -15,7 +15,7 @@ package iot // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DeviceListInQueryDeviceByDriver is a nested struct in iot response -type DeviceListInQueryDeviceByDriver struct { +// DeviceListInQueryEdgeInstanceDeviceByDriver is a nested struct in iot response +type DeviceListInQueryEdgeInstanceDeviceByDriver struct { Device []Device `json:"Device" xml:"Device"` } diff --git a/services/iot/struct_device_status.go b/services/iot/struct_device_status.go index 382fba832e..9bd9e9748d 100644 --- a/services/iot/struct_device_status.go +++ b/services/iot/struct_device_status.go @@ -17,10 +17,11 @@ package iot // DeviceStatus is a nested struct in iot response type DeviceStatus struct { - DeviceId string `json:"DeviceId" xml:"DeviceId"` DeviceName string `json:"DeviceName" xml:"DeviceName"` - Status string `json:"Status" xml:"Status"` + IotId string `json:"IotId" xml:"IotId"` AsAddress string `json:"AsAddress" xml:"AsAddress"` LastOnlineTime string `json:"LastOnlineTime" xml:"LastOnlineTime"` - IotId string `json:"IotId" xml:"IotId"` + DeviceId string `json:"DeviceId" xml:"DeviceId"` + Status string `json:"Status" xml:"Status"` + BindStatus int `json:"BindStatus" xml:"BindStatus"` } diff --git a/services/iot/struct_dst_topics.go b/services/iot/struct_dst_topics.go index b900276435..c337804cf1 100644 --- a/services/iot/struct_dst_topics.go +++ b/services/iot/struct_dst_topics.go @@ -17,5 +17,5 @@ package iot // DstTopics is a nested struct in iot response type DstTopics struct { - Topic []string `json:"Topic" xml:"Topic"` + Topic []map[string]interface{} `json:"Topic" xml:"Topic"` } diff --git a/services/iot/struct_failure_topics_in_delete_topic_route_table.go b/services/iot/struct_failure_topics_in_delete_topic_route_table.go index 20fbf9f84f..4b7d737ac1 100644 --- a/services/iot/struct_failure_topics_in_delete_topic_route_table.go +++ b/services/iot/struct_failure_topics_in_delete_topic_route_table.go @@ -17,5 +17,5 @@ package iot // FailureTopicsInDeleteTopicRouteTable is a nested struct in iot response type FailureTopicsInDeleteTopicRouteTable struct { - Topic []string `json:"Topic" xml:"Topic"` + Topic []map[string]interface{} `json:"Topic" xml:"Topic"` } diff --git a/services/iot/struct_invalid_device_name_list.go b/services/iot/struct_invalid_device_name_list.go index d53412e4fb..51cc590ec2 100644 --- a/services/iot/struct_invalid_device_name_list.go +++ b/services/iot/struct_invalid_device_name_list.go @@ -17,5 +17,5 @@ package iot // InvalidDeviceNameList is a nested struct in iot response type InvalidDeviceNameList struct { - InvalidDeviceName []string `json:"InvalidDeviceName" xml:"InvalidDeviceName"` + InvalidDeviceName []map[string]interface{} `json:"InvalidDeviceName" xml:"InvalidDeviceName"` } diff --git a/services/iot/struct_invalid_list.go b/services/iot/struct_invalid_list.go index 8a35819eff..ee8ec72359 100644 --- a/services/iot/struct_invalid_list.go +++ b/services/iot/struct_invalid_list.go @@ -17,5 +17,5 @@ package iot // InvalidList is a nested struct in iot response type InvalidList struct { - Name []string `json:"Name" xml:"Name"` + Name []map[string]interface{} `json:"Name" xml:"Name"` } diff --git a/services/iot/struct_src_topics.go b/services/iot/struct_src_topics.go index d91cf9dd19..8de7446c81 100644 --- a/services/iot/struct_src_topics.go +++ b/services/iot/struct_src_topics.go @@ -17,5 +17,5 @@ package iot // SrcTopics is a nested struct in iot response type SrcTopics struct { - Topic []string `json:"Topic" xml:"Topic"` + Topic []map[string]interface{} `json:"Topic" xml:"Topic"` } diff --git a/services/iot/struct_valid_list.go b/services/iot/struct_valid_list.go index d3c7e74819..b719af0b65 100644 --- a/services/iot/struct_valid_list.go +++ b/services/iot/struct_valid_list.go @@ -17,5 +17,5 @@ package iot // ValidList is a nested struct in iot response type ValidList struct { - Name []string `json:"Name" xml:"Name"` + Name []map[string]interface{} `json:"Name" xml:"Name"` } diff --git a/services/iot/unbind_application_from_edge_instance.go b/services/iot/unbind_application_from_edge_instance.go new file mode 100644 index 0000000000..2d898e61ff --- /dev/null +++ b/services/iot/unbind_application_from_edge_instance.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" +) + +// UnbindApplicationFromEdgeInstance invokes the iot.UnbindApplicationFromEdgeInstance API synchronously +// api document: https://help.aliyun.com/api/iot/unbindapplicationfromedgeinstance.html +func (client *Client) UnbindApplicationFromEdgeInstance(request *UnbindApplicationFromEdgeInstanceRequest) (response *UnbindApplicationFromEdgeInstanceResponse, err error) { + response = CreateUnbindApplicationFromEdgeInstanceResponse() + err = client.DoAction(request, response) + return +} + +// UnbindApplicationFromEdgeInstanceWithChan invokes the iot.UnbindApplicationFromEdgeInstance API asynchronously +// api document: https://help.aliyun.com/api/iot/unbindapplicationfromedgeinstance.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UnbindApplicationFromEdgeInstanceWithChan(request *UnbindApplicationFromEdgeInstanceRequest) (<-chan *UnbindApplicationFromEdgeInstanceResponse, <-chan error) { + responseChan := make(chan *UnbindApplicationFromEdgeInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UnbindApplicationFromEdgeInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UnbindApplicationFromEdgeInstanceWithCallback invokes the iot.UnbindApplicationFromEdgeInstance API asynchronously +// api document: https://help.aliyun.com/api/iot/unbindapplicationfromedgeinstance.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UnbindApplicationFromEdgeInstanceWithCallback(request *UnbindApplicationFromEdgeInstanceRequest, callback func(response *UnbindApplicationFromEdgeInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UnbindApplicationFromEdgeInstanceResponse + var err error + defer close(result) + response, err = client.UnbindApplicationFromEdgeInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UnbindApplicationFromEdgeInstanceRequest is the request struct for api UnbindApplicationFromEdgeInstance +type UnbindApplicationFromEdgeInstanceRequest struct { + *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApplicationId string `position:"Query" name:"ApplicationId"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` +} + +// UnbindApplicationFromEdgeInstanceResponse is the response struct for api UnbindApplicationFromEdgeInstance +type UnbindApplicationFromEdgeInstanceResponse 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"` +} + +// CreateUnbindApplicationFromEdgeInstanceRequest creates a request to invoke UnbindApplicationFromEdgeInstance API +func CreateUnbindApplicationFromEdgeInstanceRequest() (request *UnbindApplicationFromEdgeInstanceRequest) { + request = &UnbindApplicationFromEdgeInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "UnbindApplicationFromEdgeInstance", "Iot", "openAPI") + return +} + +// CreateUnbindApplicationFromEdgeInstanceResponse creates a response to parse from UnbindApplicationFromEdgeInstance response +func CreateUnbindApplicationFromEdgeInstanceResponse() (response *UnbindApplicationFromEdgeInstanceResponse) { + response = &UnbindApplicationFromEdgeInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/update_device_group.go b/services/iot/update_device_group.go index a006177557..1ea8698942 100644 --- a/services/iot/update_device_group.go +++ b/services/iot/update_device_group.go @@ -76,9 +76,11 @@ func (client *Client) UpdateDeviceGroupWithCallback(request *UpdateDeviceGroupRe // UpdateDeviceGroupRequest is the request struct for api UpdateDeviceGroup type UpdateDeviceGroupRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` GroupId string `position:"Query" name:"GroupId"` GroupDesc string `position:"Query" name:"GroupDesc"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // UpdateDeviceGroupResponse is the response struct for api UpdateDeviceGroup diff --git a/services/iot/update_device_shadow.go b/services/iot/update_device_shadow.go index c75efc495e..d8a5e13a51 100644 --- a/services/iot/update_device_shadow.go +++ b/services/iot/update_device_shadow.go @@ -77,8 +77,10 @@ func (client *Client) UpdateDeviceShadowWithCallback(request *UpdateDeviceShadow type UpdateDeviceShadowRequest struct { *requests.RpcRequest ShadowMessage string `position:"Query" name:"ShadowMessage"` - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` DeviceName string `position:"Query" name:"DeviceName"` } diff --git a/services/iot/update_edge_instance_channel.go b/services/iot/update_edge_instance_channel.go new file mode 100644 index 0000000000..32d9f6e639 --- /dev/null +++ b/services/iot/update_edge_instance_channel.go @@ -0,0 +1,120 @@ +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" +) + +// UpdateEdgeInstanceChannel invokes the iot.UpdateEdgeInstanceChannel API synchronously +// api document: https://help.aliyun.com/api/iot/updateedgeinstancechannel.html +func (client *Client) UpdateEdgeInstanceChannel(request *UpdateEdgeInstanceChannelRequest) (response *UpdateEdgeInstanceChannelResponse, err error) { + response = CreateUpdateEdgeInstanceChannelResponse() + err = client.DoAction(request, response) + return +} + +// UpdateEdgeInstanceChannelWithChan invokes the iot.UpdateEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/updateedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateEdgeInstanceChannelWithChan(request *UpdateEdgeInstanceChannelRequest) (<-chan *UpdateEdgeInstanceChannelResponse, <-chan error) { + responseChan := make(chan *UpdateEdgeInstanceChannelResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateEdgeInstanceChannel(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateEdgeInstanceChannelWithCallback invokes the iot.UpdateEdgeInstanceChannel API asynchronously +// api document: https://help.aliyun.com/api/iot/updateedgeinstancechannel.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateEdgeInstanceChannelWithCallback(request *UpdateEdgeInstanceChannelRequest, callback func(response *UpdateEdgeInstanceChannelResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateEdgeInstanceChannelResponse + var err error + defer close(result) + response, err = client.UpdateEdgeInstanceChannel(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateEdgeInstanceChannelRequest is the request struct for api UpdateEdgeInstanceChannel +type UpdateEdgeInstanceChannelRequest struct { + *requests.RpcRequest + Configs *[]UpdateEdgeInstanceChannelConfigs `position:"Query" name:"Configs" type:"Repeated"` + DriverId string `position:"Query" name:"DriverId"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` + ChannelName string `position:"Query" name:"ChannelName"` + InstanceId string `position:"Query" name:"InstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + ChannelId string `position:"Query" name:"ChannelId"` +} + +// UpdateEdgeInstanceChannelConfigs is a repeated param struct in UpdateEdgeInstanceChannelRequest +type UpdateEdgeInstanceChannelConfigs struct { + Format string `name:"Format"` + Content string `name:"Content"` + Key string `name:"Key"` +} + +// UpdateEdgeInstanceChannelResponse is the response struct for api UpdateEdgeInstanceChannel +type UpdateEdgeInstanceChannelResponse 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"` +} + +// CreateUpdateEdgeInstanceChannelRequest creates a request to invoke UpdateEdgeInstanceChannel API +func CreateUpdateEdgeInstanceChannelRequest() (request *UpdateEdgeInstanceChannelRequest) { + request = &UpdateEdgeInstanceChannelRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Iot", "2018-01-20", "UpdateEdgeInstanceChannel", "Iot", "openAPI") + return +} + +// CreateUpdateEdgeInstanceChannelResponse creates a response to parse from UpdateEdgeInstanceChannel response +func CreateUpdateEdgeInstanceChannelResponse() (response *UpdateEdgeInstanceChannelResponse) { + response = &UpdateEdgeInstanceChannelResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/iot/update_product.go b/services/iot/update_product.go index 530ca50044..4aee5ea99b 100644 --- a/services/iot/update_product.go +++ b/services/iot/update_product.go @@ -77,9 +77,11 @@ func (client *Client) UpdateProductWithCallback(request *UpdateProductRequest, c type UpdateProductRequest struct { *requests.RpcRequest Description string `position:"Query" name:"Description"` - ProductKey string `position:"Query" name:"ProductKey"` IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductName string `position:"Query" name:"ProductName"` + ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // UpdateProductResponse is the response struct for api UpdateProduct diff --git a/services/iot/update_product_filter_config.go b/services/iot/update_product_filter_config.go index 388363413b..d8fe09bf84 100644 --- a/services/iot/update_product_filter_config.go +++ b/services/iot/update_product_filter_config.go @@ -77,6 +77,7 @@ func (client *Client) UpdateProductFilterConfigWithCallback(request *UpdateProdu type UpdateProductFilterConfigRequest struct { *requests.RpcRequest PropertyTimestampFilter requests.Boolean `position:"Query" name:"PropertyTimestampFilter"` + IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductKey string `position:"Query" name:"ProductKey"` ApiProduct string `position:"Body" name:"ApiProduct"` ApiRevision string `position:"Body" name:"ApiRevision"` diff --git a/services/iot/update_product_tags.go b/services/iot/update_product_tags.go index 2cc98a839c..330a1fe2b0 100644 --- a/services/iot/update_product_tags.go +++ b/services/iot/update_product_tags.go @@ -76,9 +76,11 @@ func (client *Client) UpdateProductTagsWithCallback(request *UpdateProductTagsRe // UpdateProductTagsRequest is the request struct for api UpdateProductTags type UpdateProductTagsRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` ProductKey string `position:"Query" name:"ProductKey"` ProductTag *[]UpdateProductTagsProductTag `position:"Query" name:"ProductTag" type:"Repeated"` - IotInstanceId string `position:"Query" name:"IotInstanceId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // UpdateProductTagsProductTag is a repeated param struct in UpdateProductTagsRequest diff --git a/services/iot/update_product_topic.go b/services/iot/update_product_topic.go index a75d886cf6..2878ea1687 100644 --- a/services/iot/update_product_topic.go +++ b/services/iot/update_product_topic.go @@ -78,8 +78,10 @@ type UpdateProductTopicRequest struct { *requests.RpcRequest TopicId string `position:"Query" name:"TopicId"` IotInstanceId string `position:"Query" name:"IotInstanceId"` - Operation string `position:"Query" name:"Operation"` TopicShortName string `position:"Query" name:"TopicShortName"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` + Operation string `position:"Query" name:"Operation"` Desc string `position:"Query" name:"Desc"` } diff --git a/services/iot/update_rule.go b/services/iot/update_rule.go index e3b8c3deec..44ce948596 100644 --- a/services/iot/update_rule.go +++ b/services/iot/update_rule.go @@ -83,7 +83,9 @@ type UpdateRuleRequest struct { Where string `position:"Query" name:"Where"` TopicType requests.Integer `position:"Query" name:"TopicType"` ProductKey string `position:"Query" name:"ProductKey"` + ApiProduct string `position:"Body" name:"ApiProduct"` Name string `position:"Query" name:"Name"` + ApiRevision string `position:"Body" name:"ApiRevision"` RuleId requests.Integer `position:"Query" name:"RuleId"` } diff --git a/services/iot/update_rule_action.go b/services/iot/update_rule_action.go index e3e2c727b9..528f913d3e 100644 --- a/services/iot/update_rule_action.go +++ b/services/iot/update_rule_action.go @@ -80,6 +80,8 @@ type UpdateRuleActionRequest struct { Type string `position:"Query" name:"Type"` IotInstanceId string `position:"Query" name:"IotInstanceId"` ActionId requests.Integer `position:"Query" name:"ActionId"` + ApiProduct string `position:"Body" name:"ApiProduct"` + ApiRevision string `position:"Body" name:"ApiRevision"` } // UpdateRuleActionResponse is the response struct for api UpdateRuleAction diff --git a/services/iot/update_thing_model.go b/services/iot/update_thing_model.go index ab3ce31cf2..e33a52cd2c 100644 --- a/services/iot/update_thing_model.go +++ b/services/iot/update_thing_model.go @@ -76,6 +76,7 @@ func (client *Client) UpdateThingModelWithCallback(request *UpdateThingModelRequ // UpdateThingModelRequest is the request struct for api UpdateThingModel type UpdateThingModelRequest struct { *requests.RpcRequest + IotInstanceId string `position:"Query" name:"IotInstanceId"` Identifier string `position:"Query" name:"Identifier"` ProductKey string `position:"Query" name:"ProductKey"` ApiProduct string `position:"Body" name:"ApiProduct"`