-
Notifications
You must be signed in to change notification settings - Fork 475
/
KinesisTimeWindowResponse.cs
54 lines (50 loc) · 1.8 KB
/
KinesisTimeWindowResponse.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
namespace Amazon.Lambda.KinesisEvents
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
#if NETCOREAPP3_1_OR_GREATER
using Amazon.Lambda.KinesisEvents.Converters;
using System.Text.Json.Serialization;
#endif
/// <summary>
/// Response type to return a new state for the time window and to report batch item failures.
/// </summary>
[DataContract]
public class KinesisTimeWindowResponse
{
/// <summary>
/// New state after processing a batch of records.
/// </summary>
[DataMember(Name = "state")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("state")]
[JsonConverter(typeof(DictionaryLongToStringJsonConverter))]
#endif
public Dictionary<String, String> State { get; set; }
/// <summary>
/// A list of records which failed processing.
/// Returning the first record which failed would retry all remaining records from the batch.
/// </summary>
[DataMember(Name = "batchItemFailures")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("batchItemFailures")]
#endif
public IList<BatchItemFailure> BatchItemFailures { get; set; }
/// <summary>
/// Class representing the individual record which failed processing.
/// </summary>
[DataContract]
public class BatchItemFailure
{
/// <summary>
/// Sequence number of the record which failed processing.
/// </summary>
[DataMember(Name = "itemIdentifier")]
#if NETCOREAPP3_1_OR_GREATER
[System.Text.Json.Serialization.JsonPropertyName("itemIdentifier")]
#endif
public string ItemIdentifier { get; set; }
}
}
}