com.larksuite.oapi.service.face_verify.v1.FaceVerifyService 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.face_verify.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.face_verify.v1.model.*;
import java.util.Map;
import java.util.HashMap;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
public class FaceVerifyService {
private final Config config;
private final FaceVerifys faceVerifys;
public FaceVerifyService(Config config) {
this.config = config;
this.faceVerifys = new FaceVerifys(this);
}
public FaceVerifys getFaceVerifys() {
return faceVerifys;
}
public static class FaceVerifys {
private final FaceVerifyService service;
public FaceVerifys(FaceVerifyService service) {
this.service = service;
}
public FaceVerifyCropFaceImageReqCall cropFaceImage(RequestOptFn... optFns) {
return new FaceVerifyCropFaceImageReqCall(this, optFns);
}
public FaceVerifyQueryAuthResultReqCall queryAuthResult(RequestOptFn... optFns) {
return new FaceVerifyQueryAuthResultReqCall(this, optFns);
}
public FaceVerifyUploadFaceImageReqCall uploadFaceImage(RequestOptFn... optFns) {
return new FaceVerifyUploadFaceImageReqCall(this, optFns);
}
}
public static class FaceVerifyCropFaceImageReqCall extends ReqCaller {
private final FaceVerifys faceVerifys;
private final FormData body;
private final List optFns;
private FaceVerifyCropFaceImageResult result;
private FaceVerifyCropFaceImageReqCall(FaceVerifys faceVerifys, RequestOptFn... optFns) {
this.body = new FormData();
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new FaceVerifyCropFaceImageResult();
this.faceVerifys = faceVerifys;
}
public FaceVerifyCropFaceImageReqCall setRawImage(FormDataFile rawImage){
this.body.addFile("raw_image", rawImage);
return this;
}
@Override
public Response execute() throws Exception {
Request request = Request.newRequest("face_verify/v1/crop_face_image", "POST",
new AccessTokenType[]{AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.faceVerifys.service.config, request);
}
}
public static class FaceVerifyQueryAuthResultReqCall extends ReqCaller