dev.bf2.ffm.ams.client.models.Role 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 dev.bf2.ffm.ams.client.models.ObjectReference;
import dev.bf2.ffm.ams.client.models.Permission;
import dev.bf2.ffm.ams.client.models.RoleAllOf;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Role
*/
@JsonPropertyOrder({
Role.JSON_PROPERTY_HREF,
Role.JSON_PROPERTY_ID,
Role.JSON_PROPERTY_KIND,
Role.JSON_PROPERTY_NAME,
Role.JSON_PROPERTY_PERMISSIONS
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Role {
public static final String JSON_PROPERTY_HREF = "href";
private String href;
public static final String JSON_PROPERTY_ID = "id";
private String id;
public static final String JSON_PROPERTY_KIND = "kind";
private String kind;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_PERMISSIONS = "permissions";
private List permissions = null;
public Role() {
}
public Role href(String href) {
this.href = href;
return this;
}
/**
* Get href
* @return href
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_HREF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getHref() {
return href;
}
@JsonProperty(JSON_PROPERTY_HREF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHref(String href) {
this.href = href;
}
public Role id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
}
public Role kind(String kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getKind() {
return kind;
}
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setKind(String kind) {
this.kind = kind;
}
public Role name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
public Role permissions(List permissions) {
this.permissions = permissions;
return this;
}
public Role addPermissionsItem(Permission permissionsItem) {
if (this.permissions == null) {
this.permissions = new ArrayList<>();
}
this.permissions.add(permissionsItem);
return this;
}
/**
* Get permissions
* @return permissions
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PERMISSIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getPermissions() {
return permissions;
}
@JsonProperty(JSON_PROPERTY_PERMISSIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPermissions(List permissions) {
this.permissions = permissions;
}
/**
* Return true if this Role object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Role role = (Role) o;
return Objects.equals(this.href, role.href) &&
Objects.equals(this.id, role.id) &&
Objects.equals(this.kind, role.kind) &&
Objects.equals(this.name, role.name) &&
Objects.equals(this.permissions, role.permissions);
}
@Override
public int hashCode() {
return Objects.hash(href, id, kind, name, permissions);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Role {\n");
sb.append(" href: ").append(toIndentedString(href)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" permissions: ").append(toIndentedString(permissions)).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 ");
}
}