com.manywho.sdk.api.run.elements.config.Authorization Maven / Gradle / Ivy
package com.manywho.sdk.api.run.elements.config;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.List;
public class Authorization {
private List users;
private List groups;
private String runningAuthenticationId;
private AuthenticationType globalAuthenticationType;
public List getUsers() {
return users;
}
public void setUsers(List users) {
this.users = users;
}
public List getGroups() {
return groups;
}
public void setGroups(List groups) {
this.groups = groups;
}
public String getRunningAuthenticationId() {
return runningAuthenticationId;
}
public void setRunningAuthenticationId(String runningAuthenticationId) {
this.runningAuthenticationId = runningAuthenticationId;
}
public AuthenticationType getGlobalAuthenticationType() {
return globalAuthenticationType;
}
public void setGlobalAuthenticationType(AuthenticationType globalAuthenticationType) {
this.globalAuthenticationType = globalAuthenticationType;
}
public static enum AuthenticationType {
Public("PUBLIC"),
AllUsers("ALL_USERS"),
Specified("SPECIFIED");
private final String text;
AuthenticationType(final String text) {
this.text = text;
}
@Override
public String toString() {
return text;
}
@JsonCreator
public static AuthenticationType forValue(String value) {
for (AuthenticationType authenticationType : AuthenticationType.values()) {
if (value.equalsIgnoreCase(authenticationType.text)) {
return authenticationType;
}
}
throw new IllegalArgumentException("No constant with text " + value + " found");
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy