com.spotify.docker.client.messages.AutoValue_NetworkSettings Maven / Gradle / Ivy
package com.spotify.docker.client.messages;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NetworkSettings extends NetworkSettings {
private final String ipAddress;
private final Integer ipPrefixLen;
private final String gateway;
private final String bridge;
private final ImmutableMap> portMapping;
private final ImmutableMap> ports;
private final String macAddress;
private final ImmutableMap networks;
private AutoValue_NetworkSettings(
@Nullable String ipAddress,
@Nullable Integer ipPrefixLen,
@Nullable String gateway,
@Nullable String bridge,
@Nullable ImmutableMap> portMapping,
@Nullable ImmutableMap> ports,
@Nullable String macAddress,
@Nullable ImmutableMap networks) {
this.ipAddress = ipAddress;
this.ipPrefixLen = ipPrefixLen;
this.gateway = gateway;
this.bridge = bridge;
this.portMapping = portMapping;
this.ports = ports;
this.macAddress = macAddress;
this.networks = networks;
}
@Nullable
@JsonProperty(value = "IPAddress")
@Override
public String ipAddress() {
return ipAddress;
}
@Nullable
@JsonProperty(value = "IPPrefixLen")
@Override
public Integer ipPrefixLen() {
return ipPrefixLen;
}
@Nullable
@JsonProperty(value = "Gateway")
@Override
public String gateway() {
return gateway;
}
@Nullable
@JsonProperty(value = "Bridge")
@Override
public String bridge() {
return bridge;
}
@Nullable
@JsonProperty(value = "PortMapping")
@Override
public ImmutableMap> portMapping() {
return portMapping;
}
@Nullable
@JsonProperty(value = "Ports")
@Override
public ImmutableMap> ports() {
return ports;
}
@Nullable
@JsonProperty(value = "MacAddress")
@Override
public String macAddress() {
return macAddress;
}
@Nullable
@JsonProperty(value = "Networks")
@Override
public ImmutableMap networks() {
return networks;
}
@Override
public String toString() {
return "NetworkSettings{"
+ "ipAddress=" + ipAddress + ", "
+ "ipPrefixLen=" + ipPrefixLen + ", "
+ "gateway=" + gateway + ", "
+ "bridge=" + bridge + ", "
+ "portMapping=" + portMapping + ", "
+ "ports=" + ports + ", "
+ "macAddress=" + macAddress + ", "
+ "networks=" + networks
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof NetworkSettings) {
NetworkSettings that = (NetworkSettings) o;
return ((this.ipAddress == null) ? (that.ipAddress() == null) : this.ipAddress.equals(that.ipAddress()))
&& ((this.ipPrefixLen == null) ? (that.ipPrefixLen() == null) : this.ipPrefixLen.equals(that.ipPrefixLen()))
&& ((this.gateway == null) ? (that.gateway() == null) : this.gateway.equals(that.gateway()))
&& ((this.bridge == null) ? (that.bridge() == null) : this.bridge.equals(that.bridge()))
&& ((this.portMapping == null) ? (that.portMapping() == null) : this.portMapping.equals(that.portMapping()))
&& ((this.ports == null) ? (that.ports() == null) : this.ports.equals(that.ports()))
&& ((this.macAddress == null) ? (that.macAddress() == null) : this.macAddress.equals(that.macAddress()))
&& ((this.networks == null) ? (that.networks() == null) : this.networks.equals(that.networks()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= (ipAddress == null) ? 0 : this.ipAddress.hashCode();
h *= 1000003;
h ^= (ipPrefixLen == null) ? 0 : this.ipPrefixLen.hashCode();
h *= 1000003;
h ^= (gateway == null) ? 0 : this.gateway.hashCode();
h *= 1000003;
h ^= (bridge == null) ? 0 : this.bridge.hashCode();
h *= 1000003;
h ^= (portMapping == null) ? 0 : this.portMapping.hashCode();
h *= 1000003;
h ^= (ports == null) ? 0 : this.ports.hashCode();
h *= 1000003;
h ^= (macAddress == null) ? 0 : this.macAddress.hashCode();
h *= 1000003;
h ^= (networks == null) ? 0 : this.networks.hashCode();
return h;
}
static final class Builder extends NetworkSettings.Builder {
private String ipAddress;
private Integer ipPrefixLen;
private String gateway;
private String bridge;
private ImmutableMap> portMapping;
private ImmutableMap> ports;
private String macAddress;
private ImmutableMap networks;
Builder() {
}
Builder(NetworkSettings source) {
this.ipAddress = source.ipAddress();
this.ipPrefixLen = source.ipPrefixLen();
this.gateway = source.gateway();
this.bridge = source.bridge();
this.portMapping = source.portMapping();
this.ports = source.ports();
this.macAddress = source.macAddress();
this.networks = source.networks();
}
@Override
public NetworkSettings.Builder ipAddress(@Nullable String ipAddress) {
this.ipAddress = ipAddress;
return this;
}
@Override
public NetworkSettings.Builder ipPrefixLen(@Nullable Integer ipPrefixLen) {
this.ipPrefixLen = ipPrefixLen;
return this;
}
@Override
public NetworkSettings.Builder gateway(@Nullable String gateway) {
this.gateway = gateway;
return this;
}
@Override
public NetworkSettings.Builder bridge(@Nullable String bridge) {
this.bridge = bridge;
return this;
}
@Override
public NetworkSettings.Builder portMapping(@Nullable Map> portMapping) {
this.portMapping = (portMapping == null ? null : ImmutableMap.copyOf(portMapping));
return this;
}
@Override
public NetworkSettings.Builder ports(@Nullable Map> ports) {
this.ports = (ports == null ? null : ImmutableMap.copyOf(ports));
return this;
}
@Override
public NetworkSettings.Builder macAddress(@Nullable String macAddress) {
this.macAddress = macAddress;
return this;
}
@Override
public NetworkSettings.Builder networks(@Nullable Map networks) {
this.networks = (networks == null ? null : ImmutableMap.copyOf(networks));
return this;
}
@Override
public NetworkSettings build() {
return new AutoValue_NetworkSettings(
this.ipAddress,
this.ipPrefixLen,
this.gateway,
this.bridge,
this.portMapping,
this.ports,
this.macAddress,
this.networks);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy