| 1 | |
package com.ctrip.apollo.core.dto; |
| 2 | |
|
| 3 | |
import com.google.common.base.MoreObjects; |
| 4 | |
|
| 5 | |
import java.util.Map; |
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
public class ApolloConfig { |
| 11 | |
|
| 12 | |
private String appId; |
| 13 | |
|
| 14 | |
private String cluster; |
| 15 | |
|
| 16 | |
private String namespace; |
| 17 | |
|
| 18 | |
private Map<String, String> configurations; |
| 19 | |
|
| 20 | |
private String releaseKey; |
| 21 | |
|
| 22 | 0 | public ApolloConfig() { |
| 23 | 0 | } |
| 24 | |
|
| 25 | |
public ApolloConfig(String appId, |
| 26 | |
String cluster, |
| 27 | |
String namespace, |
| 28 | 0 | String releaseKey) { |
| 29 | 0 | this.appId = appId; |
| 30 | 0 | this.cluster = cluster; |
| 31 | 0 | this.namespace = namespace; |
| 32 | 0 | this.releaseKey = releaseKey; |
| 33 | 0 | } |
| 34 | |
|
| 35 | |
public String getAppId() { |
| 36 | 0 | return appId; |
| 37 | |
} |
| 38 | |
|
| 39 | |
public String getCluster() { |
| 40 | 0 | return cluster; |
| 41 | |
} |
| 42 | |
|
| 43 | |
public String getNamespace() { |
| 44 | 0 | return namespace; |
| 45 | |
} |
| 46 | |
|
| 47 | |
public String getReleaseKey() { |
| 48 | 0 | return releaseKey; |
| 49 | |
} |
| 50 | |
|
| 51 | |
public Map<String, String> getConfigurations() { |
| 52 | 0 | return configurations; |
| 53 | |
} |
| 54 | |
|
| 55 | |
public void setAppId(String appId) { |
| 56 | 0 | this.appId = appId; |
| 57 | 0 | } |
| 58 | |
|
| 59 | |
public void setCluster(String cluster) { |
| 60 | 0 | this.cluster = cluster; |
| 61 | 0 | } |
| 62 | |
|
| 63 | |
public void setNamespace(String namespace) { |
| 64 | 0 | this.namespace = namespace; |
| 65 | 0 | } |
| 66 | |
|
| 67 | |
public void setReleaseKey(String releaseKey) { |
| 68 | 0 | this.releaseKey = releaseKey; |
| 69 | 0 | } |
| 70 | |
|
| 71 | |
public void setConfigurations(Map<String, String> configurations) { |
| 72 | 0 | this.configurations = configurations; |
| 73 | 0 | } |
| 74 | |
|
| 75 | |
@Override |
| 76 | |
public String toString() { |
| 77 | 0 | return MoreObjects.toStringHelper(this) |
| 78 | 0 | .omitNullValues() |
| 79 | 0 | .add("appId", appId) |
| 80 | 0 | .add("cluster", cluster) |
| 81 | 0 | .add("namespace", namespace) |
| 82 | 0 | .add("releaseKey", releaseKey) |
| 83 | 0 | .add("configurations", configurations) |
| 84 | 0 | .toString(); |
| 85 | |
} |
| 86 | |
} |