-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMatchRequest.java
More file actions
62 lines (41 loc) · 1.36 KB
/
MatchRequest.java
File metadata and controls
62 lines (41 loc) · 1.36 KB
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
54
55
56
57
58
59
60
61
62
package com.yoti.api.client.identity;
import com.yoti.validation.Validation;
import com.fasterxml.jackson.annotation.JsonProperty;
public final class MatchRequest {
@JsonProperty(Property.VALUE)
private final String value;
@JsonProperty(Property.NOTIFICATION)
private final MatchNotification notification;
private MatchRequest(Builder builder) {
value = builder.value;
notification = builder.notification;
}
public String getValue() {
return value;
}
public MatchNotification getNotification() {
return notification;
}
public static Builder builder(String value) {
return new Builder(value);
}
public static final class Builder {
private final String value;
private MatchNotification notification;
private Builder(String value) {
Validation.notNullOrEmpty(value, Property.VALUE);
this.value = value;
}
public Builder withNotification(MatchNotification notification) {
this.notification = notification;
return this;
}
public MatchRequest build() {
return new MatchRequest(this);
}
}
private static final class Property {
private static final String VALUE = "value";
private static final String NOTIFICATION = "notification";
}
}