VolumeMount.fromJson constructor

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

Creates a VolumeMount from JSON data.

Implementation

factory VolumeMount.fromJson(Map<String, dynamic> json) {
  final tempMountPathJson = json['mountPath'];
  final tempMountPropagationJson = json['mountPropagation'];
  final tempNameJson = json['name'];
  final tempReadOnlyJson = json['readOnly'];
  final tempSubPathJson = json['subPath'];
  final tempSubPathExprJson = json['subPathExpr'];

  final String tempMountPath = tempMountPathJson;
  final String? tempMountPropagation = tempMountPropagationJson;
  final String tempName = tempNameJson;
  final bool? tempReadOnly = tempReadOnlyJson;
  final String? tempSubPath = tempSubPathJson;
  final String? tempSubPathExpr = tempSubPathExprJson;

  return VolumeMount(
    mountPath: tempMountPath,
    mountPropagation: tempMountPropagation,
    name: tempName,
    readOnly: tempReadOnly,
    subPath: tempSubPath,
    subPathExpr: tempSubPathExpr,
  );
}