dtoToPowerSource function

PowerSource dtoToPowerSource(
  1. PowerSourceDTO? powerSource
)

Implementation

PowerSource dtoToPowerSource(PowerSourceDTO? powerSource) {
  switch (powerSource) {
    case PowerSourceDTO.swaggerGeneratedUnknown:
    case PowerSourceDTO.unknown:
    case null:
      return PowerSource.none;

    case PowerSourceDTO.utility:
      return PowerSource.utility;

    case PowerSourceDTO.generator:
      return PowerSource.generator;
  }
}