DaemonSetSpec.fromJson constructor

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

Creates a DaemonSetSpec from JSON data.

Implementation

factory DaemonSetSpec.fromJson(Map<String, dynamic> json) {
  final tempMinReadySecondsJson = json['minReadySeconds'];
  final tempRevisionHistoryLimitJson = json['revisionHistoryLimit'];
  final tempSelectorJson = json['selector'];
  final tempTemplateJson = json['template'];
  final tempUpdateStrategyJson = json['updateStrategy'];

  final int? tempMinReadySeconds = tempMinReadySecondsJson;
  final int? tempRevisionHistoryLimit = tempRevisionHistoryLimitJson;
  final LabelSelector tempSelector = LabelSelector.fromJson(tempSelectorJson);
  final PodTemplateSpec tempTemplate =
      PodTemplateSpec.fromJson(tempTemplateJson);
  final DaemonSetUpdateStrategy? tempUpdateStrategy =
      tempUpdateStrategyJson != null
          ? DaemonSetUpdateStrategy.fromJson(tempUpdateStrategyJson)
          : null;

  return DaemonSetSpec(
    minReadySeconds: tempMinReadySeconds,
    revisionHistoryLimit: tempRevisionHistoryLimit,
    selector: tempSelector,
    template: tempTemplate,
    updateStrategy: tempUpdateStrategy,
  );
}