Automation.fromJson constructor

Automation.fromJson(
  1. Map json_
)

Implementation

Automation.fromJson(core.Map json_)
    : this(
        annotations: json_.containsKey('annotations')
            ? (json_['annotations'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        rules: json_.containsKey('rules')
            ? (json_['rules'] as core.List)
                .map((value) => AutomationRule.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        selector: json_.containsKey('selector')
            ? AutomationResourceSelector.fromJson(
                json_['selector'] as core.Map<core.String, core.dynamic>)
            : null,
        serviceAccount: json_.containsKey('serviceAccount')
            ? json_['serviceAccount'] as core.String
            : null,
        suspended: json_.containsKey('suspended')
            ? json_['suspended'] as core.bool
            : null,
        uid: json_.containsKey('uid') ? json_['uid'] as core.String : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
      );