CinderVolumeSource.fromJson constructor

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

Creates a CinderVolumeSource from JSON data.

Implementation

factory CinderVolumeSource.fromJson(Map<String, dynamic> json) {
  final tempFsTypeJson = json['fsType'];
  final tempReadOnlyJson = json['readOnly'];
  final tempSecretRefJson = json['secretRef'];
  final tempVolumeIDJson = json['volumeID'];

  final String? tempFsType = tempFsTypeJson;
  final bool? tempReadOnly = tempReadOnlyJson;
  final LocalObjectReference? tempSecretRef = tempSecretRefJson != null
      ? LocalObjectReference.fromJson(tempSecretRefJson)
      : null;
  final String tempVolumeID = tempVolumeIDJson;

  return CinderVolumeSource(
    fsType: tempFsType,
    readOnly: tempReadOnly,
    secretRef: tempSecretRef,
    volumeID: tempVolumeID,
  );
}