com.dahuatech.icc.oauth.model.v202010.OauthConfigBaseInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-oauth Show documentation
Show all versions of java-sdk-oauth Show documentation
Dahua ICC Open API SDK for Java
The newest version!
package com.dahuatech.icc.oauth.model.v202010;
import com.dahuatech.icc.oauth.profile.GrantType;
public abstract class OauthConfigBaseInfo {
/** 申请认证ID */
protected String clientId;
/** 申请认证秘钥 */
protected String clientSecret;
/** 当前使用认证类型 */
protected GrantType grantType;
/**平台ip 端口信息*/
protected HttpConfigInfo httpConfigInfo;
public OauthConfigBaseInfo(){
}
public OauthConfigBaseInfo(String host,String clientId,String clientSecret,GrantType grantType){
this.httpConfigInfo = new HttpConfigInfo(host);
this.clientId = clientId;
this.clientSecret = clientSecret;
this.grantType = grantType;
}
public OauthConfigBaseInfo(String host,String clientId,String clientSecret,GrantType grantType,boolean isEnableHttpTest,String httpsPort,String httpPort){
this(host,clientId,clientSecret,grantType);
this.httpConfigInfo = new HttpConfigInfo(host,isEnableHttpTest,httpsPort,httpPort);
}
public OauthConfigBaseInfo(String host, String clientId, String clientSecret, GrantType grantType, boolean isEnableHttpTest, String port) {
this(host, clientId, clientSecret, grantType);
if (isEnableHttpTest) {
this.httpConfigInfo = new HttpConfigInfo(host, true, null, port);
} else {
this.httpConfigInfo = new HttpConfigInfo(host, false, port, null);
}
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
public GrantType getGrantType() {
return grantType;
}
public void setGrantType(GrantType grantType) {
this.grantType = grantType;
}
public HttpConfigInfo getHttpConfigInfo() {
return httpConfigInfo;
}
public void setHttpConfigInfo(HttpConfigInfo httpConfigInfo) {
this.httpConfigInfo = httpConfigInfo;
}
}