Package io.tiledb.cloud.rest_api.model
Class TokenRequest
- java.lang.Object
-
- io.tiledb.cloud.rest_api.model.TokenRequest
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-10-02T12:25:58.319138+03:00[Europe/Athens]") public class TokenRequest extends java.lang.Object
A request from a user for an api token
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TokenRequest.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
static java.lang.String
SERIALIZED_NAME_NAME
static java.lang.String
SERIALIZED_NAME_SCOPE
-
Constructor Summary
Constructors Constructor Description TokenRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenRequest
addScopeItem(TokenScope scopeItem)
boolean
equals(java.lang.Object o)
TokenRequest
expires(java.time.OffsetDateTime expires)
static TokenRequest
fromJson(java.lang.String jsonString)
Create an instance of TokenRequest 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
getExpires()
Expiration date for token, if empty token defaults to 30 minutesjava.lang.String
getName()
Optional name for token, if the name already exists for the user it will be auto incremented (i.e.java.util.List<TokenScope>
getScope()
Optional scope to limit token, defaults to all permissions, current supported values are password_reset or *int
hashCode()
TokenRequest
name(java.lang.String name)
TokenRequest
putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value.TokenRequest
scope(java.util.List<TokenScope> scope)
void
setExpires(java.time.OffsetDateTime expires)
void
setName(java.lang.String name)
void
setScope(java.util.List<TokenScope> scope)
java.lang.String
toJson()
Convert an instance of TokenRequest to an JSON stringjava.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_EXPIRES
public static final java.lang.String SERIALIZED_NAME_EXPIRES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final java.lang.String SERIALIZED_NAME_NAME
- 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
-
expires
public TokenRequest expires(java.time.OffsetDateTime expires)
-
getExpires
@Nullable public java.time.OffsetDateTime getExpires()
Expiration date for token, if empty token defaults to 30 minutes- Returns:
- expires
-
setExpires
public void setExpires(java.time.OffsetDateTime expires)
-
name
public TokenRequest name(java.lang.String name)
-
getName
@Nullable public java.lang.String getName()
Optional name for token, if the name already exists for the user it will be auto incremented (i.e. myToken-1)- Returns:
- name
-
setName
public void setName(java.lang.String name)
-
scope
public TokenRequest scope(java.util.List<TokenScope> scope)
-
addScopeItem
public TokenRequest 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 TokenRequest 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 TokenRequest
-
fromJson
public static TokenRequest fromJson(java.lang.String jsonString) throws java.io.IOException
Create an instance of TokenRequest given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of TokenRequest
- Throws:
java.io.IOException
- if the JSON string is invalid with respect to TokenRequest
-
toJson
public java.lang.String toJson()
Convert an instance of TokenRequest to an JSON string- Returns:
- JSON string
-
-