using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace Amazon.Lambda.KinesisAnalyticsEvents { /// /// This class represents the event from Kinesis Analytics application output. /// [DataContract] public class KinesisAnalyticsOutputDeliveryEvent { /// /// Gets or sets the invocation identifier. /// /// /// The invocation identifier. /// [DataMember(Name = "invocationId")] public string InvocationId { get; set; } /// /// Gets or sets the application arn. /// /// /// The application arn. /// [DataMember(Name = "applicationArn")] public string ApplicationArn { get; set; } /// /// Gets or sets the records. /// /// /// The records. /// [DataMember(Name = "records")] public IList Records { get; set; } /// /// /// [DataContract] public class DeliveryRecord { /// /// Gets or sets the record identifier. /// /// /// The record identifier. /// [DataMember(Name = "recordId")] public string RecordId { get; set; } /// /// Gets or sets the record metadata. /// /// /// The record metadata. /// [DataMember(Name = "lambdaDeliveryRecordMetadata")] public LambdaDeliveryRecordMetadata RecordMetadata { get; set; } /// /// /// [DataContract] public class LambdaDeliveryRecordMetadata { /// /// Gets or sets the retry hint. /// /// /// The retryHint is a value that increases for every delivery failure of the record. /// [DataMember(Name = "retryHint")] public long RetryHint { get; set; } } /// /// Gets or sets the base64 encoded data. /// /// /// The base64 encoded data. /// [DataMember(Name = "data")] #if NETCOREAPP3_1 [System.Text.Json.Serialization.JsonPropertyName("data")] #endif public string Base64EncodedData { get; set; } /// /// Base64 decodes the Base64EncodedData property. /// /// public string DecodeData() { var decodedData = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(this.Base64EncodedData)); return decodedData; } } } }