Class 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
    • 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
    • Constructor Detail

      • Token

        public Token()
    • 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)
      • 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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