package ink.wgink.properties.wechat.official.account;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: WechatProperties
 * @Description: 微信配置
 * @Author: WangGeng
 * @Date: 2020/3/1 2:22 下午
 * @Version: 1.0
 **/
@Configuration
@ConfigurationProperties(prefix = "open-platform.wechat.official-account")
public class OfficialAccountProperties {

    private Boolean apiCrossOrigin;
    private Boolean activate;
    private String apiUrl;
    private OfficialAccountAuthorizeProperties authorize;
    private String accessTokenUrl;
    private String appId;
    private String appSecret;
    private String grantType;
    private String configToken;

    public Boolean getApiCrossOrigin() {
        return apiCrossOrigin;
    }

    public void setApiCrossOrigin(Boolean apiCrossOrigin) {
        this.apiCrossOrigin = apiCrossOrigin;
    }

    public Boolean getActivate() {
        return activate == null ? false : activate;
    }

    public void setActivate(Boolean activate) {
        this.activate = activate;
    }

    public String getApiUrl() {
        return apiUrl == null ? "" : apiUrl.trim();
    }

    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }

    public OfficialAccountAuthorizeProperties getAuthorize() {
        return authorize;
    }

    public void setAuthorize(OfficialAccountAuthorizeProperties authorize) {
        this.authorize = authorize;
    }

    public String getAccessTokenUrl() {
        return accessTokenUrl == null ? "" : accessTokenUrl;
    }

    public void setAccessTokenUrl(String accessTokenUrl) {
        this.accessTokenUrl = accessTokenUrl;
    }

    public String getAppId() {
        return appId == null ? "" : appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret == null ? "" : appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getGrantType() {
        return grantType == null ? "" : grantType;
    }

    public void setGrantType(String grantType) {
        this.grantType = grantType;
    }

    public String getConfigToken() {
        return configToken == null ? "" : configToken;
    }

    public void setConfigToken(String configToken) {
        this.configToken = configToken;
    }
}
