Skip to content

Commit ab69c15

Browse files
committed
aws-lambda-java-events 1.2.0
Added event type for AWS Config.
1 parent 8f97409 commit ab69c15

File tree

2 files changed

+266
-1
lines changed

2 files changed

+266
-1
lines changed

aws-lambda-java-events/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.amazonaws</groupId>
55
<artifactId>aws-lambda-java-events</artifactId>
6-
<version>1.1.0</version>
6+
<version>1.2.0</version>
77
<packaging>jar</packaging>
88

99
<name>AWS Lambda Java Events Library</name>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
package com.amazonaws.services.lambda.runtime.events;
2+
3+
/**
4+
* Represents an event for an AWS Config rule's function.
5+
*/
6+
public class ConfigEvent {
7+
8+
private String version;
9+
10+
private String invokingEvent;
11+
12+
private String ruleParameters;
13+
14+
private String resultToken;
15+
16+
private String configRuleArn;
17+
18+
private String configRuleId;
19+
20+
private String configRuleName;
21+
22+
private String accountId;
23+
24+
private String executionRoleArn;
25+
26+
private boolean eventLeftScope;
27+
28+
/**
29+
* Gets the AWS Config event version.
30+
*
31+
*/
32+
public String getVersion() {
33+
return version;
34+
}
35+
36+
/**
37+
* Sets the AWS Config event version.
38+
* @param version String containing the event version.
39+
*/
40+
public void setVersion(String version) {
41+
this.version = version;
42+
}
43+
44+
/**
45+
* Gets the JSON-encoded notification published by AWS Config.
46+
*
47+
*/
48+
public String getInvokingEvent() {
49+
return invokingEvent;
50+
}
51+
52+
/**
53+
* Sets the JSON-encoded notification published by AWS Config.
54+
* @param invokingEvent String containing the notification published by AWS Config.
55+
*/
56+
public void setInvokingEvent(String invokingEvent) {
57+
this.invokingEvent = invokingEvent;
58+
}
59+
60+
/**
61+
* Gets the JSON-encoded map containing the AWS Config rule parameters.
62+
*
63+
*/
64+
public String getRuleParameters() {
65+
return ruleParameters;
66+
}
67+
68+
/**
69+
* Sets the JSON-encoded map containing the AWS Config rule parameters.
70+
* @param ruleParameters String containing the AWS Config rule parameters.
71+
*/
72+
public void setRuleParameters(String ruleParameters) {
73+
this.ruleParameters = ruleParameters;
74+
}
75+
76+
/**
77+
* Gets the token associated with the invocation of the AWS Config rule's Lambda function.
78+
*
79+
*/
80+
public String getResultToken() {
81+
return resultToken;
82+
}
83+
84+
/**
85+
* Sets the token associated with the invocation of the AWS Config rule's Lambda function.
86+
* @param resultToken String containing the token associated to the invocation.
87+
*/
88+
public void setResultToken(String resultToken) {
89+
this.resultToken = resultToken;
90+
}
91+
92+
/**
93+
* Gets the ARN of the AWS Config rule that triggered the event.
94+
*
95+
*/
96+
public String getConfigRuleArn() {
97+
return configRuleArn;
98+
}
99+
100+
/**
101+
* Sets the ARN of the AWS Config rule that triggered the event.
102+
* @param configRuleArn String containing the AWS Config rule ARN.
103+
*/
104+
public void setConfigRuleArn(String configRuleArn) {
105+
this.configRuleArn = configRuleArn;
106+
}
107+
108+
/**
109+
* Gets the ID of the AWS Config rule that triggered the event.
110+
*
111+
*/
112+
public String getConfigRuleId() {
113+
return configRuleId;
114+
}
115+
116+
/**
117+
* Sets the ID of the AWS Config rule that triggered the event.
118+
* @param configRuleId String containing the AWS Config rule ID.
119+
*/
120+
public void setConfigRuleId(String configRuleId) {
121+
this.configRuleId = configRuleId;
122+
}
123+
124+
/**
125+
* Gets the name of the AWS Config rule that triggered the event.
126+
*
127+
*/
128+
public String getConfigRuleName() {
129+
return configRuleName;
130+
}
131+
132+
/**
133+
* Sets the name of the AWS Config rule that triggered the event.
134+
* @param configRuleName String containing the AWS Config rule name.
135+
*/
136+
public void setConfigRuleName(String configRuleName) {
137+
this.configRuleName = configRuleName;
138+
}
139+
140+
/**
141+
* Gets the account ID of the AWS Config rule that triggered the event.
142+
*
143+
*/
144+
public String getAccountId() {
145+
return accountId;
146+
}
147+
148+
/**
149+
* Sets the account ID of the AWS Config rule that triggered the event.
150+
* @param accountId String containing the account ID of the AWS Config rule.
151+
*/
152+
public void setAccountId(String accountId) {
153+
this.accountId = accountId;
154+
}
155+
156+
/**
157+
* Gets the ARN of the IAM role that is assigned to AWS Config.
158+
*
159+
*/
160+
public String getExecutionRoleArn() {
161+
return executionRoleArn;
162+
}
163+
164+
/**
165+
* Sets the ARN of the IAM role that is assigned to AWS Config.
166+
* @param executionRoleArn String containing the IAM role assigned to AWS Config.
167+
*/
168+
public void setExecutionRoleArn(String executionRoleArn) {
169+
this.executionRoleArn = executionRoleArn;
170+
}
171+
172+
/**
173+
* Whether the AWS resource to be evaluated has been removed from the AWS Config rule's scope.
174+
*
175+
*/
176+
public boolean isEventLeftScope() {
177+
return eventLeftScope;
178+
}
179+
180+
/**
181+
* Sets whether the AWS resource to be evaluated has been removed from the AWS Config rule's scope.
182+
* @param eventLeftScope Boolean flag indicating that the resource is no longer in scope.
183+
*/
184+
public void setEventLeftScope(boolean eventLeftScope) {
185+
this.eventLeftScope = eventLeftScope;
186+
}
187+
188+
189+
@Override
190+
public int hashCode() {
191+
final int prime = 31;
192+
int result = 1;
193+
result = prime * result + ((accountId == null) ? 0 : accountId.hashCode());
194+
result = prime * result + ((configRuleArn == null) ? 0 : configRuleArn.hashCode());
195+
result = prime * result + ((configRuleId == null) ? 0 : configRuleId.hashCode());
196+
result = prime * result + ((configRuleName == null) ? 0 : configRuleName.hashCode());
197+
result = prime * result + (eventLeftScope ? 1231 : 1237);
198+
result = prime * result + ((executionRoleArn == null) ? 0 : executionRoleArn.hashCode());
199+
result = prime * result + ((invokingEvent == null) ? 0 : invokingEvent.hashCode());
200+
result = prime * result + ((resultToken == null) ? 0 : resultToken.hashCode());
201+
result = prime * result + ((ruleParameters == null) ? 0 : ruleParameters.hashCode());
202+
result = prime * result + ((version == null) ? 0 : version.hashCode());
203+
return result;
204+
}
205+
206+
@Override
207+
public boolean equals(Object obj) {
208+
if (this == obj)
209+
return true;
210+
if (obj == null)
211+
return false;
212+
if (getClass() != obj.getClass())
213+
return false;
214+
ConfigEvent other = (ConfigEvent) obj;
215+
if (accountId == null) {
216+
if (other.accountId != null)
217+
return false;
218+
} else if (!accountId.equals(other.accountId))
219+
return false;
220+
if (configRuleArn == null) {
221+
if (other.configRuleArn != null)
222+
return false;
223+
} else if (!configRuleArn.equals(other.configRuleArn))
224+
return false;
225+
if (configRuleId == null) {
226+
if (other.configRuleId != null)
227+
return false;
228+
} else if (!configRuleId.equals(other.configRuleId))
229+
return false;
230+
if (configRuleName == null) {
231+
if (other.configRuleName != null)
232+
return false;
233+
} else if (!configRuleName.equals(other.configRuleName))
234+
return false;
235+
if (eventLeftScope != other.eventLeftScope)
236+
return false;
237+
if (executionRoleArn == null) {
238+
if (other.executionRoleArn != null)
239+
return false;
240+
} else if (!executionRoleArn.equals(other.executionRoleArn))
241+
return false;
242+
if (invokingEvent == null) {
243+
if (other.invokingEvent != null)
244+
return false;
245+
} else if (!invokingEvent.equals(other.invokingEvent))
246+
return false;
247+
if (resultToken == null) {
248+
if (other.resultToken != null)
249+
return false;
250+
} else if (!resultToken.equals(other.resultToken))
251+
return false;
252+
if (ruleParameters == null) {
253+
if (other.ruleParameters != null)
254+
return false;
255+
} else if (!ruleParameters.equals(other.ruleParameters))
256+
return false;
257+
if (version == null) {
258+
if (other.version != null)
259+
return false;
260+
} else if (!version.equals(other.version))
261+
return false;
262+
return true;
263+
}
264+
265+
}

0 commit comments

Comments
 (0)