|
| 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 | + |
| 14 | +package com.amazonaws.services.lambda.runtime.events; |
| 15 | + |
| 16 | +import com.amazonaws.services.lambda.runtime.events.models.TimeWindow; |
| 17 | +import lombok.Builder; |
| 18 | +import lombok.Data; |
| 19 | +import lombok.EqualsAndHashCode; |
| 20 | +import lombok.NoArgsConstructor; |
| 21 | + |
| 22 | +import java.io.Serializable; |
| 23 | +import java.util.List; |
| 24 | +import java.util.Map; |
| 25 | + |
| 26 | +@Data |
| 27 | +@NoArgsConstructor |
| 28 | +@EqualsAndHashCode(callSuper = true) |
| 29 | +public class DynamodbTimeWindowEvent extends DynamodbEvent implements Serializable, Cloneable { |
| 30 | + |
| 31 | + private static final long serialVersionUID = -5449871161108629510L; |
| 32 | + |
| 33 | + private TimeWindow window; |
| 34 | + private Map<String, String> state; |
| 35 | + private String shardId; |
| 36 | + private String eventSourceArn; |
| 37 | + private Boolean isFinalInvokeForWindow; |
| 38 | + private Boolean isWindowTerminatedEarly; |
| 39 | + |
| 40 | + @Builder(setterPrefix = "with") |
| 41 | + public DynamodbTimeWindowEvent( |
| 42 | + final List<DynamodbStreamRecord> records, |
| 43 | + final TimeWindow window, |
| 44 | + final Map<String, String> state, |
| 45 | + final String shardId, |
| 46 | + final String eventSourceArn, |
| 47 | + final Boolean isFinalInvokeForWindow, |
| 48 | + final Boolean isWindowTerminatedEarly) { |
| 49 | + this.setRecords(records); |
| 50 | + this.window = window; |
| 51 | + this.state = state; |
| 52 | + this.shardId = shardId; |
| 53 | + this.eventSourceArn = eventSourceArn; |
| 54 | + this.isFinalInvokeForWindow = isFinalInvokeForWindow; |
| 55 | + this.isWindowTerminatedEarly = isWindowTerminatedEarly; |
| 56 | + } |
| 57 | +} |
0 commit comments