using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading.Tasks; using Amazon.Lambda.Core; using Amazon.Lambda.Serialization; using Amazon.Lambda.LexEvents; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.IO; // Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. [assembly: LambdaSerializerAttribute(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] namespace BlueprintBaseName._1 { public class Function { /// /// Then entry point for the Lambda function that looks at the current intent and calls /// the appropriate intent process. /// /// /// /// public LexResponse FunctionHandler(LexEvent lexEvent, ILambdaContext context) { IIntentProcessor process; if (lexEvent.CurrentIntent.Name == "OrderFlowers") { process = new OrderFlowersIntentProcessor(); } else { throw new Exception($"Intent with name {lexEvent.CurrentIntent.Name} not supported"); } return process.Process(lexEvent, context); } } }