/// Indicates a format's autofocus system.
///
/// * `none`: Indicates that autofocus is not available
/// * `contrastDetection`: Indicates that autofocus is achieved by contrast detection. Contrast detection performs a focus scan to find the optimal position
/// * `phaseDetection`: Indicates that autofocus is achieved by phase detection. Phase detection has the ability to achieve focus in many cases without a focus scan. Phase detection autofocus is typically less visually intrusive than contrast detection autofocus
enum AutoFocusSystem { contrastDetection, phaseDetection, none }

AutoFocusSystem autoFocusSystemFromString(String string) {
  switch (string) {
    case 'contrast-detection':
      return AutoFocusSystem.contrastDetection;
    case 'phase-detection':
      return AutoFocusSystem.phaseDetection;
    case 'none':
    default:
      return AutoFocusSystem.none;
  }
}
