maybeFromJson static method

ServerPowerState? maybeFromJson(
  1. String json
)

Implementation

static ServerPowerState? maybeFromJson(String json) => switch (json) {
      'running' => ServerPowerState.running,
      'starting' => ServerPowerState.starting,
      'stopping' => ServerPowerState.stopping,
      'offline' => ServerPowerState.offline,
      _ => null,
    };