edu.utexas.tacc.tapis.tokens.client.gen.model.InlineObject1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tokens-client Show documentation
Show all versions of tokens-client Show documentation
Java client for Tokens Service
/*
* Tokens API
* Manage Tapis Tokens.
*
* The version of the OpenAPI document: 1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package edu.utexas.tacc.tapis.tokens.client.gen.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* InlineObject1
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-06-22T16:07:39.365956-05:00[America/Chicago]")
public class InlineObject1 {
/**
* The type of account (user or service) represented by the token.
*/
@JsonAdapter(AccountTypeEnum.Adapter.class)
public enum AccountTypeEnum {
USER("user"),
SERVICE("service");
private String value;
AccountTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static AccountTypeEnum fromValue(String value) {
for (AccountTypeEnum b : AccountTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final AccountTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public AccountTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return AccountTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "account_type";
@SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE)
private AccountTypeEnum accountType;
public static final String SERIALIZED_NAME_TOKEN_TENANT_ID = "token_tenant_id";
@SerializedName(SERIALIZED_NAME_TOKEN_TENANT_ID)
private String tokenTenantId;
public static final String SERIALIZED_NAME_TOKEN_USERNAME = "token_username";
@SerializedName(SERIALIZED_NAME_TOKEN_USERNAME)
private String tokenUsername;
public static final String SERIALIZED_NAME_DELEGATION_TOKEN = "delegation_token";
@SerializedName(SERIALIZED_NAME_DELEGATION_TOKEN)
private Boolean delegationToken;
public static final String SERIALIZED_NAME_DELEGATION_SUB_TENANT_ID = "delegation_sub_tenant_id";
@SerializedName(SERIALIZED_NAME_DELEGATION_SUB_TENANT_ID)
private String delegationSubTenantId;
public static final String SERIALIZED_NAME_DELEGATION_SUB_USERNAME = "delegation_sub_username";
@SerializedName(SERIALIZED_NAME_DELEGATION_SUB_USERNAME)
private String delegationSubUsername;
public static final String SERIALIZED_NAME_ACCESS_TOKEN_TTL = "access_token_ttl";
@SerializedName(SERIALIZED_NAME_ACCESS_TOKEN_TTL)
private Integer accessTokenTtl;
public static final String SERIALIZED_NAME_GENERATE_REFRESH_TOKEN = "generate_refresh_token";
@SerializedName(SERIALIZED_NAME_GENERATE_REFRESH_TOKEN)
private Boolean generateRefreshToken;
public static final String SERIALIZED_NAME_REFRESH_TOKEN_TTL = "refresh_token_ttl";
@SerializedName(SERIALIZED_NAME_REFRESH_TOKEN_TTL)
private Integer refreshTokenTtl;
public static final String SERIALIZED_NAME_CLAIMS = "claims";
@SerializedName(SERIALIZED_NAME_CLAIMS)
private Object claims;
public InlineObject1 accountType(AccountTypeEnum accountType) {
this.accountType = accountType;
return this;
}
/**
* The type of account (user or service) represented by the token.
* @return accountType
**/
@ApiModelProperty(required = true, value = "The type of account (user or service) represented by the token.")
public AccountTypeEnum getAccountType() {
return accountType;
}
public void setAccountType(AccountTypeEnum accountType) {
this.accountType = accountType;
}
public InlineObject1 tokenTenantId(String tokenTenantId) {
this.tokenTenantId = tokenTenantId;
return this;
}
/**
* The tenant associated with the token to be generated.
* @return tokenTenantId
**/
@ApiModelProperty(required = true, value = "The tenant associated with the token to be generated.")
public String getTokenTenantId() {
return tokenTenantId;
}
public void setTokenTenantId(String tokenTenantId) {
this.tokenTenantId = tokenTenantId;
}
public InlineObject1 tokenUsername(String tokenUsername) {
this.tokenUsername = tokenUsername;
return this;
}
/**
* The username associated with the token to be generated.
* @return tokenUsername
**/
@ApiModelProperty(required = true, value = "The username associated with the token to be generated.")
public String getTokenUsername() {
return tokenUsername;
}
public void setTokenUsername(String tokenUsername) {
this.tokenUsername = tokenUsername;
}
public InlineObject1 delegationToken(Boolean delegationToken) {
this.delegationToken = delegationToken;
return this;
}
/**
* Whether the generated token should be a delegation token.
* @return delegationToken
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Whether the generated token should be a delegation token.")
public Boolean getDelegationToken() {
return delegationToken;
}
public void setDelegationToken(Boolean delegationToken) {
this.delegationToken = delegationToken;
}
public InlineObject1 delegationSubTenantId(String delegationSubTenantId) {
this.delegationSubTenantId = delegationSubTenantId;
return this;
}
/**
* The tenant_id associated with the subject who used a delegation authority in creating the delegation token.
* @return delegationSubTenantId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The tenant_id associated with the subject who used a delegation authority in creating the delegation token.")
public String getDelegationSubTenantId() {
return delegationSubTenantId;
}
public void setDelegationSubTenantId(String delegationSubTenantId) {
this.delegationSubTenantId = delegationSubTenantId;
}
public InlineObject1 delegationSubUsername(String delegationSubUsername) {
this.delegationSubUsername = delegationSubUsername;
return this;
}
/**
* The username associated with the subject who used a delegation authority in creating the delegation token.
* @return delegationSubUsername
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The username associated with the subject who used a delegation authority in creating the delegation token.")
public String getDelegationSubUsername() {
return delegationSubUsername;
}
public void setDelegationSubUsername(String delegationSubUsername) {
this.delegationSubUsername = delegationSubUsername;
}
public InlineObject1 accessTokenTtl(Integer accessTokenTtl) {
this.accessTokenTtl = accessTokenTtl;
return this;
}
/**
* The TTL, in seconds, for the generated token.
* @return accessTokenTtl
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The TTL, in seconds, for the generated token.")
public Integer getAccessTokenTtl() {
return accessTokenTtl;
}
public void setAccessTokenTtl(Integer accessTokenTtl) {
this.accessTokenTtl = accessTokenTtl;
}
public InlineObject1 generateRefreshToken(Boolean generateRefreshToken) {
this.generateRefreshToken = generateRefreshToken;
return this;
}
/**
* Whether to also generate a refresh token.
* @return generateRefreshToken
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Whether to also generate a refresh token.")
public Boolean getGenerateRefreshToken() {
return generateRefreshToken;
}
public void setGenerateRefreshToken(Boolean generateRefreshToken) {
this.generateRefreshToken = generateRefreshToken;
}
public InlineObject1 refreshTokenTtl(Integer refreshTokenTtl) {
this.refreshTokenTtl = refreshTokenTtl;
return this;
}
/**
* The TTL, in seconds, for the refresh token (if generated).
* @return refreshTokenTtl
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The TTL, in seconds, for the refresh token (if generated).")
public Integer getRefreshTokenTtl() {
return refreshTokenTtl;
}
public void setRefreshTokenTtl(Integer refreshTokenTtl) {
this.refreshTokenTtl = refreshTokenTtl;
}
public InlineObject1 claims(Object claims) {
this.claims = claims;
return this;
}
/**
* JSON object of additional claims to add to the standard claims issued with the token. Note - standard claims cannot be modified through this parameter.
* @return claims
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "JSON object of additional claims to add to the standard claims issued with the token. Note - standard claims cannot be modified through this parameter.")
public Object getClaims() {
return claims;
}
public void setClaims(Object claims) {
this.claims = claims;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject1 inlineObject1 = (InlineObject1) o;
return Objects.equals(this.accountType, inlineObject1.accountType) &&
Objects.equals(this.tokenTenantId, inlineObject1.tokenTenantId) &&
Objects.equals(this.tokenUsername, inlineObject1.tokenUsername) &&
Objects.equals(this.delegationToken, inlineObject1.delegationToken) &&
Objects.equals(this.delegationSubTenantId, inlineObject1.delegationSubTenantId) &&
Objects.equals(this.delegationSubUsername, inlineObject1.delegationSubUsername) &&
Objects.equals(this.accessTokenTtl, inlineObject1.accessTokenTtl) &&
Objects.equals(this.generateRefreshToken, inlineObject1.generateRefreshToken) &&
Objects.equals(this.refreshTokenTtl, inlineObject1.refreshTokenTtl) &&
Objects.equals(this.claims, inlineObject1.claims);
}
@Override
public int hashCode() {
return Objects.hash(accountType, tokenTenantId, tokenUsername, delegationToken, delegationSubTenantId, delegationSubUsername, accessTokenTtl, generateRefreshToken, refreshTokenTtl, claims);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject1 {\n");
sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n");
sb.append(" tokenTenantId: ").append(toIndentedString(tokenTenantId)).append("\n");
sb.append(" tokenUsername: ").append(toIndentedString(tokenUsername)).append("\n");
sb.append(" delegationToken: ").append(toIndentedString(delegationToken)).append("\n");
sb.append(" delegationSubTenantId: ").append(toIndentedString(delegationSubTenantId)).append("\n");
sb.append(" delegationSubUsername: ").append(toIndentedString(delegationSubUsername)).append("\n");
sb.append(" accessTokenTtl: ").append(toIndentedString(accessTokenTtl)).append("\n");
sb.append(" generateRefreshToken: ").append(toIndentedString(generateRefreshToken)).append("\n");
sb.append(" refreshTokenTtl: ").append(toIndentedString(refreshTokenTtl)).append("\n");
sb.append(" claims: ").append(toIndentedString(claims)).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 ");
}
}