ApiKey.fromJson constructor

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

Implementation

factory ApiKey.fromJson(Map<String, dynamic> json) {
  return ApiKey(
    createdDate: timeStampFromJson(json['createdDate']),
    customerId: json['customerId'] as String?,
    description: json['description'] as String?,
    enabled: json['enabled'] as bool?,
    id: json['id'] as String?,
    lastUpdatedDate: timeStampFromJson(json['lastUpdatedDate']),
    name: json['name'] as String?,
    stageKeys: (json['stageKeys'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    value: json['value'] as String?,
  );
}