public async Task <BatchUpdateDeviceResponse> BatchUpdateDeviceAsync(BatchUpdateDeviceRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); BatchUpdateDeviceHeaders headers = new BatchUpdateDeviceHeaders(); return(await BatchUpdateDeviceWithOptionsAsync(request, headers, runtime)); }
public BatchUpdateDeviceResponse BatchUpdateDevice(BatchUpdateDeviceRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); BatchUpdateDeviceHeaders headers = new BatchUpdateDeviceHeaders(); return(BatchUpdateDeviceWithOptions(request, headers, runtime)); }
public async Task <BatchUpdateDeviceResponse> BatchUpdateDeviceWithOptionsAsync(BatchUpdateDeviceRequest request, BatchUpdateDeviceHeaders headers, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); Dictionary <string, object> body = new Dictionary <string, object>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.CorpId)) { body["corpId"] = request.CorpId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Devices)) { body["devices"] = request.Devices; } Dictionary <string, string> realHeaders = new Dictionary <string, string>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders)) { realHeaders = headers.CommonHeaders; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XAcsDingtalkAccessToken); } AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest { Headers = realHeaders, Body = AlibabaCloud.OpenApiUtil.Client.ParseToMap(body), }; return(TeaModel.ToObject <BatchUpdateDeviceResponse>(await DoROARequestAsync("BatchUpdateDevice", "diot_1.0", "HTTP", "PUT", "AK", "/v1.0/diot/devices/batch", "json", req, runtime))); }