ServiceSpec.fromJson constructor

ServiceSpec.fromJson(
  1. Map json_
)

Implementation

ServiceSpec.fromJson(core.Map json_)
    : this(
        template: json_.containsKey('template')
            ? RevisionTemplate.fromJson(
                json_['template'] as core.Map<core.String, core.dynamic>)
            : null,
        traffic: json_.containsKey('traffic')
            ? (json_['traffic'] as core.List)
                .map((value) => TrafficTarget.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );