RouterNatRule.fromJson constructor

RouterNatRule.fromJson(
  1. Object? j
)

Implementation

factory RouterNatRule.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return RouterNatRule(
    action: switch (json['action']) {
      null => null,
      Object $1 => RouterNatRuleAction.fromJson($1),
    },
    description: switch (json['description']) {
      null => null,
      Object $1 => decodeString($1),
    },
    match: switch (json['match']) {
      null => null,
      Object $1 => decodeString($1),
    },
    ruleNumber: switch (json['ruleNumber']) {
      null => null,
      Object $1 => decodeInt($1),
    },
  );
}