
org.appng.api.rest.model.Permission Maven / Gradle / Ivy
The newest version!
/*
* appNG REST API
* The REST API for appNG
*
* OpenAPI spec version: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.appng.api.rest.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* A permission.
*/
@ApiModel(description = "A permission.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-06-21T16:08:07.881+02:00")
public class Permission implements Serializable {
private static final long serialVersionUID = 1L;
/**
* The mode
*/
public enum ModeEnum {
READ("READ"),
SET("SET");
private String value;
ModeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ModeEnum fromValue(String text) {
for (ModeEnum b : ModeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("mode")
private ModeEnum mode = null;
@JsonProperty("ref")
private String ref = null;
@JsonProperty("value")
private Boolean value = null;
public Permission mode(ModeEnum mode) {
this.mode = mode;
return this;
}
/**
* The mode
* @return mode
**/
@ApiModelProperty(value = "The mode")
public ModeEnum getMode() {
return mode;
}
public void setMode(ModeEnum mode) {
this.mode = mode;
}
public Permission ref(String ref) {
this.ref = ref;
return this;
}
/**
* The reference id of the permission.
* @return ref
**/
@ApiModelProperty(value = "The reference id of the permission.")
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public Permission value(Boolean value) {
this.value = value;
return this;
}
/**
* The value, true if the permission is present.
* @return value
**/
@ApiModelProperty(value = "The value, true if the permission is present.")
public Boolean isValue() {
return value;
}
public void setValue(Boolean value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Permission permission = (Permission) o;
return Objects.equals(this.mode, permission.mode) &&
Objects.equals(this.ref, permission.ref) &&
Objects.equals(this.value, permission.value);
}
@Override
public int hashCode() {
return Objects.hash(mode, ref, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Permission {\n");
sb.append(" mode: ").append(toIndentedString(mode)).append("\n");
sb.append(" ref: ").append(toIndentedString(ref)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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 String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy