forked from aws/aws-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
APIGatewayCustomAuthorizerContextOutput.cs
84 lines (79 loc) · 2.38 KB
/
APIGatewayCustomAuthorizerContextOutput.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
namespace Amazon.Lambda.APIGatewayEvents
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
/// <summary>
/// An object representing the expected format of an API Gateway custom authorizer response.
/// </summary>
[DataContract]
public class APIGatewayCustomAuthorizerContextOutput : Dictionary<string, object>
{
/// <summary>
/// Gets or sets the 'stringKey' property.
/// </summary>
[Obsolete("This property is obsolete. Code should be updated to use the string index property like authorizer[\"stringKey\"]")]
public string StringKey
{
get
{
object value;
if (this.TryGetValue("stringKey", out value))
return value.ToString();
return null;
}
set
{
this["stringKey"] = value;
}
}
/// <summary>
/// Gets or sets the 'numKey' property.
/// </summary>
[Obsolete("This property is obsolete. Code should be updated to use the string index property like authorizer[\"numKey\"]")]
public int? NumKey
{
get
{
object value;
if (this.TryGetValue("numKey", out value))
{
int i;
if (int.TryParse(value?.ToString(), out i))
{
return i;
}
}
return null;
}
set
{
this["numKey"] = value;
}
}
/// <summary>
/// Gets or sets the 'boolKey' property.
/// </summary>
[Obsolete("This property is obsolete. Code should be updated to use the string index property like authorizer[\"boolKey\"]")]
public bool? BoolKey
{
get
{
object value;
if (this.TryGetValue("boolKey", out value))
{
bool b;
if (bool.TryParse(value?.ToString(), out b))
{
return b;
}
}
return null;
}
set
{
this["boolKey"] = value;
}
}
}
}