public async Task <OkrOpenRecommendResponse> OkrOpenRecommendAsync(OkrOpenRecommendRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); OkrOpenRecommendHeaders headers = new OkrOpenRecommendHeaders(); return(await OkrOpenRecommendWithOptionsAsync(request, headers, runtime)); }
public OkrOpenRecommendResponse OkrOpenRecommend(OkrOpenRecommendRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); OkrOpenRecommendHeaders headers = new OkrOpenRecommendHeaders(); return(OkrOpenRecommendWithOptions(request, headers, runtime)); }
public OkrOpenRecommendResponse OkrOpenRecommendWithOptions(OkrOpenRecommendRequest request, OkrOpenRecommendHeaders 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.CandidateOkrItems)) { body["candidateOkrItems"] = request.CandidateOkrItems; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.CorpId)) { body["corpId"] = request.CorpId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.DeptIds)) { body["deptIds"] = request.DeptIds; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.IsvAppId)) { body["isvAppId"] = request.IsvAppId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.UserId)) { body["userId"] = request.UserId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Words)) { body["words"] = request.Words; } 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 <OkrOpenRecommendResponse>(DoROARequest("OkrOpenRecommend", "algo_1.0", "HTTP", "POST", "AK", "/v1.0/algo/okrs/recommend", "json", req, runtime))); }