toJson method

Map<String, Object> toJson()

Converts a CustomResourceConversion instance to JSON data.

Implementation

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

  final tempStrategy = strategy;
  final tempWebhook = webhook;

  jsonData['strategy'] = tempStrategy;

  if (tempWebhook != null) {
    jsonData['webhook'] = tempWebhook.toJson();
  }

  return jsonData;
}