forked from aws/aws-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SQSEvent.cs
106 lines (88 loc) · 3.14 KB
/
SQSEvent.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
namespace Amazon.Lambda.SQSEvents
{
using System;
using System.Collections.Generic;
using System.IO;
/// <summary>
/// Simple Queue Service event
/// </summary>
public class SQSEvent
{
/// <summary>
/// Get and sets the Records
/// </summary>
public List<SQSMessage> Records { get; set; }
/// <summary>
/// Class containing the data for message attributes
/// </summary>
public class MessageAttribute
{
/// <summary>
/// Get and sets value of message attribute of type String or type Number
/// </summary>
public string StringValue { get; set; }
/// <summary>
/// Get and sets value of message attribute of type Binary
/// </summary>
public MemoryStream BinaryValue { get; set; }
/// <summary>
/// Get and sets the list of String values of message attribute
/// </summary>
public List<string> StringListValues { get; set; }
/// <summary>
/// Get and sets the list of Binary values of message attribute
/// </summary>
public List<MemoryStream> BinaryListValues { get; set; }
/// <summary>
/// Get and sets the dataType of message attribute
/// </summary>
public string DataType { get; set; }
}
/// <summary>
/// Class representing a SQS message event coming into a Lambda function
/// </summary>
public class SQSMessage
{
/// <summary>
/// Get and sets the message id
/// </summary>
public string MessageId { get; set; }
/// <summary>
/// Get and sets the receipt handle
/// </summary>
public string ReceiptHandle { get; set; }
/// <summary>
/// Get and sets the Body
/// </summary>
public string Body { get; set; }
/// <summary>
/// Get and sets the Md5OfBody
/// </summary>
public string Md5OfBody { get; set; }
/// <summary>
/// Get and sets the Md5OfMessageAttributes
/// </summary>
public string Md5OfMessageAttributes { get; set; }
/// <summary>
/// Get and sets the EventSourceArn
/// </summary>
public string EventSourceArn { get; set; }
/// <summary>
/// Get and sets the EventSource
/// </summary>
public string EventSource { get; set; }
/// <summary>
/// Get and sets the AwsRegion
/// </summary>
public string AwsRegion { get; set; }
/// <summary>
/// Get and sets the Attributes
/// </summary>
public Dictionary<string, string> Attributes { get; set; }
/// <summary>
/// Get and sets the MessageAttributes
/// </summary>
public Dictionary<string, MessageAttribute> MessageAttributes { get; set; }
}
}
}