/
SingularityVolume.java
40 lines (32 loc) · 1.01 KB
/
SingularityVolume.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.hubspot.mesos;
import org.apache.mesos.Protos.Volume.Mode;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Optional;
public class SingularityVolume {
private final String containerPath;
private final Optional<String> hostPath;
private final Optional<Mode> mode;
@JsonCreator
public SingularityVolume(
@JsonProperty("containerPath") String containerPath,
@JsonProperty("hostPath") Optional<String> hostPath,
@JsonProperty("mode") Optional<Mode> mode) {
this.containerPath = containerPath;
this.hostPath = hostPath;
this.mode = mode;
}
public String getContainerPath() {
return containerPath;
}
public Optional<String> getHostPath() {
return hostPath;
}
public Optional<Mode> getMode() {
return mode;
}
@Override
public String toString() {
return String.format("Volume [containerPath=%s, hostPath=%s, mode=%s]", containerPath, hostPath, mode);
}
}