Spoke.fromJson constructor

Spoke.fromJson(
  1. Map _json
)

Implementation

Spoke.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,
        hub: _json.containsKey('hub') ? _json['hub'] as core.String : null,
        labels: _json.containsKey('labels')
            ? (_json['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
        linkedInterconnectAttachments:
            _json.containsKey('linkedInterconnectAttachments')
                ? (_json['linkedInterconnectAttachments'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        linkedRouterApplianceInstances:
            _json.containsKey('linkedRouterApplianceInstances')
                ? (_json['linkedRouterApplianceInstances'] as core.List)
                    .map((value) => RouterApplianceInstance.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
        linkedVpnTunnels: _json.containsKey('linkedVpnTunnels')
            ? (_json['linkedVpnTunnels'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        uniqueId: _json.containsKey('uniqueId')
            ? _json['uniqueId'] as core.String
            : null,
        updateTime: _json.containsKey('updateTime')
            ? _json['updateTime'] as core.String
            : null,
      );