PscInterfaceConfig.fromJson constructor

PscInterfaceConfig.fromJson(
  1. Object? j
)

Implementation

factory PscInterfaceConfig.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return PscInterfaceConfig(
    networkAttachment: switch (json['networkAttachment']) {
      null => '',
      Object $1 => decodeString($1),
    },
    dnsPeeringConfigs: switch (json['dnsPeeringConfigs']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) DnsPeeringConfig.fromJson(i)],
      _ => throw const FormatException('"dnsPeeringConfigs" is not a list'),
    },
  );
}