5
5
6
6
package com .amazonaws .services .lambda .runtime .events ;
7
7
8
+ import lombok .AllArgsConstructor ;
9
+ import lombok .Builder ;
10
+ import lombok .Data ;
11
+ import lombok .NoArgsConstructor ;
8
12
import org .joda .time .DateTime ;
9
13
10
14
import java .io .Serializable ;
11
15
import java .util .List ;
12
16
13
17
/**
14
- * represents a scheduled V2 event
18
+ * Represents a Scheduled V2 event sent to Lambda
19
+ * <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-schedulev2.html">ScheduleV2</a>
15
20
*/
21
+ @ Data
22
+ @ Builder (setterPrefix = "with" )
23
+ @ NoArgsConstructor
24
+ @ AllArgsConstructor
16
25
public class ScheduledV2Event implements Serializable , Cloneable {
17
26
18
27
private static final long serialVersionUID = -463442139623175611L ;
@@ -35,219 +44,6 @@ public class ScheduledV2Event implements Serializable, Cloneable {
35
44
36
45
private List <String > resources ;
37
46
38
- /**
39
- * default constructor
40
- */
41
- public ScheduledV2Event () {
42
- }
43
-
44
- /**
45
- * @return the version number
46
- */
47
- public String getVersion () {
48
- return version ;
49
- }
50
-
51
- /**
52
- * @param version the version number
53
- */
54
- public void setVersion (String version ) {
55
- this .version = version ;
56
- }
57
-
58
- /**
59
- * @param version version number
60
- * @return ScheduledV2Event
61
- */
62
- public ScheduledV2Event withVersion (String version ) {
63
- setVersion (version );
64
- return this ;
65
- }
66
-
67
- /**
68
- * @return the account id
69
- */
70
- public String getAccount () {
71
- return account ;
72
- }
73
-
74
- /**
75
- * @param account the account id
76
- */
77
- public void setAccount (String account ) {
78
- this .account = account ;
79
- }
80
-
81
- /**
82
- * @param account account id
83
- * @return ScheduledV2Event
84
- */
85
- public ScheduledV2Event withAccount (String account ) {
86
- setAccount (account );
87
- return this ;
88
- }
89
-
90
- /**
91
- * @return the aws region
92
- */
93
- public String getRegion () {
94
- return region ;
95
- }
96
-
97
- /**
98
- * @param region the aws region
99
- */
100
- public void setRegion (String region ) {
101
- this .region = region ;
102
- }
103
-
104
- /**
105
- * @param region aws region
106
- * @return ScheduledV2Event
107
- */
108
- public ScheduledV2Event withRegion (String region ) {
109
- setRegion (region );
110
- return this ;
111
- }
112
-
113
- /**
114
- * @return The details of the events (usually left blank)
115
- */
116
- public String getDetail () {
117
- return detail ;
118
- }
119
-
120
- /**
121
- * @param detail The details of the events (usually left blank)
122
- */
123
- public void setDetail (String detail ) {
124
- this .detail = detail ;
125
- }
126
-
127
- /**
128
- * @param detail details of the events (usually left blank)
129
- * @return ScheduledV2Event
130
- */
131
- public ScheduledV2Event withDetail (String detail ) {
132
- setDetail (detail );
133
- return this ;
134
- }
135
-
136
- /**
137
- * @return The details type - see cloud watch events for more info
138
- */
139
- public String getDetailType () {
140
- return detailType ;
141
- }
142
-
143
- /**
144
- * @param detailType The details type - see cloud watch events for more info
145
- */
146
- public void setDetailType (String detailType ) {
147
- this .detailType = detailType ;
148
- }
149
-
150
- /**
151
- * @param detailType The details type - see cloud watch events for more info
152
- * @return ScheduledV2Event
153
- */
154
- public ScheduledV2Event withDetailType (String detailType ) {
155
- setDetailType (detailType );
156
- return this ;
157
- }
158
-
159
- /**
160
- * @return the source of the event
161
- */
162
- public String getSource () {
163
- return source ;
164
- }
165
-
166
- /**
167
- * @param source the source of the event
168
- */
169
- public void setSource (String source ) {
170
- this .source = source ;
171
- }
172
-
173
- /**
174
- * @param source source of the event
175
- * @return ScheduledV2Event
176
- */
177
- public ScheduledV2Event withSource (String source ) {
178
- setSource (source );
179
- return this ;
180
- }
181
-
182
- /**
183
- * @return the timestamp for when the event is scheduled
184
- */
185
- public DateTime getTime () {
186
- return this .time ;
187
- }
188
-
189
- /**
190
- * @param time the timestamp for when the event is scheduled
191
- */
192
- public void setTime (DateTime time ) {
193
- this .time = time ;
194
- }
195
-
196
- /**
197
- * @param time the timestamp for when the event is scheduled
198
- * @return ScheduledV2Event
199
- */
200
- public ScheduledV2Event withTime (DateTime time ) {
201
- setTime (time );
202
- return this ;
203
- }
204
-
205
- /**
206
- * @return the id of the event
207
- */
208
- public String getId () {
209
- return id ;
210
- }
211
-
212
- /**
213
- * @param id the id of the event
214
- */
215
- public void setId (String id ) {
216
- this .id = id ;
217
- }
218
-
219
- /**
220
- * @param id id of event
221
- * @return ScheduledV2Event
222
- */
223
- public ScheduledV2Event withId (String id ) {
224
- setId (id );
225
- return this ;
226
- }
227
-
228
- /**
229
- * @return the resources used by event
230
- */
231
- public List <String > getResources () {
232
- return this .resources ;
233
- }
234
-
235
- /**
236
- * @param resources the resources used by event
237
- */
238
- public void setResources (List <String > resources ) {
239
- this .resources = resources ;
240
- }
241
-
242
- /**
243
- * @param resources list of resource names
244
- * @return Scheduled V2 event object
245
- */
246
- public ScheduledV2Event withResources (List <String > resources ) {
247
- setResources (resources );
248
- return this ;
249
- }
250
-
251
47
/**
252
48
* Returns a string representation of this object; useful for testing and debugging.
253
49
*
@@ -287,7 +83,7 @@ public boolean equals(Object obj) {
287
83
if (obj == null )
288
84
return false ;
289
85
290
- if (obj instanceof ScheduledV2Event == false )
86
+ if (!( obj instanceof ScheduledV2Event ) )
291
87
return false ;
292
88
ScheduledV2Event other = (ScheduledV2Event ) obj ;
293
89
if (other .getVersion () == null ^ this .getVersion () == null )
0 commit comments