
com.larksuite.oapi.service.human_authentication.v1.HumanAuthenticationService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of larksuite-oapi Show documentation
Show all versions of larksuite-oapi Show documentation
Larksuite open platform facilitates the integration of enterprise applications and larksuite, making
collaboration and management more efficient
// Code generated by lark suite oapi sdk gen
package com.larksuite.oapi.service.human_authentication.v1;
import com.larksuite.oapi.core.api.AccessTokenType;
import com.larksuite.oapi.core.api.Api;
import com.larksuite.oapi.core.api.ReqCaller;
import com.larksuite.oapi.core.api.request.*;
import com.larksuite.oapi.core.api.response.*;
import com.larksuite.oapi.core.Config;
import com.larksuite.oapi.service.human_authentication.v1.model.*;
import java.util.Map;
import java.util.HashMap;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
public class HumanAuthenticationService {
private final Config config;
private final Identitys identitys;
public HumanAuthenticationService(Config config) {
this.config = config;
this.identitys = new Identitys(this);
}
public Identitys getIdentitys() {
return identitys;
}
public static class Identitys {
private final HumanAuthenticationService service;
public Identitys(HumanAuthenticationService service) {
this.service = service;
}
public IdentityCreateReqCall create(IdentityCreateReqBody body, RequestOptFn... optFns) {
return new IdentityCreateReqCall(this, body, optFns);
}
}
public static class IdentityCreateReqCall extends ReqCaller {
private final Identitys identitys;
private final IdentityCreateReqBody body;
private final Map queryParams;
private final List optFns;
private IdentityCreateResult result;
private IdentityCreateReqCall(Identitys identitys, IdentityCreateReqBody body, RequestOptFn... optFns) {
this.body = body;
this.queryParams = new HashMap<>();
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new IdentityCreateResult();
this.identitys = identitys;
}
public IdentityCreateReqCall setUserId(String userId){
this.queryParams.put("user_id", userId);
return this;
}
public IdentityCreateReqCall setUserIdType(String userIdType){
this.queryParams.put("user_id_type", userIdType);
return this;
}
@Override
public Response execute() throws Exception {
this.optFns.add(com.larksuite.oapi.core.api.request.Request.setQueryParams(this.queryParams));
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/human_authentication/v1/identities", "POST",
new AccessTokenType[]{AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.identitys.service.config, request);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy