toJson method

Map<String, Object> toJson()

Converts a ScaleIOPersistentVolumeSource instance to JSON data.

Implementation

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

  if (fsType != null) {
    jsonData['fsType'] = fsType!;
  }
  jsonData['gateway'] = gateway;
  if (protectionDomain != null) {
    jsonData['protectionDomain'] = protectionDomain!;
  }
  if (readOnly != null) {
    jsonData['readOnly'] = readOnly!;
  }
  jsonData['secretRef'] = secretRef.toJson();
  if (sslEnabled != null) {
    jsonData['sslEnabled'] = sslEnabled!;
  }
  if (storageMode != null) {
    jsonData['storageMode'] = storageMode!;
  }
  if (storagePool != null) {
    jsonData['storagePool'] = storagePool!;
  }
  jsonData['system'] = system;
  if (volumeName != null) {
    jsonData['volumeName'] = volumeName!;
  }

  return jsonData;
}