com.baidu.haotianjing.sdk.device.model.DeviceAnalyzeRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of haotianjing-java-sdk Show documentation
Show all versions of haotianjing-java-sdk Show documentation
Haotianjing SaaS SDK for Java
The newest version!
package com.baidu.haotianjing.sdk.device.model;
import com.baidu.haotianjing.core.auth.Credentials;
import com.baidu.haotianjing.core.exception.RiskSdkException;
import com.baidu.haotianjing.core.request.BaseRequest;
import com.baidu.haotianjing.core.utils.AssertUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import static com.baidu.haotianjing.core.constants.RiskCoreConstants.APP;
import static com.baidu.haotianjing.core.constants.RiskCoreConstants.JS_ENV;
import static com.baidu.haotianjing.core.constants.RiskCoreConstants.JT;
import static com.baidu.haotianjing.core.constants.RiskCoreConstants.Z;
public class DeviceAnalyzeRequest extends BaseRequest {
/**
* 风控SDK上报数据后获取的token值,应用方需从端SDK获取该数据,该参数非常重要
*/
private String z;
/**
* APP系统类型,取值:android/ios/universe(其他)
*/
private String app;
/**
* 接入风控JS SDK(包括H5和小程序版)后可获取该值
*/
private String jt;
/**
* 接入风控JS SDK(包括H5和小程序版)
* 标识JS执行环境类型,可选值:h5/h5n/swan/wx
*/
@JsonProperty("js_env")
private String jsEnv;
public DeviceAnalyzeRequest() {
url = "/risk/3.0/factor";
}
@Override
protected Map getCustomSignParams() {
Map params = super.getCustomSignParams();
params.put(Z, z);
params.put(APP, app);
params.put(JT, jt);
params.put(JS_ENV, jsEnv);
return params;
}
@Override
protected Map getNonSignParams() {
Map nonSignParams = super.getNonSignParams();
return nonSignParams;
}
@Override
public Map getQueryParams(Credentials credentials) {
Map queryParams = super.getQueryParams(credentials);
return queryParams;
}
@Override
public void validate() throws RiskSdkException {
AssertUtils.notBlank(app, "app should not be empty.");
}
@Override
public Class getResponseClass() {
return DeviceAnalyzeResponse.class;
}
public String getZ() {
return z;
}
public void setZ(String z) {
this.z = z;
}
public String getApp() {
return app;
}
public void setApp(String app) {
this.app = app;
}
public String getJt() {
return jt;
}
public void setJt(String jt) {
this.jt = jt;
}
public String getJsEnv() {
return jsEnv;
}
public void setJsEnv(String jsEnv) {
this.jsEnv = jsEnv;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy