public class Volume
extends java.lang.Object
implements java.io.Serializable
Due to an inconsistency in the Docker REST API implementation the response to a container
command might include either "Mounts" : [ { "Destination" : "/path/to/mount" } ] or
"Mounts" : [ { "Destination" : { "path" : "/path/to/mount" } } ] JSON snippets. However,
both variants have to be mapped to this class. Therefore, both a single-argument constructor
as well as a single-argument factory method is provided either of which handles the former or
latter variant (with path key), respectively.
Bind,
Serialized Form| Constructor and Description |
|---|
Volume(java.lang.String path)
Creates a volume referring to the given path.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getPath() |
static Volume |
parse(java.util.Map<java.lang.String,java.lang.String> primitive)
Handles the
{ "Destination" : { "path" : "/path/to/mount" } } variant. |
static Volume |
parse(java.lang.String path)
Deprecated.
use
parse(Map) |
java.lang.String |
toString() |
public Volume(java.lang.String path)
{ "Destination" : "/path/to/mount" } variant.path - the destination path of the bind mounted volume@Nonnull @Deprecated public static Volume parse(java.lang.String path)
parse(Map){ "Destination" : { "path" : "/path/to/mount" } } variant.path - the destination path of the bind mounted volume@Nonnull public static Volume parse(java.util.Map<java.lang.String,java.lang.String> primitive)
{ "Destination" : { "path" : "/path/to/mount" } } variant.path - the destination path of the bind mounted volumepublic java.lang.String getPath()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2020. All Rights Reserved.