Action.fromJson constructor

Action.fromJson(
  1. Map _json
)

Implementation

Action.fromJson(core.Map _json)
    : this(
        alwaysRun: _json.containsKey('alwaysRun')
            ? _json['alwaysRun'] as core.bool
            : null,
        blockExternalNetwork: _json.containsKey('blockExternalNetwork')
            ? _json['blockExternalNetwork'] as core.bool
            : null,
        commands: _json.containsKey('commands')
            ? (_json['commands'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        containerName: _json.containsKey('containerName')
            ? _json['containerName'] as core.String
            : null,
        credentials: _json.containsKey('credentials')
            ? Secret.fromJson(
                _json['credentials'] as core.Map<core.String, core.dynamic>)
            : null,
        disableImagePrefetch: _json.containsKey('disableImagePrefetch')
            ? _json['disableImagePrefetch'] as core.bool
            : null,
        disableStandardErrorCapture:
            _json.containsKey('disableStandardErrorCapture')
                ? _json['disableStandardErrorCapture'] as core.bool
                : null,
        enableFuse: _json.containsKey('enableFuse')
            ? _json['enableFuse'] as core.bool
            : null,
        encryptedEnvironment: _json.containsKey('encryptedEnvironment')
            ? Secret.fromJson(_json['encryptedEnvironment']
                as core.Map<core.String, core.dynamic>)
            : null,
        entrypoint: _json.containsKey('entrypoint')
            ? _json['entrypoint'] as core.String
            : null,
        environment: _json.containsKey('environment')
            ? (_json['environment'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        ignoreExitStatus: _json.containsKey('ignoreExitStatus')
            ? _json['ignoreExitStatus'] as core.bool
            : null,
        imageUri: _json.containsKey('imageUri')
            ? _json['imageUri'] as core.String
            : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        mounts: _json.containsKey('mounts')
            ? (_json['mounts'] as core.List)
                .map((value) => Mount.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        pidNamespace: _json.containsKey('pidNamespace')
            ? _json['pidNamespace'] as core.String
            : null,
        portMappings: _json.containsKey('portMappings')
            ? (_json['portMappings'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.int,
                ),
              )
            : null,
        publishExposedPorts: _json.containsKey('publishExposedPorts')
            ? _json['publishExposedPorts'] as core.bool
            : null,
        runInBackground: _json.containsKey('runInBackground')
            ? _json['runInBackground'] as core.bool
            : null,
        timeout: _json.containsKey('timeout')
            ? _json['timeout'] as core.String
            : null,
      );