public async Task <RemoveAttendeeResponse> RemoveAttendeeAsync(string userId, string calendarId, string eventId, RemoveAttendeeRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); RemoveAttendeeHeaders headers = new RemoveAttendeeHeaders(); return(await RemoveAttendeeWithOptionsAsync(userId, calendarId, eventId, request, headers, runtime)); }
public async Task <RemoveAttendeeResponse> RemoveAttendeeWithOptionsAsync(string userId, string calendarId, string eventId, RemoveAttendeeRequest request, RemoveAttendeeHeaders 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.AttendeesToRemove)) { body["attendeesToRemove"] = request.AttendeesToRemove; } 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"] = headers.XAcsDingtalkAccessToken; } AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest { Headers = realHeaders, Body = AlibabaCloud.OpenApiUtil.Client.ParseToMap(body), }; return(TeaModel.ToObject <RemoveAttendeeResponse>(await DoROARequestAsync("RemoveAttendee", "calendar_1.0", "HTTP", "POST", "AK", "/v1.0/calendar/users/" + userId + "/calendars/" + calendarId + "/events/" + eventId + "/attendees/batchRemove", "none", req, runtime))); }