AgentMetadata.fromJson constructor

AgentMetadata.fromJson(
  1. Map json_
)

Implementation

AgentMetadata.fromJson(core.Map json_)
    : this(
        creationTime: json_.containsKey('creationTime')
            ? json_['creationTime'] as core.String
            : null,
        creator: json_.containsKey('creator')
            ? json_['creator'] as core.String
            : null,
        imageVersion: json_.containsKey('imageVersion')
            ? json_['imageVersion'] as core.String
            : null,
        instance: json_.containsKey('instance')
            ? json_['instance'] as core.String
            : null,
        instanceId: json_.containsKey('instanceId')
            ? json_['instanceId'] as core.String
            : null,
        instancePreemptionNoticeReceived:
            json_.containsKey('instancePreemptionNoticeReceived')
                ? json_['instancePreemptionNoticeReceived'] as core.bool
                : null,
        machineType: json_.containsKey('machineType')
            ? json_['machineType'] as core.String
            : null,
        osRelease: json_.containsKey('osRelease')
            ? (json_['osRelease'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
        zone: json_.containsKey('zone') ? json_['zone'] as core.String : null,
      );