@@ -26,6 +26,8 @@ public class ScheduledEvent implements Serializable, Cloneable {
26
26
27
27
private static final long serialVersionUID = -5810383198587331146L ;
28
28
29
+ private String version ;
30
+
29
31
private String account ;
30
32
31
33
private String region ;
@@ -47,6 +49,29 @@ public class ScheduledEvent implements Serializable, Cloneable {
47
49
*/
48
50
public ScheduledEvent () {}
49
51
52
+ /**
53
+ * @return the version number
54
+ */
55
+ public String getVersion () {
56
+ return version ;
57
+ }
58
+
59
+ /**
60
+ * @param version the version number
61
+ */
62
+ public void setVersion (String version ) {
63
+ this .version = version ;
64
+ }
65
+
66
+ /**
67
+ * @param version version number
68
+ * @return ScheduledEvent
69
+ */
70
+ public ScheduledEvent withVersion (String version ) {
71
+ setVersion (version );
72
+ return this ;
73
+ }
74
+
50
75
/**
51
76
* @return the account id
52
77
*/
@@ -69,7 +94,7 @@ public ScheduledEvent withAccount(String account) {
69
94
setAccount (account );
70
95
return this ;
71
96
}
72
-
97
+
73
98
/**
74
99
* @return the aws region
75
100
*/
@@ -92,7 +117,7 @@ public ScheduledEvent withRegion(String region) {
92
117
setRegion (region );
93
118
return this ;
94
119
}
95
-
120
+
96
121
/**
97
122
* @return The details of the events (usually left blank)
98
123
*/
@@ -115,7 +140,7 @@ public ScheduledEvent withDetail(Map<String, Object> detail) {
115
140
setDetail (detail );
116
141
return this ;
117
142
}
118
-
143
+
119
144
/**
120
145
* @return The details type - see cloud watch events for more info
121
146
*/
@@ -138,19 +163,19 @@ public ScheduledEvent withDetailType(String detailType) {
138
163
setDetailType (detailType );
139
164
return this ;
140
165
}
141
-
166
+
142
167
/**
143
- * @return the soruce of the event
168
+ * @return the source of the event
144
169
*/
145
170
public String getSource () {
146
171
return source ;
147
172
}
148
173
149
174
/**
150
- * @param soruce the soruce of the event
175
+ * @param source the source of the event
151
176
*/
152
- public void setSource (String soruce ) {
153
- this .source = soruce ;
177
+ public void setSource (String source ) {
178
+ this .source = source ;
154
179
}
155
180
156
181
/**
@@ -161,7 +186,7 @@ public ScheduledEvent withSource(String source) {
161
186
setSource (source );
162
187
return this ;
163
188
}
164
-
189
+
165
190
/**
166
191
* @return the timestamp for when the event is scheduled
167
192
*/
@@ -184,7 +209,7 @@ public ScheduledEvent withTime(DateTime time) {
184
209
setTime (time );
185
210
return this ;
186
211
}
187
-
212
+
188
213
/**
189
214
* @return the id of the event
190
215
*/
@@ -207,7 +232,7 @@ public ScheduledEvent withId(String id) {
207
232
setId (id );
208
233
return this ;
209
234
}
210
-
235
+
211
236
/**
212
237
* @return the resources used by event
213
238
*/
@@ -242,6 +267,8 @@ public ScheduledEvent withResources(List<String> resources) {
242
267
public String toString () {
243
268
StringBuilder sb = new StringBuilder ();
244
269
sb .append ("{" );
270
+ if (getVersion () != null )
271
+ sb .append ("version: " ).append (getVersion ()).append ("," );
245
272
if (getAccount () != null )
246
273
sb .append ("account: " ).append (getAccount ()).append ("," );
247
274
if (getRegion () != null )
@@ -272,6 +299,10 @@ public boolean equals(Object obj) {
272
299
if (obj instanceof ScheduledEvent == false )
273
300
return false ;
274
301
ScheduledEvent other = (ScheduledEvent ) obj ;
302
+ if (other .getVersion () == null ^ this .getVersion () == null )
303
+ return false ;
304
+ if (other .getVersion () != null && other .getVersion ().equals (this .getVersion ()) == false )
305
+ return false ;
275
306
if (other .getAccount () == null ^ this .getAccount () == null )
276
307
return false ;
277
308
if (other .getAccount () != null && other .getAccount ().equals (this .getAccount ()) == false )
@@ -312,6 +343,7 @@ public int hashCode() {
312
343
final int prime = 31 ;
313
344
int hashCode = 1 ;
314
345
346
+ hashCode = prime * hashCode + ((getVersion () == null ) ? 0 : getVersion ().hashCode ());
315
347
hashCode = prime * hashCode + ((getAccount () == null ) ? 0 : getAccount ().hashCode ());
316
348
hashCode = prime * hashCode + ((getRegion () == null ) ? 0 : getRegion ().hashCode ());
317
349
hashCode = prime * hashCode + ((getDetail () == null ) ? 0 : getDetail ().hashCode ());
@@ -331,5 +363,5 @@ public ScheduledEvent clone() {
331
363
throw new IllegalStateException ("Got a CloneNotSupportedException from Object.clone()" , e );
332
364
}
333
365
}
334
-
366
+
335
367
}
0 commit comments