|
| 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 V1 |
| 16 | + * <p> |
| 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 | +@Data |
| 21 | +@EqualsAndHashCode(callSuper = true) |
| 22 | +@NoArgsConstructor |
| 23 | +@ToString(callSuper = true) |
| 24 | +public class CognitoUserPoolCustomSMSSenderEvent extends CognitoUserPoolEvent { |
| 25 | + /** |
| 26 | + * The request from the Amazon Cognito service. |
| 27 | + */ |
| 28 | + private Request request; |
| 29 | + |
| 30 | + /** |
| 31 | + * The response from your Lambda trigger. |
| 32 | + */ |
| 33 | + private Response response; |
| 34 | + |
| 35 | + @Builder(setterPrefix = "with") |
| 36 | + public CognitoUserPoolCustomSMSSenderEvent( |
| 37 | + String version, |
| 38 | + String triggerSource, |
| 39 | + String region, |
| 40 | + String userPoolId, |
| 41 | + String userName, |
| 42 | + CallerContext callerContext, |
| 43 | + Request request, |
| 44 | + Response response) { |
| 45 | + super(version, triggerSource, region, userPoolId, userName, callerContext); |
| 46 | + this.request = request; |
| 47 | + this.response = response; |
| 48 | + } |
| 49 | + |
| 50 | + @Data |
| 51 | + @EqualsAndHashCode(callSuper = true) |
| 52 | + @NoArgsConstructor |
| 53 | + @ToString(callSuper = true) |
| 54 | + public static class Request extends CognitoUserPoolEvent.Request { |
| 55 | + |
| 56 | + private String code; |
| 57 | + private String type; |
| 58 | + private Map<String, String> clientMetadata; |
| 59 | + |
| 60 | + @Builder(setterPrefix = "with") |
| 61 | + public Request(Map<String, String> userAttributes, String code, String type, Map<String, String> clientMetadata) { |
| 62 | + super(userAttributes); |
| 63 | + this.code = code; |
| 64 | + this.type = type; |
| 65 | + this.clientMetadata = clientMetadata; |
| 66 | + } |
| 67 | + } |
| 68 | + |
| 69 | + @Data |
| 70 | + @AllArgsConstructor |
| 71 | + @Builder(setterPrefix = "with") |
| 72 | + @NoArgsConstructor |
| 73 | + public static class Response { |
| 74 | + } |
| 75 | +} |
0 commit comments