DaemonSetCondition.fromJson constructor

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

Creates a DaemonSetCondition from JSON data.

Implementation

factory DaemonSetCondition.fromJson(Map<String, dynamic> json) {
  final tempLastTransitionTimeJson = json['lastTransitionTime'];
  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 String? tempMessage = tempMessageJson;
  final String? tempReason = tempReasonJson;
  final String tempStatus = tempStatusJson;
  final String tempType = tempTypeJson;

  return DaemonSetCondition(
    lastTransitionTime: tempLastTransitionTime,
    message: tempMessage,
    reason: tempReason,
    status: tempStatus,
    type: tempType,
  );
}