Package io.tiledb.cloud.rest_api.model
Class Token
- java.lang.Object
-
- io.tiledb.cloud.rest_api.model.Token
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-10-02T12:25:58.319138+03:00[Europe/Athens]") public class Token extends java.lang.Object
A api token and its metadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Token.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashSet<java.lang.String>
openapiFields
static java.util.HashSet<java.lang.String>
openapiRequiredFields
static java.lang.String
SERIALIZED_NAME_EXPIRES_AT
static java.lang.String
SERIALIZED_NAME_ISSUED_AT
static java.lang.String
SERIALIZED_NAME_NAME
static java.lang.String
SERIALIZED_NAME_SCOPE
static java.lang.String
SERIALIZED_NAME_TOKEN
-
Constructor Summary
Constructors Constructor Description Token()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
addScopeItem(TokenScope scopeItem)
boolean
equals(java.lang.Object o)
Token
expiresAt(java.time.OffsetDateTime expiresAt)
static Token
fromJson(java.lang.String jsonString)
Create an instance of Token given an JSON stringjava.util.Map<java.lang.String,java.lang.Object>
getAdditionalProperties()
Return the additional (undeclared) property.java.lang.Object
getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.java.time.OffsetDateTime
getExpiresAt()
datetime the token when token will expirejava.time.OffsetDateTime
getIssuedAt()
datetime the token was createdjava.lang.String
getName()
Name of token to revokejava.util.List<TokenScope>
getScope()
Optional scope to limit token, defaults to all permissions, current supported values are password_reset or *java.lang.String
getToken()
A api tokenint
hashCode()
Token
issuedAt(java.time.OffsetDateTime issuedAt)
Token
name(java.lang.String name)
Token
putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value.Token
scope(java.util.List<TokenScope> scope)
void
setExpiresAt(java.time.OffsetDateTime expiresAt)
void
setIssuedAt(java.time.OffsetDateTime issuedAt)
void
setName(java.lang.String name)
void
setScope(java.util.List<TokenScope> scope)
void
setToken(java.lang.String token)
java.lang.String
toJson()
Convert an instance of Token to an JSON stringToken
token(java.lang.String token)
java.lang.String
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_TOKEN
public static final java.lang.String SERIALIZED_NAME_TOKEN
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final java.lang.String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ISSUED_AT
public static final java.lang.String SERIALIZED_NAME_ISSUED_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXPIRES_AT
public static final java.lang.String SERIALIZED_NAME_EXPIRES_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SCOPE
public static final java.lang.String SERIALIZED_NAME_SCOPE
- See Also:
- Constant Field Values
-
openapiFields
public static java.util.HashSet<java.lang.String> openapiFields
-
openapiRequiredFields
public static java.util.HashSet<java.lang.String> openapiRequiredFields
-
-
Method Detail
-
token
public Token token(java.lang.String token)
-
getToken
@Nullable public java.lang.String getToken()
A api token- Returns:
- token
-
setToken
public void setToken(java.lang.String token)
-
name
public Token name(java.lang.String name)
-
getName
@Nullable public java.lang.String getName()
Name of token to revoke- Returns:
- name
-
setName
public void setName(java.lang.String name)
-
issuedAt
public Token issuedAt(java.time.OffsetDateTime issuedAt)
-
getIssuedAt
@Nullable public java.time.OffsetDateTime getIssuedAt()
datetime the token was created- Returns:
- issuedAt
-
setIssuedAt
public void setIssuedAt(java.time.OffsetDateTime issuedAt)
-
expiresAt
public Token expiresAt(java.time.OffsetDateTime expiresAt)
-
getExpiresAt
@Nullable public java.time.OffsetDateTime getExpiresAt()
datetime the token when token will expire- Returns:
- expiresAt
-
setExpiresAt
public void setExpiresAt(java.time.OffsetDateTime expiresAt)
-
scope
public Token scope(java.util.List<TokenScope> scope)
-
addScopeItem
public Token addScopeItem(TokenScope scopeItem)
-
getScope
@Nullable public java.util.List<TokenScope> getScope()
Optional scope to limit token, defaults to all permissions, current supported values are password_reset or *- Returns:
- scope
-
setScope
public void setScope(java.util.List<TokenScope> scope)
-
putAdditionalProperty
public Token putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
Return the additional (undeclared) property.
-
getAdditionalProperty
public java.lang.Object getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws java.io.IOException
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
java.io.IOException
- if the JSON Object is invalid with respect to Token
-
fromJson
public static Token fromJson(java.lang.String jsonString) throws java.io.IOException
Create an instance of Token given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of Token
- Throws:
java.io.IOException
- if the JSON string is invalid with respect to Token
-
toJson
public java.lang.String toJson()
Convert an instance of Token to an JSON string- Returns:
- JSON string
-
-