1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.common.lib.to;
20
21 import org.apache.commons.lang3.builder.EqualsBuilder;
22 import org.apache.commons.lang3.builder.HashCodeBuilder;
23 import org.apache.commons.lang3.builder.ToStringBuilder;
24
25 public class OIDCJWKSTO implements EntityTO {
26
27 private static final long serialVersionUID = 1285073386484048953L;
28
29 public static class Builder {
30
31 private final OIDCJWKSTO instance = new OIDCJWKSTO();
32
33 public OIDCJWKSTO.Builder json(final String json) {
34 instance.setJson(json);
35 return this;
36 }
37
38 public OIDCJWKSTO.Builder key(final String key) {
39 instance.setKey(key);
40 return this;
41 }
42
43 public OIDCJWKSTO build() {
44 return instance;
45 }
46 }
47
48 private String key;
49
50 private String json;
51
52 public String getJson() {
53 return json;
54 }
55
56 public void setJson(final String json) {
57 this.json = json;
58 }
59
60 @Override
61 public String getKey() {
62 return key;
63 }
64
65 @Override
66 public void setKey(final String key) {
67 this.key = key;
68 }
69
70 @Override
71 public int hashCode() {
72 return new HashCodeBuilder()
73 .appendSuper(super.hashCode())
74 .append(key)
75 .append(json)
76 .toHashCode();
77 }
78
79 @Override
80 public boolean equals(final Object obj) {
81 if (obj == null) {
82 return false;
83 }
84 if (obj == this) {
85 return true;
86 }
87 if (obj.getClass() != getClass()) {
88 return false;
89 }
90 OIDCJWKSTO rhs = (OIDCJWKSTO) obj;
91 return new EqualsBuilder()
92 .appendSuper(super.equals(obj))
93 .append(this.key, rhs.key)
94 .append(this.json, rhs.json)
95 .isEquals();
96 }
97
98 @Override
99 public String toString() {
100 return new ToStringBuilder(this)
101 .append("key", key)
102 .append("json", json)
103 .toString();
104 }
105 }