toJson method

Map<String, Object> toJson()

Converts a DeploymentStrategy instance to JSON data.

Implementation

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

  final tempRollingUpdate = rollingUpdate;
  final tempType = type;

  if (tempRollingUpdate != null) {
    jsonData['rollingUpdate'] = tempRollingUpdate.toJson();
  }

  if (tempType != null) {
    jsonData['type'] = tempType;
  }

  return jsonData;
}