FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add MountType.Image and ImageOptions by eddumelendez · Pull Request #2386 · docker-java/docker-java · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
    • ImageOptions.java
    • Mount.java
    • MountType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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;
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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;
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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,

}

Back | FazBrowse Home | New Git URL