Example #1
0
        public async Task <BatchDeleteDeviceResponse> BatchDeleteDeviceAsync(BatchDeleteDeviceRequest request)
        {
            AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
            BatchDeleteDeviceHeaders headers = new BatchDeleteDeviceHeaders();

            return(await BatchDeleteDeviceWithOptionsAsync(request, headers, runtime));
        }
Example #2
0
        public BatchDeleteDeviceResponse BatchDeleteDevice(BatchDeleteDeviceRequest request)
        {
            AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions();
            BatchDeleteDeviceHeaders headers = new BatchDeleteDeviceHeaders();

            return(BatchDeleteDeviceWithOptions(request, headers, runtime));
        }
Example #3
0
        public async Task <BatchDeleteDeviceResponse> BatchDeleteDeviceWithOptionsAsync(BatchDeleteDeviceRequest request, BatchDeleteDeviceHeaders 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.DeviceIds))
            {
                body["deviceIds"] = request.DeviceIds;
            }
            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 <BatchDeleteDeviceResponse>(await DoROARequestAsync("BatchDeleteDevice", "diot_1.0", "HTTP", "POST", "AK", "/v1.0/diot/devices/remove", "json", req, runtime)));
        }