dev.bf2.ffm.ams.client.models.PermissionAllOf Maven / Gradle / Ivy
/*
* Account Management Service API
* Manage user subscriptions and clusters
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package dev.bf2.ffm.ams.client.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* PermissionAllOf
*/
@JsonPropertyOrder({
PermissionAllOf.JSON_PROPERTY_ACTION,
PermissionAllOf.JSON_PROPERTY_RESOURCE
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PermissionAllOf {
/**
* Gets or Sets action
*/
public enum ActionEnum {
GET("get"),
LIST("list"),
CREATE("create"),
DELETE("delete"),
UPDATE("update");
private String value;
ActionEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ActionEnum fromValue(String value) {
for (ActionEnum b : ActionEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ACTION = "action";
private ActionEnum action;
public static final String JSON_PROPERTY_RESOURCE = "resource";
private String resource;
public PermissionAllOf() {
}
public PermissionAllOf action(ActionEnum action) {
this.action = action;
return this;
}
/**
* Get action
* @return action
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ActionEnum getAction() {
return action;
}
@JsonProperty(JSON_PROPERTY_ACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAction(ActionEnum action) {
this.action = action;
}
public PermissionAllOf resource(String resource) {
this.resource = resource;
return this;
}
/**
* Get resource
* @return resource
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_RESOURCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getResource() {
return resource;
}
@JsonProperty(JSON_PROPERTY_RESOURCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResource(String resource) {
this.resource = resource;
}
/**
* Return true if this Permission_allOf object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PermissionAllOf permissionAllOf = (PermissionAllOf) o;
return Objects.equals(this.action, permissionAllOf.action) &&
Objects.equals(this.resource, permissionAllOf.resource);
}
@Override
public int hashCode() {
return Objects.hash(action, resource);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PermissionAllOf {\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" resource: ").append(toIndentedString(resource)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}