namespace Amazon.Lambda.APIGatewayEvents
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
///
/// An object representing the expected format of an API Gateway custom authorizer response.
///
[DataContract]
public class APIGatewayCustomAuthorizerContextOutput : Dictionary
{
///
/// Gets or sets the 'stringKey' property.
///
[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;
}
}
///
/// Gets or sets the 'numKey' property.
///
[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;
}
}
///
/// Gets or sets the 'boolKey' property.
///
[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;
}
}
}
}