NodeSystemInfo.fromJson constructor

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

Creates a NodeSystemInfo from JSON data.

Implementation

factory NodeSystemInfo.fromJson(Map<String, dynamic> json) {
  final tempArchitectureJson = json['architecture'];
  final tempBootIDJson = json['bootID'];
  final tempContainerRuntimeVersionJson = json['containerRuntimeVersion'];
  final tempKernelVersionJson = json['kernelVersion'];
  final tempKubeProxyVersionJson = json['kubeProxyVersion'];
  final tempKubeletVersionJson = json['kubeletVersion'];
  final tempMachineIDJson = json['machineID'];
  final tempOperatingSystemJson = json['operatingSystem'];
  final tempOsImageJson = json['osImage'];
  final tempSystemUUIDJson = json['systemUUID'];

  final String tempArchitecture = tempArchitectureJson;
  final String tempBootID = tempBootIDJson;
  final String tempContainerRuntimeVersion = tempContainerRuntimeVersionJson;
  final String tempKernelVersion = tempKernelVersionJson;
  final String tempKubeProxyVersion = tempKubeProxyVersionJson;
  final String tempKubeletVersion = tempKubeletVersionJson;
  final String tempMachineID = tempMachineIDJson;
  final String tempOperatingSystem = tempOperatingSystemJson;
  final String tempOsImage = tempOsImageJson;
  final String tempSystemUUID = tempSystemUUIDJson;

  return NodeSystemInfo(
    architecture: tempArchitecture,
    bootID: tempBootID,
    containerRuntimeVersion: tempContainerRuntimeVersion,
    kernelVersion: tempKernelVersion,
    kubeProxyVersion: tempKubeProxyVersion,
    kubeletVersion: tempKubeletVersion,
    machineID: tempMachineID,
    operatingSystem: tempOperatingSystem,
    osImage: tempOsImage,
    systemUUID: tempSystemUUID,
  );
}