toJson method

Map<String, Object> toJson()

Converts a CinderPersistentVolumeSource instance to JSON data.

Implementation

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

  if (fsType != null) {
    jsonData['fsType'] = fsType!;
  }
  if (readOnly != null) {
    jsonData['readOnly'] = readOnly!;
  }
  if (secretRef != null) {
    jsonData['secretRef'] = secretRef!.toJson();
  }
  jsonData['volumeID'] = volumeID;

  return jsonData;
}