Service.fromJson constructor

Service.fromJson(
  1. Map json_
)

Implementation

Service.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,
        endpoints: json_.containsKey('endpoints')
            ? (json_['endpoints'] as core.List)
                .map((value) => Endpoint.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        uid: json_.containsKey('uid') ? json_['uid'] as core.String : null,
      );