forked from gitlab4j/gitlab4j-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnvironment.java
102 lines (78 loc) · 2.13 KB
/
Environment.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package org.gitlab4j.api.models;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import org.gitlab4j.api.utils.JacksonJson;
import org.gitlab4j.api.utils.JacksonJsonEnumHelper;
import java.io.Serializable;
public class Environment implements Serializable {
private static final long serialVersionUID = 1L;
public enum EnvironmentState {
AVAILABLE, STOPPED;
private static JacksonJsonEnumHelper<EnvironmentState> enumHelper = new JacksonJsonEnumHelper<>(EnvironmentState.class);
@JsonCreator
public static EnvironmentState forValue(String value) {
return enumHelper.forValue(value);
}
@JsonValue
public String toValue() {
return (enumHelper.toString(this));
}
@Override
public String toString() {
return (enumHelper.toString(this));
}
}
private Long id;
private String name;
private String slug;
private String externalUrl;
private String tier;
private EnvironmentState state;
private Deployment lastDeployment;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSlug() {
return slug;
}
public void setSlug(String slug) {
this.slug = slug;
}
public String getExternalUrl() {
return externalUrl;
}
public void setExternalUrl(String externalUrl) {
this.externalUrl = externalUrl;
}
public String getTier() {
return tier;
}
public void setTier(String tier) {
this.tier = tier;
}
public EnvironmentState getState() {
return state;
}
public void setState(EnvironmentState state) {
this.state = state;
}
public Deployment getLastDeployment() {
return lastDeployment;
}
public void setLastDeployment(Deployment lastDeployment) {
this.lastDeployment = lastDeployment;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}