X Tutup
Skip to content
Closed
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
61 changes: 54 additions & 7 deletions src/main/java/com/github/dockerjava/api/model/ResponseItem.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.github.dockerjava.api.model;

import java.io.Serializable;

import javax.annotation.CheckForNull;

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.dockerjava.core.RemoteApiVersion;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javax.annotation.CheckForNull;
import java.io.Serializable;

/**
* Represents a pull response stream item
Expand Down Expand Up @@ -48,6 +47,9 @@ public class ResponseItem implements Serializable {
@JsonProperty("error")
private String error;

@JsonProperty("aux")
private AuxDetail aux;

@CheckForNull
public String getStream() {
return stream;
Expand Down Expand Up @@ -94,6 +96,17 @@ public String getError() {
return error;
}

/**
* Final information about a push
*
* @since {@link RemoteApiVersion#VERSION_1_22}
* @return
*/
@CheckForNull
public AuxDetail getAux() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please set since javadocs tags

return aux;
}

/**
* Returns whether the error field indicates an error
*
Expand Down Expand Up @@ -165,6 +178,40 @@ public String toString() {
}
}

@JsonIgnoreProperties(ignoreUnknown = true)
public static class AuxDetail implements Serializable {
private static final long serialVersionUID = -9136704865403084084L;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@JsonProperty("Size")
Integer size;

@JsonProperty("Tag")
String tag;

@JsonProperty("Digest")
String digest;

@CheckForNull
public Integer getSize() {
return size;
}

@CheckForNull
public String getTag() {
return tag;
}

@CheckForNull
public String getDigest() {
return digest;
}

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
}
}

@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
Expand Down
X Tutup