1 | <?php |
||
24 | class CallbackRequest |
||
25 | { |
||
26 | /** |
||
27 | * @var string |
||
28 | * |
||
29 | * @Assert\NotNull(message="Event cannot be null.") |
||
30 | * @Assert\Choice(choices = {"incomingSms"}, message = "Invalid event.") |
||
31 | */ |
||
32 | private $event; |
||
33 | |||
34 | /** |
||
35 | * @var Identity |
||
36 | * |
||
37 | * @Assert\NotNull(message="To cannot be null.") |
||
38 | * @Assert\Type(type="object") |
||
39 | * @Assert\Valid() |
||
40 | */ |
||
41 | private $to; |
||
42 | |||
43 | /** |
||
44 | * @var Identity |
||
45 | * |
||
46 | * @Assert\NotNull(message="From cannot be null.") |
||
47 | * @Assert\Type(type="object") |
||
48 | * @Assert\Valid() |
||
49 | */ |
||
50 | private $from; |
||
51 | |||
52 | /** |
||
53 | * @var string |
||
54 | * |
||
55 | * @Assert\NotNull(message="Message cannot be null.") |
||
56 | * @Assert\Type(type="string") |
||
57 | */ |
||
58 | private $message; |
||
59 | |||
60 | /** |
||
61 | * @var \DateTime |
||
62 | * |
||
63 | * @Assert\NotNull(message="Timestamp cannot be null.") |
||
64 | * @Assert\DateTime() |
||
65 | */ |
||
66 | private $timestamp; |
||
67 | |||
68 | /** |
||
69 | * @var int |
||
70 | * |
||
71 | * @Assert\NotNull(message="Version cannot be null.") |
||
72 | * @Assert\Type(type="integer") |
||
73 | */ |
||
74 | private $version; |
||
75 | |||
76 | /** |
||
77 | * @return string|null |
||
78 | */ |
||
79 | public function getEvent(): ?string |
||
83 | |||
84 | /** |
||
85 | * @param string $event |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function setEvent(string $event): self |
||
95 | |||
96 | /** |
||
97 | * @return Identity |
||
98 | */ |
||
99 | public function getTo(): ?Identity |
||
103 | |||
104 | /** |
||
105 | * @param Identity $to |
||
106 | * |
||
107 | * @return $this |
||
108 | */ |
||
109 | public function setTo(Identity $to): self |
||
115 | |||
116 | /** |
||
117 | * @return Identity |
||
118 | */ |
||
119 | public function getFrom(): ?Identity |
||
123 | |||
124 | /** |
||
125 | * @param Identity $from |
||
126 | * |
||
127 | * @return $this |
||
128 | */ |
||
129 | public function setFrom(Identity $from): self |
||
135 | |||
136 | /** |
||
137 | * @return string|null |
||
138 | */ |
||
139 | public function getMessage(): ?string |
||
143 | |||
144 | /** |
||
145 | * @param string $message |
||
146 | * |
||
147 | * @return $this |
||
148 | */ |
||
149 | public function setMessage(string $message): self |
||
155 | |||
156 | /** |
||
157 | * @return \DateTime |
||
158 | */ |
||
159 | public function getTimestamp(): ?\DateTime |
||
163 | |||
164 | /** |
||
165 | * @param \DateTime $timestamp |
||
166 | * |
||
167 | * @return $this |
||
168 | */ |
||
169 | public function setTimestamp(\DateTime $timestamp): self |
||
175 | |||
176 | /** |
||
177 | * @return string|null |
||
178 | */ |
||
179 | public function getVersion(): ?int |
||
183 | |||
184 | /** |
||
185 | * @param int $version |
||
186 | * |
||
187 | * @return $this |
||
188 | */ |
||
189 | public function setVersion(int $version): self |
||
195 | } |
||
196 |