1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package de.kaiserpfalzedv.services.sms77.model;
19
20 import java.io.Serializable;
21 import java.util.Set;
22 import java.util.UUID;
23
24 import com.fasterxml.jackson.annotation.JsonInclude;
25
26 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
27 import jakarta.validation.constraints.Max;
28 import jakarta.validation.constraints.Min;
29 import jakarta.validation.constraints.Pattern;
30 import jakarta.validation.constraints.Size;
31 import lombok.AllArgsConstructor;
32 import lombok.Builder;
33 import lombok.EqualsAndHashCode;
34 import lombok.Getter;
35 import lombok.NoArgsConstructor;
36 import lombok.ToString;
37 import lombok.experimental.SuperBuilder;
38 import lombok.extern.jackson.Jacksonized;
39
40
41
42
43
44
45
46 @SuppressFBWarnings(value = {"EI_EXPOSE_REP","EI_EXPOSE_REP2"}, justification = "lombok provided @Getter are created")
47 @Jacksonized
48 @SuperBuilder(toBuilder = true)
49 @AllArgsConstructor
50 @NoArgsConstructor
51 @Getter
52 @ToString(onlyExplicitlyIncluded = true)
53 @EqualsAndHashCode(onlyExplicitlyIncluded = true)
54 @JsonInclude(JsonInclude.Include.NON_ABSENT)
55 public class Sms implements Serializable {
56 private static final long serialVersionUID = 0L;
57
58 @Size(max = 11)
59 private String from;
60
61 private Set<String> to;
62
63 @Size(max = 1520)
64 private String text;
65
66 @Builder.Default
67 @Min(0) @Max(1)
68 private int no_reload = 1;
69
70 @Builder.Default
71 @Min(0) @Max(1)
72 private int flash = 0;
73
74 @Builder.Default
75 private String ttl = "60";
76
77 @Builder.Default
78 @Min(0) @Max(1)
79 private int return_msg_id = 1;
80
81 @Builder.Default
82 @Size(max = 64)
83 private String foreign_id = UUID.randomUUID().toString();
84
85 @Size(max = 100)
86 @Pattern(regexp = "^[-._@ a-zA-Z0-9]+$")
87 private String label;
88 }