JourneyResponse.fromJson constructor
JourneyResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory JourneyResponse.fromJson(Map<String, dynamic> json) {
return JourneyResponse(
applicationId: json['ApplicationId'] as String,
id: json['Id'] as String,
name: json['Name'] as String,
activities: (json['Activities'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, Activity.fromJson(e as Map<String, dynamic>))),
creationDate: json['CreationDate'] as String?,
lastModifiedDate: json['LastModifiedDate'] as String?,
limits: json['Limits'] != null
? JourneyLimits.fromJson(json['Limits'] as Map<String, dynamic>)
: null,
localTime: json['LocalTime'] as bool?,
quietTime: json['QuietTime'] != null
? QuietTime.fromJson(json['QuietTime'] as Map<String, dynamic>)
: null,
refreshFrequency: json['RefreshFrequency'] as String?,
schedule: json['Schedule'] != null
? JourneySchedule.fromJson(json['Schedule'] as Map<String, dynamic>)
: null,
startActivity: json['StartActivity'] as String?,
startCondition: json['StartCondition'] != null
? StartCondition.fromJson(
json['StartCondition'] as Map<String, dynamic>)
: null,
state: (json['State'] as String?)?.toState(),
tags: (json['tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
);
}