forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventType.java
More file actions
59 lines (48 loc) · 1.07 KB
/
Copy pathEventType.java
File metadata and controls
59 lines (48 loc) · 1.07 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.github.dockerjava.api.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import javax.annotation.Nonnull;
import java.util.HashMap;
import java.util.Map;
/**
* @since 1.24
*/
public enum EventType {
CONFIG("config"),
/**
* @since 1.24
*/
CONTAINER("container"),
/**
* @since 1.24
*/
DAEMON("daemon"),
/**
* @since 1.24
*/
IMAGE("image"),
NETWORK("network"),
NODE("node"),
PLUGIN("plugin"),
SECRET("secret"),
SERVICE("service"),
VOLUME("volume");
private static final Map<String, EventType> EVENT_TYPES = new HashMap<>();
static {
for (EventType t : values()) {
EVENT_TYPES.put(t.name().toLowerCase(), t);
}
}
private String value;
EventType(@Nonnull String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@JsonCreator
public static EventType forValue(String s) {
return EVENT_TYPES.get(s);
}
}