package com.qmth.themis.business.domain;

import com.qmth.themis.business.constant.SystemConstant;
import com.qmth.themis.business.enums.UploadFileEnum;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 阿里云private oss config
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/3/30
 */
public class AliYunOssPrivateDomain implements Serializable {

    private String privateEndpoint;

    private String privateName;

    private String privateAccessKeyId;

    private String privateAccessKeySecret;

    private String privateBucket;

    private String privateUrl;

    private Map<String, Object> map;

    public AliYunOssPrivateDomain(String privateEndpoint, String privateName, String privateAccessKeyId, String privateAccessKeySecret, String privateBucket, String privateUrl, Boolean oss) {
        this.privateEndpoint = privateEndpoint;
        this.privateName = privateName;
        this.privateAccessKeyId = privateAccessKeyId;
        this.privateAccessKeySecret = privateAccessKeySecret;
        this.privateBucket = privateBucket;
        this.privateUrl = privateUrl;
        map = new HashMap<>();
        map.put(SystemConstant.END_POINT, this.privateEndpoint);
        map.put(SystemConstant.ACCESS_KEY_ID, this.privateAccessKeyId);
        map.put(SystemConstant.ACCESS_KEY_SECRET, this.privateAccessKeySecret);
        map.put(SystemConstant.BUCKET, this.privateBucket);
        map.put(SystemConstant.NAME, this.privateName);
        map.put(SystemConstant.URL, this.privateUrl);
        map.put(SystemConstant.OSS, oss);
        map.put(SystemConstant.UPLOAD_TYPE, UploadFileEnum.file.name());
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }

    public String getPrivateEndpoint() {
        return privateEndpoint;
    }

    public void setPrivateEndpoint(String privateEndpoint) {
        this.privateEndpoint = privateEndpoint;
    }

    public String getPrivateName() {
        return privateName;
    }

    public void setPrivateName(String privateName) {
        this.privateName = privateName;
    }

    public String getPrivateAccessKeyId() {
        return privateAccessKeyId;
    }

    public void setPrivateAccessKeyId(String privateAccessKeyId) {
        this.privateAccessKeyId = privateAccessKeyId;
    }

    public String getPrivateAccessKeySecret() {
        return privateAccessKeySecret;
    }

    public void setPrivateAccessKeySecret(String privateAccessKeySecret) {
        this.privateAccessKeySecret = privateAccessKeySecret;
    }

    public String getPrivateBucket() {
        return privateBucket;
    }

    public void setPrivateBucket(String privateBucket) {
        this.privateBucket = privateBucket;
    }

    public String getPrivateUrl() {
        return privateUrl;
    }

    public void setPrivateUrl(String privateUrl) {
        this.privateUrl = privateUrl;
    }
}
