toJson method

Map<String, Object> toJson()

Converts a GlusterfsVolumeSource instance to JSON data.

Implementation

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

  jsonData['endpoints'] = endpoints;
  jsonData['path'] = path;
  if (readOnly != null) {
    jsonData['readOnly'] = readOnly!;
  }

  return jsonData;
}