org.gitlab4j.api.models.AccessLevel 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;
public enum AccessLevel {
NONE(0), GUEST(10), REPORTER(20), DEVELOPER(30), MASTER(40), OWNER(50);
public final Integer value;
AccessLevel(int value) {
this.value = value;
}
private static Map valuesMap = new HashMap(6);
static {
for (AccessLevel accessLevel : AccessLevel.values())
valuesMap.put(accessLevel.value, accessLevel);
}
@JsonCreator
public static AccessLevel forValue(Integer value) {
return valuesMap.get(value);
}
@JsonValue
public Integer toValue() {
return (value);
}
@Override
public String toString() {
return (value.toString());
}
}