v1OutcomeFromJson function

v1Outcome v1OutcomeFromJson(
  1. dynamic value
)

Implementation

v1Outcome v1OutcomeFromJson(dynamic value) {
  switch (value) {
    case 'OUTCOME_UNSPECIFIED':
      return v1Outcome.outcome_unspecified;
    case 'OUTCOME_ALLOW':
      return v1Outcome.outcome_allow;
    case 'OUTCOME_DENY_EXPLICIT':
      return v1Outcome.outcome_deny_explicit;
    case 'OUTCOME_DENY_IMPLICIT':
      return v1Outcome.outcome_deny_implicit;
    case 'OUTCOME_REQUIRES_CONSENSUS':
      return v1Outcome.outcome_requires_consensus;
    case 'OUTCOME_REJECTED':
      return v1Outcome.outcome_rejected;
    case 'OUTCOME_ERROR':
      return v1Outcome.outcome_error;
    default:
      throw ArgumentError('Unknown v1Outcome: $value');
  }
}