InterconnectDiagnosticsLinkOpticalPower.fromJson constructor

InterconnectDiagnosticsLinkOpticalPower.fromJson(
  1. Object? j
)

Implementation

factory InterconnectDiagnosticsLinkOpticalPower.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return InterconnectDiagnosticsLinkOpticalPower(
    state: switch (json['state']) {
      null => null,
      Object $1 => decodeString($1),
    },
    value: switch (json['value']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
  );
}