net.leanix.mtm.api.models.ApiToken Maven / Gradle / Ivy
package net.leanix.mtm.api.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
public class ApiToken {
private UUID id = null;
private String token = null;
private String name = null;
private Boolean internal = false;
private UUID userId = null;
private UUID workspaceId = null;
private Date expiry = null;
private List scopes = new ArrayList();
private String description = null;
private UUID creatorId = null;
/**
**/
public ApiToken id(UUID id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("id")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
/**
**/
public ApiToken token(String token) {
this.token = token;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("token")
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
/**
**/
public ApiToken name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public ApiToken internal(Boolean internal) {
this.internal = internal;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("internal")
public Boolean getInternal() {
return internal;
}
public void setInternal(Boolean internal) {
this.internal = internal;
}
/**
**/
public ApiToken userId(UUID userId) {
this.userId = userId;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("userId")
public UUID getUserId() {
return userId;
}
public void setUserId(UUID userId) {
this.userId = userId;
}
/**
**/
public ApiToken workspaceId(UUID workspaceId) {
this.workspaceId = workspaceId;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("workspaceId")
public UUID getWorkspaceId() {
return workspaceId;
}
public void setWorkspaceId(UUID workspaceId) {
this.workspaceId = workspaceId;
}
/**
**/
public ApiToken expiry(Date expiry) {
this.expiry = expiry;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("expiry")
public Date getExpiry() {
return expiry;
}
public void setExpiry(Date expiry) {
this.expiry = expiry;
}
/**
**/
public ApiToken scopes(List scopes) {
this.scopes = scopes;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("scopes")
public List getScopes() {
return scopes;
}
public void setScopes(List scopes) {
this.scopes = scopes;
}
/**
**/
public ApiToken description(String description) {
this.description = description;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
**/
public ApiToken creatorId(UUID creatorId) {
this.creatorId = creatorId;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("creatorId")
public UUID getCreatorId() {
return creatorId;
}
public void setCreatorId(UUID creatorId) {
this.creatorId = creatorId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApiToken apiToken = (ApiToken) o;
return Objects.equals(this.id, apiToken.id) &&
Objects.equals(this.token, apiToken.token) &&
Objects.equals(this.name, apiToken.name) &&
Objects.equals(this.internal, apiToken.internal) &&
Objects.equals(this.userId, apiToken.userId) &&
Objects.equals(this.workspaceId, apiToken.workspaceId) &&
Objects.equals(this.expiry, apiToken.expiry) &&
Objects.equals(this.scopes, apiToken.scopes) &&
Objects.equals(this.description, apiToken.description) &&
Objects.equals(this.creatorId, apiToken.creatorId);
}
@Override
public int hashCode() {
return Objects.hash(id, token, name, internal, userId, workspaceId, expiry, scopes, description, creatorId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApiToken {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" token: ").append(toIndentedString(token)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" internal: ").append(toIndentedString(internal)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" workspaceId: ").append(toIndentedString(workspaceId)).append("\n");
sb.append(" expiry: ").append(toIndentedString(expiry)).append("\n");
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" creatorId: ").append(toIndentedString(creatorId)).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