org.gitlab4j.api.models.PipelineStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gitlab4j-api Show documentation
Show all versions of gitlab4j-api Show documentation
GitLab4J-API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories and servers via the GitLab REST API.
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 {
CREATED,
WAITING_FOR_RESOURCE,
PREPARING,
PENDING,
RUNNING,
SUCCESS,
FAILED,
CANCELED,
SKIPPED,
MANUAL,
SCHEDULED;
private static Map valuesMap = new HashMap<>(11);
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());
}
}