|
| 1 | +package com.github.dockerjava.api.model; |
| 2 | + |
| 3 | +import org.apache.commons.lang.builder.ToStringBuilder; |
| 4 | + |
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 6 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 7 | + |
| 8 | +@JsonIgnoreProperties(ignoreUnknown = true) |
| 9 | +public class HostConfig { |
| 10 | + |
| 11 | + @JsonProperty("Binds") |
| 12 | + private String[] binds; |
| 13 | + |
| 14 | + @JsonProperty("Links") |
| 15 | + private Links links; |
| 16 | + |
| 17 | + @JsonProperty("LxcConf") |
| 18 | + private LxcConf[] lxcConf; |
| 19 | + |
| 20 | + @JsonProperty("PortBindings") |
| 21 | + private Ports portBindings; |
| 22 | + |
| 23 | + @JsonProperty("PublishAllPorts") |
| 24 | + private boolean publishAllPorts; |
| 25 | + |
| 26 | + @JsonProperty("Privileged") |
| 27 | + private boolean privileged; |
| 28 | + |
| 29 | + @JsonProperty("Dns") |
| 30 | + private String[] dns; |
| 31 | + |
| 32 | + @JsonProperty("DnsSearch") |
| 33 | + private String[] dnsSearch; |
| 34 | + |
| 35 | + @JsonProperty("VolumesFrom") |
| 36 | + private String[] volumesFrom; |
| 37 | + |
| 38 | + @JsonProperty("ContainerIDFile") |
| 39 | + private String containerIDFile; |
| 40 | + |
| 41 | + @JsonProperty("CapAdd") |
| 42 | + private String[] capAdd; |
| 43 | + |
| 44 | + @JsonProperty("CapDrop") |
| 45 | + private String[] capDrop; |
| 46 | + |
| 47 | + @JsonProperty("RestartPolicy") |
| 48 | + private RestartPolicy restartPolicy; |
| 49 | + |
| 50 | + @JsonProperty("NetworkMode") |
| 51 | + private String networkMode; |
| 52 | + |
| 53 | + @JsonProperty("Devices") |
| 54 | + private Device[] devices; |
| 55 | + |
| 56 | + public HostConfig() { |
| 57 | + } |
| 58 | + |
| 59 | + public HostConfig(String[] binds, Links links, LxcConf[] lxcConf, Ports portBindings, boolean publishAllPorts, |
| 60 | + boolean privileged, String[] dns, String[] dnsSearch, String[] volumesFrom, String containerIDFile, |
| 61 | + String[] capAdd, String[] capDrop, RestartPolicy restartPolicy, String networkMode, Device[] devices) { |
| 62 | + this.binds = binds; |
| 63 | + this.links = links; |
| 64 | + this.lxcConf = lxcConf; |
| 65 | + this.portBindings = portBindings; |
| 66 | + this.publishAllPorts = publishAllPorts; |
| 67 | + this.privileged = privileged; |
| 68 | + this.dns = dns; |
| 69 | + this.dnsSearch = dnsSearch; |
| 70 | + this.volumesFrom = volumesFrom; |
| 71 | + this.containerIDFile = containerIDFile; |
| 72 | + this.capAdd = capAdd; |
| 73 | + this.capDrop = capDrop; |
| 74 | + this.restartPolicy = restartPolicy; |
| 75 | + this.networkMode = networkMode; |
| 76 | + this.devices = devices; |
| 77 | + } |
| 78 | + |
| 79 | + public String[] getBinds() { |
| 80 | + return binds; |
| 81 | + } |
| 82 | + |
| 83 | + public LxcConf[] getLxcConf() { |
| 84 | + return lxcConf; |
| 85 | + } |
| 86 | + |
| 87 | + public Ports getPortBindings() { |
| 88 | + return portBindings; |
| 89 | + } |
| 90 | + |
| 91 | + public boolean isPublishAllPorts() { |
| 92 | + return publishAllPorts; |
| 93 | + } |
| 94 | + |
| 95 | + public boolean isPrivileged() { |
| 96 | + return privileged; |
| 97 | + } |
| 98 | + |
| 99 | + public String[] getDns() { |
| 100 | + return dns; |
| 101 | + } |
| 102 | + |
| 103 | + public String[] getVolumesFrom() { |
| 104 | + return volumesFrom; |
| 105 | + } |
| 106 | + |
| 107 | + public String getContainerIDFile() { |
| 108 | + return containerIDFile; |
| 109 | + } |
| 110 | + |
| 111 | + public String[] getDnsSearch() { |
| 112 | + return dnsSearch; |
| 113 | + } |
| 114 | + |
| 115 | + public Links getLinks() { |
| 116 | + return links; |
| 117 | + } |
| 118 | + |
| 119 | + public String getNetworkMode() { |
| 120 | + return networkMode; |
| 121 | + } |
| 122 | + |
| 123 | + public Device[] getDevices() { |
| 124 | + return devices; |
| 125 | + } |
| 126 | + |
| 127 | + public RestartPolicy getRestartPolicy() { |
| 128 | + return restartPolicy; |
| 129 | + } |
| 130 | + |
| 131 | + public String[] getCapAdd() { |
| 132 | + return capAdd; |
| 133 | + } |
| 134 | + |
| 135 | + public String[] getCapDrop() { |
| 136 | + return capDrop; |
| 137 | + } |
| 138 | + |
| 139 | + public void setBinds(String[] binds) { |
| 140 | + this.binds = binds; |
| 141 | + } |
| 142 | + |
| 143 | + public void setLinks(Links links) { |
| 144 | + this.links = links; |
| 145 | + } |
| 146 | + |
| 147 | + public void setLxcConf(LxcConf[] lxcConf) { |
| 148 | + this.lxcConf = lxcConf; |
| 149 | + } |
| 150 | + |
| 151 | + public void setPortBindings(Ports portBindings) { |
| 152 | + this.portBindings = portBindings; |
| 153 | + } |
| 154 | + |
| 155 | + public void setPublishAllPorts(boolean publishAllPorts) { |
| 156 | + this.publishAllPorts = publishAllPorts; |
| 157 | + } |
| 158 | + |
| 159 | + public void setPrivileged(boolean privileged) { |
| 160 | + this.privileged = privileged; |
| 161 | + } |
| 162 | + |
| 163 | + public void setDns(String[] dns) { |
| 164 | + this.dns = dns; |
| 165 | + } |
| 166 | + |
| 167 | + public void setDnsSearch(String[] dnsSearch) { |
| 168 | + this.dnsSearch = dnsSearch; |
| 169 | + } |
| 170 | + |
| 171 | + public void setVolumesFrom(String[] volumesFrom) { |
| 172 | + this.volumesFrom = volumesFrom; |
| 173 | + } |
| 174 | + |
| 175 | + public void setContainerIDFile(String containerIDFile) { |
| 176 | + this.containerIDFile = containerIDFile; |
| 177 | + } |
| 178 | + |
| 179 | + public void setCapAdd(String[] capAdd) { |
| 180 | + this.capAdd = capAdd; |
| 181 | + } |
| 182 | + |
| 183 | + public void setCapDrop(String[] capDrop) { |
| 184 | + this.capDrop = capDrop; |
| 185 | + } |
| 186 | + |
| 187 | + public void setRestartPolicy(RestartPolicy restartPolicy) { |
| 188 | + this.restartPolicy = restartPolicy; |
| 189 | + } |
| 190 | + |
| 191 | + public void setNetworkMode(String networkMode) { |
| 192 | + this.networkMode = networkMode; |
| 193 | + } |
| 194 | + |
| 195 | + public void setDevices(Device[] devices) { |
| 196 | + this.devices = devices; |
| 197 | + } |
| 198 | + |
| 199 | + @Override |
| 200 | + public String toString() { |
| 201 | + return ToStringBuilder.reflectionToString(this); |
| 202 | + } |
| 203 | + |
| 204 | +} |
0 commit comments