parse static method

Parses a release state at the Google Play response boundary.

Implementation

static GooglePlayReleaseStatus parse(Object? value) => switch (value) {
  'statusUnspecified' => GooglePlayReleaseStatus.unspecified,
  'draft' => GooglePlayReleaseStatus.draft,
  'inProgress' => GooglePlayReleaseStatus.inProgress,
  'halted' => GooglePlayReleaseStatus.halted,
  'completed' => GooglePlayReleaseStatus.completed,
  _ => throw SmfError(
    'Google Play returned unsupported release status "$value".',
    SmfErrorCode.googlePlayResponse,
  ),
};