public IActionResult PostApplicationReceived([FromBody] ApplicationReceived eventModel)
        {
            _logger.LogInformation("Received event on application received created");

            _eventServices.Publish(eventModel);
            return(Ok(eventModel));
        }
        public IActionResult CreateRandomApplicationReceived()
        {
            var applicationReceived = new ApplicationReceived
            {
                EmailAddres = Internet.Email(),
                FirstName   = Name.First(),
                LastName    = Name.Last(),
                Company     = Company.Name(),
                Position    = Company.CatchPhrase()
            };


            return(PostApplicationReceived(applicationReceived));
        }
        public void Publish(ApplicationReceived model)
        {
            var snsclient = new AmazonSimpleNotificationServiceClient();

            var task = snsclient.PublishAsync(new PublishRequest
            {
                Subject  = "ApplicationReceived",
                Message  = JsonConvert.SerializeObject(model),
                TopicArn = TopicArc
            });

            var publishResponse = task.Result;

            _logger.LogInformation($"ApplicationReceived Published {publishResponse.MessageId}. ContentLength: {publishResponse.ContentLength}");
        }