Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.github.dockerjava.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;

/**
* @since {@link RemoteApiVersion#VERSION_1_48}
*/
@EqualsAndHashCode
@ToString
public class ImageOptions extends DockerObject implements Serializable {
private static final long serialVersionUID = 1L;
@JsonProperty("Subpath")
private String subpath;

public String getSubpath() {
return subpath;
}

public ImageOptions withSubpath(String subpath) {
this.subpath = subpath;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public class Mount extends DockerObject implements Serializable {
@JsonProperty("TmpfsOptions")
private TmpfsOptions tmpfsOptions;

/**
* @since 1.48
*/
@JsonProperty("ImageOptions")
private ImageOptions imageOptions;

/**
* @see #type
*/
Expand Down Expand Up @@ -177,4 +183,23 @@ public Mount withTmpfsOptions(TmpfsOptions tmpfsOptions) {
}
return this;
}

/**
* @see #imageOptions
*/
@CheckForNull
public ImageOptions getImageOptions() {
return imageOptions;
}

/**
* @see #imageOptions
*/
public Mount withImageOptions(ImageOptions imageOptions) {
this.imageOptions = imageOptions;
if (imageOptions != null) {
this.type = MountType.IMAGE;
}
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public enum MountType {

//@since 1.40
@JsonProperty("npipe")
NPIPE
NPIPE,

//@since 1.48
@JsonProperty("image")
IMAGE,

}
Loading