FlexVolumeSource.fromJson constructor

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

Creates a FlexVolumeSource from JSON data.

Implementation

factory FlexVolumeSource.fromJson(Map<String, dynamic> json) {
  final tempDriverJson = json['driver'];
  final tempFsTypeJson = json['fsType'];
  final tempOptionsJson = json['options'];
  final tempReadOnlyJson = json['readOnly'];
  final tempSecretRefJson = json['secretRef'];

  final String tempDriver = tempDriverJson;
  final String? tempFsType = tempFsTypeJson;

  final Map<String, String>? tempOptions = tempOptionsJson != null
      ? Map<String, String>.from(tempOptionsJson)
      : null;

  final bool? tempReadOnly = tempReadOnlyJson;
  final LocalObjectReference? tempSecretRef = tempSecretRefJson != null
      ? LocalObjectReference.fromJson(tempSecretRefJson)
      : null;

  return FlexVolumeSource(
    driver: tempDriver,
    fsType: tempFsType,
    options: tempOptions,
    readOnly: tempReadOnly,
    secretRef: tempSecretRef,
  );
}