DeploymentCondition.fromJson constructor
Creates a DeploymentCondition from JSON data.
Implementation
factory DeploymentCondition.fromJson(Map<String, dynamic> json) {
final tempLastTransitionTimeJson = json['lastTransitionTime'];
final tempLastUpdateTimeJson = json['lastUpdateTime'];
final tempMessageJson = json['message'];
final tempReasonJson = json['reason'];
final tempStatusJson = json['status'];
final tempTypeJson = json['type'];
final DateTime? tempLastTransitionTime = tempLastTransitionTimeJson != null
? DateTime.tryParse(tempLastTransitionTimeJson)
: null;
final DateTime? tempLastUpdateTime = tempLastUpdateTimeJson != null
? DateTime.tryParse(tempLastUpdateTimeJson)
: null;
final String? tempMessage = tempMessageJson;
final String? tempReason = tempReasonJson;
final String tempStatus = tempStatusJson;
final String tempType = tempTypeJson;
return DeploymentCondition(
lastTransitionTime: tempLastTransitionTime,
lastUpdateTime: tempLastUpdateTime,
message: tempMessage,
reason: tempReason,
status: tempStatus,
type: tempType,
);
}