StorageOSPersistentVolumeSource.fromJson constructor

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

Creates a StorageOSPersistentVolumeSource from JSON data.

Implementation

factory StorageOSPersistentVolumeSource.fromJson(Map<String, dynamic> json) {
  final tempFsTypeJson = json['fsType'];
  final tempReadOnlyJson = json['readOnly'];
  final tempSecretRefJson = json['secretRef'];
  final tempVolumeNameJson = json['volumeName'];
  final tempVolumeNamespaceJson = json['volumeNamespace'];

  final String? tempFsType = tempFsTypeJson;
  final bool? tempReadOnly = tempReadOnlyJson;
  final ObjectReference? tempSecretRef = tempSecretRefJson != null
      ? ObjectReference.fromJson(tempSecretRefJson)
      : null;
  final String? tempVolumeName = tempVolumeNameJson;
  final String? tempVolumeNamespace = tempVolumeNamespaceJson;

  return StorageOSPersistentVolumeSource(
    fsType: tempFsType,
    readOnly: tempReadOnly,
    secretRef: tempSecretRef,
    volumeName: tempVolumeName,
    volumeNamespace: tempVolumeNamespace,
  );
}