Container.fromJson constructor
Creates a Container from JSON data.
Implementation
Container.fromJson(Map<String, dynamic> json)
: this(
args: json['args'] != null ? List<String>.from(json['args']) : null,
command: json['command'] != null
? List<String>.from(json['command'])
: null,
env: json['env'] != null
? EnvVar.listFromJson(
(json['env'] as Iterable).cast<Map<String, dynamic>>())
: null,
envFrom: json['envFrom'] != null
? EnvFromSource.listFromJson(
(json['envFrom'] as Iterable).cast<Map<String, dynamic>>())
: null,
image: json['image'],
imagePullPolicy: json['imagePullPolicy'],
lifecycle: json['lifecycle'] != null
? Lifecycle.fromJson(json['lifecycle'])
: null,
livenessProbe: json['livenessProbe'] != null
? Probe.fromJson(json['livenessProbe'])
: null,
name: json['name'],
ports: json['ports'] != null
? ContainerPort.listFromJson(
(json['ports'] as Iterable).cast<Map<String, dynamic>>())
: null,
readinessProbe: json['readinessProbe'] != null
? Probe.fromJson(json['readinessProbe'])
: null,
resources: json['resources'] != null
? ResourceRequirements.fromJson(json['resources'])
: null,
securityContext: json['securityContext'] != null
? SecurityContext.fromJson(json['securityContext'])
: null,
startupProbe: json['startupProbe'] != null
? Probe.fromJson(json['startupProbe'])
: null,
stdin: json['stdin'],
stdinOnce: json['stdinOnce'],
terminationMessagePath: json['terminationMessagePath'],
terminationMessagePolicy: json['terminationMessagePolicy'],
tty: json['tty'],
volumeDevices: json['volumeDevices'] != null
? VolumeDevice.listFromJson((json['volumeDevices'] as Iterable)
.cast<Map<String, dynamic>>())
: null,
volumeMounts: json['volumeMounts'] != null
? VolumeMount.listFromJson((json['volumeMounts'] as Iterable)
.cast<Map<String, dynamic>>())
: null,
workingDir: json['workingDir'],
);