TaskSpec.fromJson constructor

TaskSpec.fromJson(
  1. Map json_
)

Implementation

TaskSpec.fromJson(core.Map json_)
    : this(
        containers: json_.containsKey('containers')
            ? (json_['containers'] as core.List)
                .map((value) => Container.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        maxRetries: json_.containsKey('maxRetries')
            ? json_['maxRetries'] as core.int
            : null,
        serviceAccountName: json_.containsKey('serviceAccountName')
            ? json_['serviceAccountName'] as core.String
            : null,
        timeoutSeconds: json_.containsKey('timeoutSeconds')
            ? json_['timeoutSeconds'] as core.String
            : null,
        volumes: json_.containsKey('volumes')
            ? (json_['volumes'] as core.List)
                .map((value) => Volume.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );