Container.fromJson constructor

Container.fromJson(
  1. Map json_
)

Implementation

Container.fromJson(core.Map json_)
    : this(
        args: json_.containsKey('args')
            ? (json_['args'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        command: json_.containsKey('command')
            ? (json_['command'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        env: json_.containsKey('env')
            ? (json_['env'] as core.List)
                .map((value) => EnvVar.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        envFrom: json_.containsKey('envFrom')
            ? (json_['envFrom'] as core.List)
                .map((value) => EnvFromSource.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        image:
            json_.containsKey('image') ? json_['image'] as core.String : null,
        imagePullPolicy: json_.containsKey('imagePullPolicy')
            ? json_['imagePullPolicy'] as core.String
            : null,
        livenessProbe: json_.containsKey('livenessProbe')
            ? Probe.fromJson(
                json_['livenessProbe'] as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        ports: json_.containsKey('ports')
            ? (json_['ports'] as core.List)
                .map((value) => ContainerPort.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        readinessProbe: json_.containsKey('readinessProbe')
            ? Probe.fromJson(json_['readinessProbe']
                as core.Map<core.String, core.dynamic>)
            : null,
        resources: json_.containsKey('resources')
            ? ResourceRequirements.fromJson(
                json_['resources'] as core.Map<core.String, core.dynamic>)
            : null,
        securityContext: json_.containsKey('securityContext')
            ? SecurityContext.fromJson(json_['securityContext']
                as core.Map<core.String, core.dynamic>)
            : null,
        startupProbe: json_.containsKey('startupProbe')
            ? Probe.fromJson(
                json_['startupProbe'] as core.Map<core.String, core.dynamic>)
            : null,
        terminationMessagePath: json_.containsKey('terminationMessagePath')
            ? json_['terminationMessagePath'] as core.String
            : null,
        terminationMessagePolicy:
            json_.containsKey('terminationMessagePolicy')
                ? json_['terminationMessagePolicy'] as core.String
                : null,
        volumeMounts: json_.containsKey('volumeMounts')
            ? (json_['volumeMounts'] as core.List)
                .map((value) => VolumeMount.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        workingDir: json_.containsKey('workingDir')
            ? json_['workingDir'] as core.String
            : null,
      );