Skip to content

Commit 17b539f

Browse files
committed
Add CognitoUserPoolCustomSMSSender event
1 parent 5c6d3fa commit 17b539f

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

aws-lambda-java-events/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* `CognitoEvent`
2424
* `CognitoUserPoolCreateAuthChallengeEvent`
2525
* `CognitoUserPoolCustomMessageEvent`
26+
* `CognitoUserPoolCustomSMSSenderEvent`
2627
* `CognitoUserPoolDefineAuthChallengeEvent`
2728
* `CognitoUserPoolEvent`
2829
* `CognitoUserPoolMigrateUserEvent`
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/* Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. */
2+
3+
package com.amazonaws.services.lambda.runtime.events;
4+
5+
import lombok.AllArgsConstructor;
6+
import lombok.Builder;
7+
import lombok.Data;
8+
import lombok.EqualsAndHashCode;
9+
import lombok.NoArgsConstructor;
10+
import lombok.ToString;
11+
12+
import java.util.Map;
13+
14+
/**
15+
* Represent the class for the Cognito User Pool Custom SMS Sender Lambda Trigger
16+
*
17+
* See <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html">Custom SMS Sender Lambda Trigger</a>
18+
*
19+
*
20+
* @author Saath Satheeshkumar <saths008>
21+
*/
22+
@Data
23+
@EqualsAndHashCode(callSuper = true)
24+
@NoArgsConstructor
25+
@ToString(callSuper = true)
26+
public class CognitoUserPoolCustomSMSSenderEvent extends CognitoUserPoolEvent {
27+
/**
28+
* The request from the Amazon Cognito service.
29+
*/
30+
private Request request;
31+
32+
/**
33+
* The response from your Lambda trigger.
34+
*/
35+
private Response response;
36+
37+
@Builder(setterPrefix = "with")
38+
public CognitoUserPoolCustomSMSSenderEvent(
39+
String version,
40+
String triggerSource,
41+
String region,
42+
String userPoolId,
43+
String userName,
44+
CallerContext callerContext,
45+
Request request,
46+
Response response) {
47+
super(version, triggerSource, region, userPoolId, userName, callerContext);
48+
this.request = request;
49+
this.response = response;
50+
}
51+
52+
@Data
53+
@EqualsAndHashCode(callSuper = true)
54+
@NoArgsConstructor
55+
@ToString(callSuper = true)
56+
public static class Request extends CognitoUserPoolEvent.Request {
57+
58+
private String code;
59+
private String type;
60+
private Map<String, String> clientMetadata;
61+
62+
@Builder(setterPrefix = "with")
63+
public Request(Map<String, String> userAttributes, String code, String type, Map<String, String> clientMetadata) {
64+
super(userAttributes);
65+
this.code = code;
66+
this.type = type;
67+
this.clientMetadata = clientMetadata;
68+
}
69+
}
70+
71+
@Data
72+
@AllArgsConstructor
73+
@Builder(setterPrefix = "with")
74+
@NoArgsConstructor
75+
public static class Response {
76+
}
77+
}

0 commit comments

Comments
 (0)