package io.subutai.hub.share.dto;


import java.util.Date;


public class UserTokenDto
{
    public enum State
    {
        EXPIRED, READY, DELETE, EMPTY
    }


    private Long userId;

    private String authId;

    private String token;

    private String tokenId;

    private Date validDate;

    private State state;


    public UserTokenDto()
    {
    }


    public UserTokenDto( final Long userId, final String authId, final String token, final String tokenId,
                         final Date validDate )
    {
        this.userId = userId;
        this.authId = authId;
        this.token = token;
        this.tokenId = tokenId;
        this.validDate = validDate;
        this.state = State.READY;
    }


    public Long getUserId()
    {
        return userId;
    }


    public void setUserId( final Long userId )
    {
        this.userId = userId;
    }


    public String getAuthId()
    {
        return authId;
    }


    public void setAuthId( final String authId )
    {
        this.authId = authId;
    }


    public String getToken()
    {
        return token;
    }


    public void setToken( final String token )
    {
        this.token = token;
    }


    public String getTokenId()
    {
        return tokenId;
    }


    public void setTokenId( final String tokenId )
    {
        this.tokenId = tokenId;
    }


    public State getState()
    {
        return state;
    }


    public void setState( final State state )
    {
        this.state = state;
    }


    public Date getValidDate()
    {
        return validDate;
    }


    public void setValidDate( final Date validDate )
    {
        this.validDate = validDate;
    }
}

@@ -152,24 +152,97 @@
 PTY%0A    %7D%0A%0A%0A
+    public enum Type%0A    %7B%0A        USER, ENV_USER, GITHUB, OTHER%0A    %7D%0A%0A%0A
     private 
@@ -394,16 +394,40 @@
 state;%0A%0A
+    private Type type;%0A%0A
 %0A    pub
@@ -1778,10 +1778,154 @@
 ;%0A    %7D%0A
+%0A%0A    public Type getType()%0A    %7B%0A        return type;%0A    %7D%0A%0A%0A    public void setType( final Type type )%0A    %7B%0A        this.type = type;%0A    %7D%0A
 %7D%0A

add type for userTokenDto