ThingGroupMetadata.fromJson constructor

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

Implementation

factory ThingGroupMetadata.fromJson(Map<String, dynamic> json) {
  return ThingGroupMetadata(
    creationDate: timeStampFromJson(json['creationDate']),
    parentGroupName: json['parentGroupName'] as String?,
    rootToParentThingGroups: (json['rootToParentThingGroups'] as List?)
        ?.whereNotNull()
        .map((e) => GroupNameAndArn.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}