mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
08.46.2018 5db1733cdfdac831cc10ff734c61d68079c47d1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package de.micromata.borgbutler.json.borg;
 
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import de.micromata.borgbutler.json.JsonUtils;
import lombok.Getter;
import lombok.Setter;
 
public class RepoInfo {
    @Getter
    @JsonProperty("security_dir")
    private String securityDir;
    @Getter
    private Cache cache;
    @Getter
    private Encryption encryption;
    @Getter
    private Repository repository;
    @Getter
    @Setter
    @JsonIgnore
    private String originalJson;
 
    public String toString() {
        return JsonUtils.toJson(this, true);
    }
 
 
    public void updateFrom(RepoInfo repoInfo) {
        this.securityDir = repoInfo.securityDir;
        this.cache = repoInfo.cache;
        this.encryption = repoInfo.encryption;
        this.repository = repoInfo.getRepository();
        this.originalJson = repoInfo.originalJson;
    }
 
}