toJson method

Map<String, Object> toJson()

Converts a RollingUpdateDeployment instance to JSON data.

Implementation

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

  if (maxSurge != null) {
    jsonData['maxSurge'] = maxSurge!;
  }
  if (maxUnavailable != null) {
    jsonData['maxUnavailable'] = maxUnavailable!;
  }

  return jsonData;
}