EventSubscription.fromJson constructor

EventSubscription.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory EventSubscription.fromJson(Map<String, dynamic> json) {
  return EventSubscription(
    custSubscriptionId: json['CustSubscriptionId'] as String?,
    customerAwsId: json['CustomerAwsId'] as String?,
    enabled: json['Enabled'] as bool?,
    eventCategoriesList: (json['EventCategoriesList'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    snsTopicArn: json['SnsTopicArn'] as String?,
    sourceIdsList: (json['SourceIdsList'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    sourceType: json['SourceType'] as String?,
    status: json['Status'] as String?,
    subscriptionCreationTime: json['SubscriptionCreationTime'] as String?,
  );
}