toJson method

Map<String, Object> toJson()

Converts a DaemonSetSpec instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempMinReadySeconds = minReadySeconds;
  final tempRevisionHistoryLimit = revisionHistoryLimit;
  final tempSelector = selector;
  final tempTemplate = template;
  final tempUpdateStrategy = updateStrategy;

  if (tempMinReadySeconds != null) {
    jsonData['minReadySeconds'] = tempMinReadySeconds;
  }

  if (tempRevisionHistoryLimit != null) {
    jsonData['revisionHistoryLimit'] = tempRevisionHistoryLimit;
  }

  jsonData['selector'] = tempSelector.toJson();

  jsonData['template'] = tempTemplate.toJson();

  if (tempUpdateStrategy != null) {
    jsonData['updateStrategy'] = tempUpdateStrategy.toJson();
  }

  return jsonData;
}