Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
73d38d00
Commit
73d38d00
authored
Jun 10, 2017
by
Greg Messner
Browse files
Original check-in.
parent
515de8d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/PipelineStatus.java
0 → 100644
View file @
73d38d00
package
org.gitlab4j.api.models
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.fasterxml.jackson.annotation.JsonCreator
;
import
com.fasterxml.jackson.annotation.JsonValue
;
/**
* Enum for the various Pipeline status values.
*/
public
enum
PipelineStatus
{
RUNNING
,
PENDING
,
SUCCESS
,
FAILED
,
CANCELED
,
SKIPPED
;
private
static
Map
<
String
,
PipelineStatus
>
valuesMap
=
new
HashMap
<>(
6
);
static
{
for
(
PipelineStatus
status
:
PipelineStatus
.
values
())
valuesMap
.
put
(
status
.
toValue
(),
status
);
}
@JsonCreator
public
static
PipelineStatus
forValue
(
String
value
)
{
return
valuesMap
.
get
(
value
);
}
@JsonValue
public
String
toValue
()
{
return
(
name
().
toLowerCase
());
}
@Override
public
String
toString
()
{
return
(
name
().
toLowerCase
());
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment