Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/main/java/com/github/dockerjava/api/model/Statistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.Map;

import javax.annotation.CheckForNull;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
Expand All @@ -16,6 +18,17 @@ public class Statistics {
@JsonProperty("read")
private String read;

/**
* @since Docker Remote API 1.21
*/
@CheckForNull
@JsonProperty("networks")
private Map<String, Object> networks;

/**
* @deprecated as of Docker Remote API 1.21, replaced by {@link #networks}
*/
@Deprecated
@JsonProperty("network")
private Map<String, Object> networkStats;

Expand All @@ -28,6 +41,18 @@ public class Statistics {
@JsonProperty("cpu_stats")
private Map<String, Object> cpuStats;

/**
* @since Docker Remote API 1.21
*/
@CheckForNull
public Map<String, Object> getNetworks() {
return networks;
}

/**
* @deprecated as of Docker Remote API 1.21, replaced by {@link #getNetworks()}
*/
@Deprecated
public Map<String, Object> getNetworkStats() {
return networkStats;
}
Expand Down