Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
AuthTokenResponse.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2023 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package com.basistech.df.cybertriage.autopsy.ctapi.json;
20
21import com.basistech.df.cybertriage.autopsy.ctapi.util.ObjectMapperUtil.InstantEpochMillisDeserializer;
22import com.basistech.df.cybertriage.autopsy.ctapi.util.ObjectMapperUtil.InstantEpochSecsDeserializer;
23import com.fasterxml.jackson.annotation.JsonCreator;
24import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
25import com.fasterxml.jackson.annotation.JsonProperty;
26import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
27import java.time.Instant;
28
32@JsonIgnoreProperties(ignoreUnknown = true)
33public class AuthTokenResponse {
34
35 private final Long hashLookupCount;
36 private final Long hashLookupLimit;
37 private final Long fileUploadLimit;
38 private final Long fileUploadCount;
39 private final String fileUploadUrl;
40 private final Instant expiration;
41 private final String token;
42 private final String apiKey;
43 private final Instant resetDate;
44
45 @JsonCreator
47 @JsonProperty("token") String token,
48 @JsonProperty("api_key") String apiKey,
49 @JsonProperty("hashLookupCount") Long hashLookupCount,
50 @JsonProperty("hashLookupLimit") Long hashLookupLimit,
51 @JsonProperty("fileUploadLimit") Long fileUploadLimit,
52 @JsonProperty("fileUploadCount") Long fileUploadCount,
53 @JsonProperty("fileUploadUrl") String fileUploadUrl,
54 @JsonDeserialize(using = InstantEpochSecsDeserializer.class)
55 @JsonProperty("expiration") Instant expiration,
56 @JsonDeserialize(using = InstantEpochMillisDeserializer.class)
57 @JsonProperty("resetDate") Instant resetDate
58 ) {
59 this.token = token;
60 this.apiKey = apiKey;
61 this.hashLookupCount = hashLookupCount;
62 this.hashLookupLimit = hashLookupLimit;
63 this.fileUploadLimit = fileUploadLimit;
64 this.fileUploadCount = fileUploadCount;
65 this.fileUploadUrl = fileUploadUrl;
66 this.expiration = expiration;
67 this.resetDate = resetDate;
68 }
69
70 public Long getHashLookupCount() {
71 return hashLookupCount;
72 }
73
74 public Long getHashLookupLimit() {
75 return hashLookupLimit;
76 }
77
78 public Long getFileUploadLimit() {
79 return fileUploadLimit;
80 }
81
82 public Long getFileUploadCount() {
83 return fileUploadCount;
84 }
85
86 public String getFileUploadUrl() {
87 return fileUploadUrl;
88 }
89
90 public Instant getExpiration() {
91 return expiration;
92 }
93
94 public String getToken() {
95 return token;
96 }
97
98 public String getApiKey() {
99 return apiKey;
100 }
101
102 public Instant getResetDate() {
103 return resetDate;
104 }
105}
AuthTokenResponse( @JsonProperty("token") String token, @JsonProperty("api_key") String apiKey, @JsonProperty("hashLookupCount") Long hashLookupCount, @JsonProperty("hashLookupLimit") Long hashLookupLimit, @JsonProperty("fileUploadLimit") Long fileUploadLimit, @JsonProperty("fileUploadCount") Long fileUploadCount, @JsonProperty("fileUploadUrl") String fileUploadUrl, @JsonDeserialize(using=InstantEpochSecsDeserializer.class) @JsonProperty("expiration") Instant expiration, @JsonDeserialize(using=InstantEpochMillisDeserializer.class) @JsonProperty("resetDate") Instant resetDate)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.