|
1 | 1 | package com.github.dockerjava.api.model; |
2 | 2 |
|
3 | | -import java.io.Serializable; |
4 | | - |
5 | | -import javax.annotation.CheckForNull; |
6 | | - |
7 | | -import org.apache.commons.lang.builder.ToStringBuilder; |
8 | | -import org.apache.commons.lang.builder.ToStringStyle; |
9 | | - |
10 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; |
11 | 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
12 | 5 | import com.fasterxml.jackson.annotation.JsonProperty; |
| 6 | +import com.github.dockerjava.core.RemoteApiVersion; |
| 7 | +import org.apache.commons.lang.builder.ToStringBuilder; |
| 8 | +import org.apache.commons.lang.builder.ToStringStyle; |
| 9 | + |
| 10 | +import javax.annotation.CheckForNull; |
| 11 | +import java.io.Serializable; |
13 | 12 |
|
14 | 13 | /** |
15 | 14 | * Represents a pull response stream item |
@@ -48,6 +47,9 @@ public class ResponseItem implements Serializable { |
48 | 47 | @JsonProperty("error") |
49 | 48 | private String error; |
50 | 49 |
|
| 50 | + @JsonProperty("aux") |
| 51 | + private AuxDetail aux; |
| 52 | + |
51 | 53 | @CheckForNull |
52 | 54 | public String getStream() { |
53 | 55 | return stream; |
@@ -94,6 +96,17 @@ public String getError() { |
94 | 96 | return error; |
95 | 97 | } |
96 | 98 |
|
| 99 | + /** |
| 100 | + * Final information about a push |
| 101 | + * |
| 102 | + * @since {@link RemoteApiVersion#VERSION_1_22} |
| 103 | + * @return |
| 104 | + */ |
| 105 | + @CheckForNull |
| 106 | + public AuxDetail getAux() { |
| 107 | + return aux; |
| 108 | + } |
| 109 | + |
97 | 110 | /** |
98 | 111 | * Returns whether the error field indicates an error |
99 | 112 | * |
@@ -165,6 +178,40 @@ public String toString() { |
165 | 178 | } |
166 | 179 | } |
167 | 180 |
|
| 181 | + @JsonIgnoreProperties(ignoreUnknown = true) |
| 182 | + public static class AuxDetail implements Serializable { |
| 183 | + private static final long serialVersionUID = -9136704865403084084L; |
| 184 | + |
| 185 | + @JsonProperty("Size") |
| 186 | + Integer size; |
| 187 | + |
| 188 | + @JsonProperty("Tag") |
| 189 | + String tag; |
| 190 | + |
| 191 | + @JsonProperty("Digest") |
| 192 | + String digest; |
| 193 | + |
| 194 | + @CheckForNull |
| 195 | + public Integer getSize() { |
| 196 | + return size; |
| 197 | + } |
| 198 | + |
| 199 | + @CheckForNull |
| 200 | + public String getTag() { |
| 201 | + return tag; |
| 202 | + } |
| 203 | + |
| 204 | + @CheckForNull |
| 205 | + public String getDigest() { |
| 206 | + return digest; |
| 207 | + } |
| 208 | + |
| 209 | + @Override |
| 210 | + public String toString() { |
| 211 | + return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE).toString(); |
| 212 | + } |
| 213 | + } |
| 214 | + |
168 | 215 | @Override |
169 | 216 | public String toString() { |
170 | 217 | return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE).toString(); |
|
0 commit comments