/*
 * Copyright 2016-2017 Stefan Kalscheuer
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package de.stklcode.jvault.connector.model.response.embedded;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Embedded token information inside Vault response.
 *
 * @author  Stefan Kalscheuer
 * @since   0.1
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public final class TokenData {
    @JsonProperty("accessor")
    private String accessor;

    @JsonProperty("creation_time")
    private Integer creationTime;

    @JsonProperty("creation_ttl")
    private Integer creatinTtl;

    @JsonProperty("display_name")
    private String name;

    @JsonProperty("id")
    private String id;

    @JsonProperty("meta")
    private String meta;

    @JsonProperty("num_uses")
    private Integer numUses;

    @JsonProperty("orphan")
    private boolean orphan;

    @JsonProperty("path")
    private String path;

    @JsonProperty("role")
    private String role;

    @JsonProperty("ttl")
    private Integer ttl;

    public String getAccessor() {
        return accessor;
    }

    public Integer getCreationTime() {
        return creationTime;
    }

    public Integer getCreatinTtl() {
        return creatinTtl;
    }

    public String getName() {
        return name;
    }

    public String getId() {
        return id;
    }

    public Integer getNumUses() {
        return numUses;
    }

    public boolean isOrphan() {
        return orphan;
    }

    public String getPath() {
        return path;
    }

    public String getRole() {
        return role;
    }

    public Integer getTtl() {
        return ttl;
    }

    public String getMeta() {
        return meta;
    }
}
@@ -1147,24 +1147,25 @@
 teger creati
+o
 nTtl;%0A%0A    @
@@ -1587,24 +1587,70 @@
 teger ttl;%0A%0A
+    /**%0A     * @return Token accessor%0A     */%0A
     public S
@@ -1695,32 +1695,77 @@
 ccessor;%0A    %7D%0A%0A
+    /**%0A     * @return Creation time%0A     */%0A
     public Integ
@@ -1815,32 +1815,89 @@
 ionTime;%0A    %7D%0A%0A
+    /**%0A     * @return Creation TTL (in seconds)%0A     */%0A
     public Integ
@@ -1904,24 +1904,25 @@
 er getCreati
+o
 nTtl() %7B%0A   
@@ -1939,16 +1939,17 @@
 n creati
+o
 nTtl;%0A  
@@ -1945,32 +1945,74 @@
 tionTtl;%0A    %7D%0A%0A
+    /**%0A     * @return Token name%0A     */%0A
     public Strin
@@ -2045,32 +2045,72 @@
 rn name;%0A    %7D%0A%0A
+    /**%0A     * @return Token ID%0A     */%0A
     public Strin
@@ -2139,32 +2139,78 @@
 turn id;%0A    %7D%0A%0A
+    /**%0A     * @return Number of uses%0A     */%0A
     public Integ
@@ -2250,32 +2250,79 @@
 numUses;%0A    %7D%0A%0A
+    /**%0A     * @return Token is orphan%0A     */%0A
     public boole
@@ -2359,32 +2359,74 @@
  orphan;%0A    %7D%0A%0A
+    /**%0A     * @return Token path%0A     */%0A
     public Strin
@@ -2459,32 +2459,74 @@
 rn path;%0A    %7D%0A%0A
+    /**%0A     * @return Token role%0A     */%0A
     public Strin
@@ -2559,32 +2559,86 @@
 rn role;%0A    %7D%0A%0A
+    /**%0A     * @return Token TTL (in seconds)%0A     */%0A
     public Integ
@@ -2674,24 +2674,64 @@
 ttl;%0A    %7D%0A%0A
+    /**%0A     * @return Metadata%0A     */%0A
     public S
@@ -2776,8 +2776,9 @@
 %0A    %7D%0A%7D
+%0A

Fix typo in TokenData.getCreationTtl()