forked from aws/aws-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSNSEvent.cs
121 lines (103 loc) · 3.45 KB
/
SNSEvent.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
namespace Amazon.Lambda.SNSEvents
{
using System;
using System.Collections.Generic;
/// <summary>
/// Simple Notification Service event
/// http://docs.aws.amazon.com/lambda/latest/dg/with-sns.html
/// http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-sns
/// </summary>
public class SNSEvent
{
/// <summary>
/// List of SNS records.
/// </summary>
public IList<SNSRecord> Records { get; set; }
/// <summary>
/// An SNS message record.
/// </summary>
public class SNSRecord
{
/// <summary>
/// The event source.
/// </summary>
public string EventSource { get; set; }
/// <summary>
/// The event subscription ARN.
/// </summary>
public string EventSubscriptionArn { get; set; }
/// <summary>
/// The event version.
/// </summary>
public string EventVersion { get; set; }
/// <summary>
/// The SNS message.
/// </summary>
public SNSMessage Sns { get; set; }
}
/// <summary>
/// An SNS message record.
/// </summary>
public class SNSMessage
{
/// <summary>
/// The message.
/// </summary>
public string Message { get; set; }
/// <summary>
/// The attributes associated with the message.
/// </summary>
public IDictionary<string, MessageAttribute> MessageAttributes { get; set; }
/// <summary>
/// The message id.
/// </summary>
public string MessageId { get; set; }
/// <summary>
/// The message signature.
/// </summary>
public string Signature { get; set; }
/// <summary>
/// The signature version used to sign the message.
/// </summary>
public string SignatureVersion { get; set; }
/// <summary>
/// The URL for the signing certificate.
/// </summary>
public string SigningCertUrl { get; set; }
/// <summary>
/// The subject for the message.
/// </summary>
public string Subject { get; set; }
/// <summary>
/// The message time stamp.
/// </summary>
public DateTime Timestamp { get; set; }
/// <summary>
/// The topic ARN.
/// </summary>
public string TopicArn { get; set; }
/// <summary>
/// The message type.
/// </summary>
public string Type { get; set; }
/// <summary>
/// The message unsubscribe URL.
/// </summary>
public string UnsubscribeUrl { get; set; }
}
/// <summary>
/// An SNS message attribute.
/// </summary>
public class MessageAttribute
{
/// <summary>
/// The attribute type.
/// </summary>
public string Type { get; set; }
/// <summary>
/// The attribute value.
/// </summary>
public string Value { get; set; }
}
}
}