Schedule.fromJson constructor
Schedule.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Schedule.fromJson(Map<String, dynamic> json) {
return Schedule(
copyTags: json['CopyTags'] as bool?,
createRule: json['CreateRule'] != null
? CreateRule.fromJson(json['CreateRule'] as Map<String, dynamic>)
: null,
crossRegionCopyRules: (json['CrossRegionCopyRules'] as List?)
?.whereNotNull()
.map((e) => CrossRegionCopyRule.fromJson(e as Map<String, dynamic>))
.toList(),
fastRestoreRule: json['FastRestoreRule'] != null
? FastRestoreRule.fromJson(
json['FastRestoreRule'] as Map<String, dynamic>)
: null,
name: json['Name'] as String?,
retainRule: json['RetainRule'] != null
? RetainRule.fromJson(json['RetainRule'] as Map<String, dynamic>)
: null,
shareRules: (json['ShareRules'] as List?)
?.whereNotNull()
.map((e) => ShareRule.fromJson(e as Map<String, dynamic>))
.toList(),
tagsToAdd: (json['TagsToAdd'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
variableTags: (json['VariableTags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
);
}