|
1 | 1 | package com.auth0.json.mgmt.connections; |
2 | 2 |
|
3 | | -import com.fasterxml.jackson.annotation.JsonFormat; |
4 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
5 | 4 | import com.fasterxml.jackson.annotation.JsonInclude; |
6 | 5 | import com.fasterxml.jackson.annotation.JsonProperty; |
7 | 6 |
|
8 | | -import java.util.Date; |
9 | | - |
10 | 7 | @JsonIgnoreProperties(ignoreUnknown = true) |
11 | 8 | @JsonInclude(JsonInclude.Include.NON_NULL) |
12 | 9 | public class ConnectionKeys { |
@@ -37,97 +34,184 @@ public class ConnectionKeys { |
37 | 34 | @JsonProperty("current") |
38 | 35 | private Boolean current; |
39 | 36 |
|
40 | | - @JsonFormat(shape = JsonFormat.Shape.STRING) |
41 | 37 | @JsonProperty("current_since") |
42 | | - private Date currentSince; |
| 38 | + private String currentSince; |
43 | 39 |
|
44 | 40 | @JsonProperty("next") |
45 | 41 | private Boolean next; |
46 | 42 |
|
| 43 | + /** |
| 44 | + * Getter for the Key ID (kid). |
| 45 | + * @return the Key ID (kid). |
| 46 | + */ |
47 | 47 | public String getKid() { |
48 | 48 | return kid; |
49 | 49 | } |
50 | 50 |
|
| 51 | + /** |
| 52 | + * Setter for the Key ID (kid). |
| 53 | + * @param kid the Key ID (kid). |
| 54 | + */ |
51 | 55 | public void setKid(String kid) { |
52 | 56 | this.kid = kid; |
53 | 57 | } |
54 | 58 |
|
| 59 | + /** |
| 60 | + * Getter for the algorithm used by the key. |
| 61 | + * @return the algorithm used by the key. |
| 62 | + */ |
55 | 63 | public String getAlgorithm() { |
56 | 64 | return algorithm; |
57 | 65 | } |
58 | 66 |
|
| 67 | + /** |
| 68 | + * Setter for the algorithm used by the key. |
| 69 | + * @param algorithm the algorithm used by the key. |
| 70 | + */ |
59 | 71 | public void setAlgorithm(String algorithm) { |
60 | 72 | this.algorithm = algorithm; |
61 | 73 | } |
62 | 74 |
|
| 75 | + /** |
| 76 | + * Getter for the key use (e.g., "sig" for signature). |
| 77 | + * @return the key use. |
| 78 | + */ |
63 | 79 | public String getKeyUse() { |
64 | 80 | return keyUse; |
65 | 81 | } |
66 | 82 |
|
| 83 | + /** |
| 84 | + * Setter for the key use. |
| 85 | + * @param keyUse the key use (e.g., "sig" for signature). |
| 86 | + */ |
67 | 87 | public void setKeyUse(String keyUse) { |
68 | 88 | this.keyUse = keyUse; |
69 | 89 | } |
70 | 90 |
|
| 91 | + /** |
| 92 | + * Getter for the subject distinguished name (DN). |
| 93 | + * @return the subject DN. |
| 94 | + */ |
71 | 95 | public String getSubjectDn() { |
72 | 96 | return subjectDn; |
73 | 97 | } |
74 | 98 |
|
| 99 | + /** |
| 100 | + * Setter for the subject distinguished name (DN). |
| 101 | + * @param subjectDn the subject DN. |
| 102 | + */ |
75 | 103 | public void setSubjectDn(String subjectDn) { |
76 | 104 | this.subjectDn = subjectDn; |
77 | 105 | } |
78 | 106 |
|
| 107 | + /** |
| 108 | + * Getter for the certificate associated with the key. |
| 109 | + * @return the certificate. |
| 110 | + */ |
79 | 111 | public String getCert() { |
80 | 112 | return cert; |
81 | 113 | } |
82 | 114 |
|
| 115 | + /** |
| 116 | + * Setter for the certificate associated with the key. |
| 117 | + * @param cert the certificate. |
| 118 | + */ |
83 | 119 | public void setCert(String cert) { |
84 | 120 | this.cert = cert; |
85 | 121 | } |
86 | 122 |
|
| 123 | + /** |
| 124 | + * Getter for the fingerprint of the key. |
| 125 | + * @return the fingerprint. |
| 126 | + */ |
87 | 127 | public String getFingerprint() { |
88 | 128 | return fingerprint; |
89 | 129 | } |
90 | 130 |
|
| 131 | + /** |
| 132 | + * Setter for the fingerprint of the key. |
| 133 | + * @param fingerprint the fingerprint. |
| 134 | + */ |
91 | 135 | public void setFingerprint(String fingerprint) { |
92 | 136 | this.fingerprint = fingerprint; |
93 | 137 | } |
94 | 138 |
|
| 139 | + /** |
| 140 | + * Getter for the thumbprint of the key. |
| 141 | + * @return the thumbprint. |
| 142 | + */ |
95 | 143 | public String getThumbprint() { |
96 | 144 | return thumbprint; |
97 | 145 | } |
98 | 146 |
|
| 147 | + /** |
| 148 | + * Setter for the thumbprint of the key. |
| 149 | + * @param thumbprint the thumbprint. |
| 150 | + */ |
99 | 151 | public void setThumbprint(String thumbprint) { |
100 | 152 | this.thumbprint = thumbprint; |
101 | 153 | } |
102 | 154 |
|
| 155 | + /** |
| 156 | + * Getter for the PKCS#8 representation of the key. |
| 157 | + * @return the PKCS#8 representation. |
| 158 | + */ |
103 | 159 | public String getPkcs() { |
104 | 160 | return pkcs; |
105 | 161 | } |
106 | 162 |
|
| 163 | + /** |
| 164 | + * Setter for the PKCS#8 representation of the key. |
| 165 | + * @param pkcs the PKCS#8 representation. |
| 166 | + */ |
107 | 167 | public void setPkcs(String pkcs) { |
108 | 168 | this.pkcs = pkcs; |
109 | 169 | } |
110 | 170 |
|
| 171 | + /** |
| 172 | + * Getter for whether the key is currently active. |
| 173 | + * @return true if the key is current, false otherwise. |
| 174 | + */ |
111 | 175 | public Boolean getCurrent() { |
112 | 176 | return current; |
113 | 177 | } |
114 | 178 |
|
| 179 | + /** |
| 180 | + * Setter for whether the key is currently active. |
| 181 | + * @param current true if the key is current, false otherwise. |
| 182 | + */ |
115 | 183 | public void setCurrent(Boolean current) { |
116 | 184 | this.current = current; |
117 | 185 | } |
118 | 186 |
|
119 | | - public Date getCurrentSince() { |
| 187 | + /** |
| 188 | + * Getter for the timestamp when the key became current. |
| 189 | + * @return the timestamp in ISO 8601 format. |
| 190 | + */ |
| 191 | + public String getCurrentSince() { |
120 | 192 | return currentSince; |
121 | 193 | } |
122 | 194 |
|
123 | | - public void setCurrentSince(Date currentSince) { |
| 195 | + /** |
| 196 | + * Setter for the timestamp when the key became current. |
| 197 | + * @param currentSince the timestamp in ISO 8601 format. |
| 198 | + */ |
| 199 | + public void setCurrentSince(String currentSince) { |
124 | 200 | this.currentSince = currentSince; |
125 | 201 | } |
126 | 202 |
|
| 203 | + /** |
| 204 | + * Getter for whether there is a next key available. |
| 205 | + * @return true if there is a next key, false otherwise. |
| 206 | + */ |
127 | 207 | public Boolean getNext() { |
128 | 208 | return next; |
129 | 209 | } |
130 | 210 |
|
| 211 | + /** |
| 212 | + * Setter for whether there is a next key available. |
| 213 | + * @param next true if there is a next key, false otherwise. |
| 214 | + */ |
131 | 215 | public void setNext(Boolean next) { |
132 | 216 | this.next = next; |
133 | 217 | } |
|
0 commit comments