135 lines
2.9 KiB
Java
135 lines
2.9 KiB
Java
package com.inteligr8.alfresco.acs.model;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import javax.xml.bind.annotation.XmlEnum;
|
|
import javax.xml.bind.annotation.XmlEnumValue;
|
|
import javax.xml.bind.annotation.XmlType;
|
|
|
|
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
|
|
public class SiteGroup {
|
|
|
|
@ApiModelProperty(required = true, value = "")
|
|
private String id = null;
|
|
|
|
@ApiModelProperty(required = true, value = "")
|
|
private GroupMember group = null;
|
|
|
|
|
|
@XmlType(name="RoleEnum")
|
|
@XmlEnum(String.class)
|
|
public enum RoleEnum {
|
|
|
|
@XmlEnumValue("SiteConsumer") SITECONSUMER(String.valueOf("SiteConsumer")), @XmlEnumValue("SiteCollaborator") SITECOLLABORATOR(String.valueOf("SiteCollaborator")), @XmlEnumValue("SiteContributor") SITECONTRIBUTOR(String.valueOf("SiteContributor")), @XmlEnumValue("SiteManager") SITEMANAGER(String.valueOf("SiteManager"));
|
|
|
|
|
|
private String value;
|
|
|
|
RoleEnum (String v) {
|
|
value = v;
|
|
}
|
|
|
|
public String value() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
public static RoleEnum fromValue(String v) {
|
|
for (RoleEnum b : RoleEnum.values()) {
|
|
if (String.valueOf(b.value).equals(v)) {
|
|
return b;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@ApiModelProperty(required = true, value = "")
|
|
private RoleEnum role = null;
|
|
/**
|
|
* Get id
|
|
* @return id
|
|
**/
|
|
@JsonProperty("id")
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public SiteGroup id(String id) {
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get group
|
|
* @return group
|
|
**/
|
|
@JsonProperty("group")
|
|
public GroupMember getGroup() {
|
|
return group;
|
|
}
|
|
|
|
public void setGroup(GroupMember group) {
|
|
this.group = group;
|
|
}
|
|
|
|
public SiteGroup group(GroupMember group) {
|
|
this.group = group;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get role
|
|
* @return role
|
|
**/
|
|
@JsonProperty("role")
|
|
public String getRole() {
|
|
if (role == null) {
|
|
return null;
|
|
}
|
|
return role.value();
|
|
}
|
|
|
|
public void setRole(RoleEnum role) {
|
|
this.role = role;
|
|
}
|
|
|
|
public SiteGroup role(RoleEnum role) {
|
|
this.role = role;
|
|
return this;
|
|
}
|
|
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class SiteGroup {\n");
|
|
|
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
|
sb.append(" group: ").append(toIndentedString(group)).append("\n");
|
|
sb.append(" role: ").append(toIndentedString(role)).append("\n");
|
|
sb.append("}");
|
|
return sb.toString();
|
|
}
|
|
|
|
/**
|
|
* Convert the given object to string with each line indented by 4 spaces
|
|
* (except the first line).
|
|
*/
|
|
private static String toIndentedString(java.lang.Object o) {
|
|
if (o == null) {
|
|
return "null";
|
|
}
|
|
return o.toString().replace("\n", "\n ");
|
|
}
|
|
}
|
|
|