toJson method

Map<String, Object> toJson()

Converts a ScaleIOVolumeSource instance to JSON data.

Implementation

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

  final tempFsType = fsType;
  final tempGateway = gateway;
  final tempProtectionDomain = protectionDomain;
  final tempReadOnly = readOnly;
  final tempSecretRef = secretRef;
  final tempSslEnabled = sslEnabled;
  final tempStorageMode = storageMode;
  final tempStoragePool = storagePool;
  final tempSystem = system;
  final tempVolumeName = volumeName;

  if (tempFsType != null) {
    jsonData['fsType'] = tempFsType;
  }

  jsonData['gateway'] = tempGateway;

  if (tempProtectionDomain != null) {
    jsonData['protectionDomain'] = tempProtectionDomain;
  }

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

  jsonData['secretRef'] = tempSecretRef.toJson();

  if (tempSslEnabled != null) {
    jsonData['sslEnabled'] = tempSslEnabled;
  }

  if (tempStorageMode != null) {
    jsonData['storageMode'] = tempStorageMode;
  }

  if (tempStoragePool != null) {
    jsonData['storagePool'] = tempStoragePool;
  }

  jsonData['system'] = tempSystem;

  if (tempVolumeName != null) {
    jsonData['volumeName'] = tempVolumeName;
  }

  return jsonData;
}