public async Task <BatchSendOTOResponse> BatchSendOTOAsync(BatchSendOTORequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); BatchSendOTOHeaders headers = new BatchSendOTOHeaders(); return(await BatchSendOTOWithOptionsAsync(request, headers, runtime)); }
public BatchSendOTOResponse BatchSendOTO(BatchSendOTORequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); BatchSendOTOHeaders headers = new BatchSendOTOHeaders(); return(BatchSendOTOWithOptions(request, headers, runtime)); }
public async Task <BatchSendOTOResponse> BatchSendOTOWithOptionsAsync(BatchSendOTORequest request, BatchSendOTOHeaders 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.MsgKey)) { body["msgKey"] = request.MsgKey; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MsgParam)) { body["msgParam"] = request.MsgParam; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.RobotCode)) { body["robotCode"] = request.RobotCode; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.UserIds)) { body["userIds"] = request.UserIds; } 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 <BatchSendOTOResponse>(await DoROARequestAsync("BatchSendOTO", "robot_1.0", "HTTP", "POST", "AK", "/v1.0/robot/oToMessages/batchSend", "json", req, runtime))); }