|
| 1 | +/* |
| 2 | + * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with |
| 5 | + * the License. A copy of the License is located at |
| 6 | + * |
| 7 | + * http://aws.amazon.com/apache2.0 |
| 8 | + * |
| 9 | + * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
| 10 | + * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions |
| 11 | + * and limitations under the License. |
| 12 | + */ |
| 13 | +package com.amazonaws.services.lambda.runtime.events; |
| 14 | + |
| 15 | +import lombok.AllArgsConstructor; |
| 16 | +import lombok.Builder; |
| 17 | +import lombok.Data; |
| 18 | +import lombok.NoArgsConstructor; |
| 19 | +import org.joda.time.DateTime; |
| 20 | + |
| 21 | +import java.io.Serializable; |
| 22 | +import java.util.Map; |
| 23 | + |
| 24 | +/** |
| 25 | + * Class to represent an invocation record for a Lambda event. |
| 26 | + * |
| 27 | + * @see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html>Asynchronous invocation</a> |
| 28 | + * |
| 29 | + * @author msailes <[email protected]> |
| 30 | + */ |
| 31 | + |
| 32 | +@Data |
| 33 | +@Builder(setterPrefix = "with") |
| 34 | +@NoArgsConstructor |
| 35 | +@AllArgsConstructor |
| 36 | +public class LambdaDestinationEvent implements Serializable, Cloneable { |
| 37 | + |
| 38 | + private String version; |
| 39 | + private DateTime timestamp; |
| 40 | + private RequestContext requestContext; |
| 41 | + private Map<String, Object> requestPayload; |
| 42 | + private Object responseContext; |
| 43 | + private Object responsePayload; |
| 44 | + |
| 45 | + @Data |
| 46 | + @Builder(setterPrefix = "with") |
| 47 | + @NoArgsConstructor |
| 48 | + @AllArgsConstructor |
| 49 | + public static class RequestContext implements Serializable, Cloneable { |
| 50 | + private String requestId; |
| 51 | + private String functionArn; |
| 52 | + private String condition; |
| 53 | + private int approximateInvokeCount; |
| 54 | + } |
| 55 | +} |
0 commit comments