net.leanix.mtm.api.models.ApiToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leanix-mtm-sdk-java Show documentation
Show all versions of leanix-mtm-sdk-java Show documentation
SDK for Java to access leanIX MTM REST API
/*
* LeanIX MTM REST API
* Multi-tenancy-manager for LeanIX. Manages accounts, contracts, users, workspaces, permissions, and more.
*
* OpenAPI spec version: 1.6.348
*
*
* 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 net.leanix.mtm.api.models;
import java.util.Objects;
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.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* ApiToken
*/
public class ApiToken {
@JsonProperty("id")
private UUID id = null;
@JsonProperty("token")
private String token = null;
@JsonProperty("name")
private String name = null;
@JsonProperty("internal")
private Boolean internal = false;
@JsonProperty("userId")
private UUID userId = null;
@JsonProperty("workspaceId")
private UUID workspaceId = null;
@JsonProperty("expiry")
private OffsetDateTime expiry = null;
@JsonProperty("scopes")
private List scopes = null;
@JsonProperty("description")
private String description = null;
@JsonProperty("creatorId")
private UUID creatorId = null;
public ApiToken id(UUID id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@ApiModelProperty(value = "")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public ApiToken token(String token) {
this.token = token;
return this;
}
/**
* Get token
* @return token
**/
@ApiModelProperty(value = "")
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public ApiToken name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ApiToken internal(Boolean internal) {
this.internal = internal;
return this;
}
/**
* Get internal
* @return internal
**/
@ApiModelProperty(value = "")
public Boolean getInternal() {
return internal;
}
public void setInternal(Boolean internal) {
this.internal = internal;
}
public ApiToken userId(UUID userId) {
this.userId = userId;
return this;
}
/**
* Get userId
* @return userId
**/
@ApiModelProperty(required = true, value = "")
public UUID getUserId() {
return userId;
}
public void setUserId(UUID userId) {
this.userId = userId;
}
public ApiToken workspaceId(UUID workspaceId) {
this.workspaceId = workspaceId;
return this;
}
/**
* Get workspaceId
* @return workspaceId
**/
@ApiModelProperty(required = true, value = "")
public UUID getWorkspaceId() {
return workspaceId;
}
public void setWorkspaceId(UUID workspaceId) {
this.workspaceId = workspaceId;
}
public ApiToken expiry(OffsetDateTime expiry) {
this.expiry = expiry;
return this;
}
/**
* Get expiry
* @return expiry
**/
@ApiModelProperty(required = true, value = "")
public OffsetDateTime getExpiry() {
return expiry;
}
public void setExpiry(OffsetDateTime expiry) {
this.expiry = expiry;
}
public ApiToken scopes(List scopes) {
this.scopes = scopes;
return this;
}
public ApiToken addScopesItem(String scopesItem) {
if (this.scopes == null) {
this.scopes = new ArrayList();
}
this.scopes.add(scopesItem);
return this;
}
/**
* Get scopes
* @return scopes
**/
@ApiModelProperty(value = "")
public List getScopes() {
return scopes;
}
public void setScopes(List scopes) {
this.scopes = scopes;
}
public ApiToken description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
**/
@ApiModelProperty(value = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public ApiToken creatorId(UUID creatorId) {
this.creatorId = creatorId;
return this;
}
/**
* Get creatorId
* @return creatorId
**/
@ApiModelProperty(required = true, value = "")
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