Volume.fromJson constructor

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

Creates a Volume from JSON data.

Implementation

factory Volume.fromJson(Map<String, dynamic> json) {
  final tempAwsElasticBlockStoreJson = json['awsElasticBlockStore'];
  final tempAzureDiskJson = json['azureDisk'];
  final tempAzureFileJson = json['azureFile'];
  final tempCephfsJson = json['cephfs'];
  final tempCinderJson = json['cinder'];
  final tempConfigMapJson = json['configMap'];
  final tempCsiJson = json['csi'];
  final tempDownwardAPIJson = json['downwardAPI'];
  final tempEmptyDirJson = json['emptyDir'];
  final tempEphemeralJson = json['ephemeral'];
  final tempFcJson = json['fc'];
  final tempFlexVolumeJson = json['flexVolume'];
  final tempFlockerJson = json['flocker'];
  final tempGcePersistentDiskJson = json['gcePersistentDisk'];
  final tempGitRepoJson = json['gitRepo'];
  final tempGlusterfsJson = json['glusterfs'];
  final tempHostPathJson = json['hostPath'];
  final tempIscsiJson = json['iscsi'];
  final tempNameJson = json['name'];
  final tempNfsJson = json['nfs'];
  final tempPersistentVolumeClaimJson = json['persistentVolumeClaim'];
  final tempPhotonPersistentDiskJson = json['photonPersistentDisk'];
  final tempPortworxVolumeJson = json['portworxVolume'];
  final tempProjectedJson = json['projected'];
  final tempQuobyteJson = json['quobyte'];
  final tempRbdJson = json['rbd'];
  final tempScaleIOJson = json['scaleIO'];
  final tempSecretJson = json['secret'];
  final tempStorageosJson = json['storageos'];
  final tempVsphereVolumeJson = json['vsphereVolume'];

  final AWSElasticBlockStoreVolumeSource? tempAwsElasticBlockStore =
      tempAwsElasticBlockStoreJson != null
          ? AWSElasticBlockStoreVolumeSource.fromJson(
              tempAwsElasticBlockStoreJson)
          : null;
  final AzureDiskVolumeSource? tempAzureDisk = tempAzureDiskJson != null
      ? AzureDiskVolumeSource.fromJson(tempAzureDiskJson)
      : null;
  final AzureFileVolumeSource? tempAzureFile = tempAzureFileJson != null
      ? AzureFileVolumeSource.fromJson(tempAzureFileJson)
      : null;
  final CephFSVolumeSource? tempCephfs = tempCephfsJson != null
      ? CephFSVolumeSource.fromJson(tempCephfsJson)
      : null;
  final CinderVolumeSource? tempCinder = tempCinderJson != null
      ? CinderVolumeSource.fromJson(tempCinderJson)
      : null;
  final ConfigMapVolumeSource? tempConfigMap = tempConfigMapJson != null
      ? ConfigMapVolumeSource.fromJson(tempConfigMapJson)
      : null;
  final CSIVolumeSource? tempCsi =
      tempCsiJson != null ? CSIVolumeSource.fromJson(tempCsiJson) : null;
  final DownwardAPIVolumeSource? tempDownwardAPI = tempDownwardAPIJson != null
      ? DownwardAPIVolumeSource.fromJson(tempDownwardAPIJson)
      : null;
  final EmptyDirVolumeSource? tempEmptyDir = tempEmptyDirJson != null
      ? EmptyDirVolumeSource.fromJson(tempEmptyDirJson)
      : null;
  final EphemeralVolumeSource? tempEphemeral = tempEphemeralJson != null
      ? EphemeralVolumeSource.fromJson(tempEphemeralJson)
      : null;
  final FCVolumeSource? tempFc =
      tempFcJson != null ? FCVolumeSource.fromJson(tempFcJson) : null;
  final FlexVolumeSource? tempFlexVolume = tempFlexVolumeJson != null
      ? FlexVolumeSource.fromJson(tempFlexVolumeJson)
      : null;
  final FlockerVolumeSource? tempFlocker = tempFlockerJson != null
      ? FlockerVolumeSource.fromJson(tempFlockerJson)
      : null;
  final GCEPersistentDiskVolumeSource? tempGcePersistentDisk =
      tempGcePersistentDiskJson != null
          ? GCEPersistentDiskVolumeSource.fromJson(tempGcePersistentDiskJson)
          : null;
  final GitRepoVolumeSource? tempGitRepo = tempGitRepoJson != null
      ? GitRepoVolumeSource.fromJson(tempGitRepoJson)
      : null;
  final GlusterfsVolumeSource? tempGlusterfs = tempGlusterfsJson != null
      ? GlusterfsVolumeSource.fromJson(tempGlusterfsJson)
      : null;
  final HostPathVolumeSource? tempHostPath = tempHostPathJson != null
      ? HostPathVolumeSource.fromJson(tempHostPathJson)
      : null;
  final ISCSIVolumeSource? tempIscsi = tempIscsiJson != null
      ? ISCSIVolumeSource.fromJson(tempIscsiJson)
      : null;
  final String tempName = tempNameJson;
  final NFSVolumeSource? tempNfs =
      tempNfsJson != null ? NFSVolumeSource.fromJson(tempNfsJson) : null;
  final PersistentVolumeClaimVolumeSource? tempPersistentVolumeClaim =
      tempPersistentVolumeClaimJson != null
          ? PersistentVolumeClaimVolumeSource.fromJson(
              tempPersistentVolumeClaimJson)
          : null;
  final PhotonPersistentDiskVolumeSource? tempPhotonPersistentDisk =
      tempPhotonPersistentDiskJson != null
          ? PhotonPersistentDiskVolumeSource.fromJson(
              tempPhotonPersistentDiskJson)
          : null;
  final PortworxVolumeSource? tempPortworxVolume =
      tempPortworxVolumeJson != null
          ? PortworxVolumeSource.fromJson(tempPortworxVolumeJson)
          : null;
  final ProjectedVolumeSource? tempProjected = tempProjectedJson != null
      ? ProjectedVolumeSource.fromJson(tempProjectedJson)
      : null;
  final QuobyteVolumeSource? tempQuobyte = tempQuobyteJson != null
      ? QuobyteVolumeSource.fromJson(tempQuobyteJson)
      : null;
  final RBDVolumeSource? tempRbd =
      tempRbdJson != null ? RBDVolumeSource.fromJson(tempRbdJson) : null;
  final ScaleIOVolumeSource? tempScaleIO = tempScaleIOJson != null
      ? ScaleIOVolumeSource.fromJson(tempScaleIOJson)
      : null;
  final SecretVolumeSource? tempSecret = tempSecretJson != null
      ? SecretVolumeSource.fromJson(tempSecretJson)
      : null;
  final StorageOSVolumeSource? tempStorageos = tempStorageosJson != null
      ? StorageOSVolumeSource.fromJson(tempStorageosJson)
      : null;
  final VsphereVirtualDiskVolumeSource? tempVsphereVolume =
      tempVsphereVolumeJson != null
          ? VsphereVirtualDiskVolumeSource.fromJson(tempVsphereVolumeJson)
          : null;

  return Volume(
    awsElasticBlockStore: tempAwsElasticBlockStore,
    azureDisk: tempAzureDisk,
    azureFile: tempAzureFile,
    cephfs: tempCephfs,
    cinder: tempCinder,
    configMap: tempConfigMap,
    csi: tempCsi,
    downwardAPI: tempDownwardAPI,
    emptyDir: tempEmptyDir,
    ephemeral: tempEphemeral,
    fc: tempFc,
    flexVolume: tempFlexVolume,
    flocker: tempFlocker,
    gcePersistentDisk: tempGcePersistentDisk,
    gitRepo: tempGitRepo,
    glusterfs: tempGlusterfs,
    hostPath: tempHostPath,
    iscsi: tempIscsi,
    name: tempName,
    nfs: tempNfs,
    persistentVolumeClaim: tempPersistentVolumeClaim,
    photonPersistentDisk: tempPhotonPersistentDisk,
    portworxVolume: tempPortworxVolume,
    projected: tempProjected,
    quobyte: tempQuobyte,
    rbd: tempRbd,
    scaleIO: tempScaleIO,
    secret: tempSecret,
    storageos: tempStorageos,
    vsphereVolume: tempVsphereVolume,
  );
}