CephFSVolumeSource.fromJson constructor

CephFSVolumeSource.fromJson(
  1. Map<String, dynamic> json
)

Creates a CephFSVolumeSource from JSON data.

Implementation

factory CephFSVolumeSource.fromJson(Map<String, dynamic> json) {
  final tempMonitorsJson = json['monitors'];
  final tempPathJson = json['path'];
  final tempReadOnlyJson = json['readOnly'];
  final tempSecretFileJson = json['secretFile'];
  final tempSecretRefJson = json['secretRef'];
  final tempUserJson = json['user'];

  final List<String> tempMonitors = List<String>.from(tempMonitorsJson);
  final String? tempPath = tempPathJson;
  final bool? tempReadOnly = tempReadOnlyJson;
  final String? tempSecretFile = tempSecretFileJson;
  final LocalObjectReference? tempSecretRef = tempSecretRefJson != null
      ? LocalObjectReference.fromJson(tempSecretRefJson)
      : null;
  final String? tempUser = tempUserJson;

  return CephFSVolumeSource(
    monitors: tempMonitors,
    path: tempPath,
    readOnly: tempReadOnly,
    secretFile: tempSecretFile,
    secretRef: tempSecretRef,
    user: tempUser,
  );
}