-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathToolConfig.java
53 lines (42 loc) · 1.17 KB
/
ToolConfig.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0
package io.securecodebox.persistence.defectdojo.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import java.util.Map;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_NULL)
public final class ToolConfig implements Model {
@JsonProperty
private long id;
@JsonProperty
String url;
@JsonProperty
@NonNull
String name;
@JsonProperty("tool_type")
private long toolType;
@JsonProperty("configuration_url")
String configUrl;
@JsonProperty
String description;
@Override
public boolean equalsQueryString(Map<String, Object> queryParams) {
if (queryParams.containsKey("id") && queryParams.get("id").equals(this.id)) {
return true;
}
if (queryParams.containsKey("name") && queryParams.get("name").equals(this.name)) {
return true;
}
if (queryParams.containsKey("configuration_url") && queryParams.get("configuration_url").equals(this.configUrl)) {
return true;
}
return false;
}
}