DiscoveryClient.fromJson constructor

DiscoveryClient.fromJson(
  1. Map json_
)

Implementation

DiscoveryClient.fromJson(core.Map json_)
    : this(
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        errors: json_.containsKey('errors')
            ? (json_['errors'] as core.List)
                .map((value) => Status.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        expireTime: json_.containsKey('expireTime')
            ? json_['expireTime'] as core.String
            : null,
        heartbeatTime: json_.containsKey('heartbeatTime')
            ? json_['heartbeatTime'] 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,
        serviceAccount: json_.containsKey('serviceAccount')
            ? json_['serviceAccount'] as core.String
            : null,
        signalsEndpoint: json_.containsKey('signalsEndpoint')
            ? json_['signalsEndpoint'] as core.String
            : null,
        source: json_.containsKey('source')
            ? json_['source'] as core.String
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        ttl: json_.containsKey('ttl') ? json_['ttl'] as core.String : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        version: json_.containsKey('version')
            ? json_['version'] as core.String
            : null,
      );