using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace Amazon.Lambda.KinesisAnalyticsEvents { /// /// This class represents the response from Lambda function for Kinesis Analytics input preprocessing. /// [DataContract] public class KinesisAnalyticsInputPreprocessingResponse { /// /// The record was preprocessed successfully. /// public const string OK = "Ok"; /// /// The record was dropped intentionally by your processing logic. /// public const string DROPPED = "Dropped"; /// /// The record could not be preprocessed. /// public const string PROCESSINGFAILED = "ProcessingFailed"; /// /// Gets or sets the records. /// /// /// The records. /// [DataMember(Name = "records")] #if NETCOREAPP3_1 [System.Text.Json.Serialization.JsonPropertyName("records")] #endif public IList Records { get; set; } /// /// /// [DataContract] public class Record { /// /// Gets or sets the record identifier. /// /// /// The record identifier. /// [DataMember(Name = "recordId")] #if NETCOREAPP3_1 [System.Text.Json.Serialization.JsonPropertyName("recordId")] #endif public string RecordId { get; set; } /// /// Gets or sets the result. /// /// /// The result. /// [DataMember(Name = "result")] #if NETCOREAPP3_1 [System.Text.Json.Serialization.JsonPropertyName("result")] #endif public string Result { 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; } /// /// Encodes the data. /// /// The data. public void EncodeData(string data) { this.Base64EncodedData = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(data)); } } } }