from static method

Looks up a value by wire int, Dart enum name, or original proto name (whichever value happens to be). Throws if not found.

Implementation

static MethodOptionsIdempotencyLevel from(Object? value) {
  return MethodOptionsIdempotencyLevel.values.firstWhere(
    (e) => e.value == value || e.name == value || e.protoName == value,
    orElse:
        () =>
            throw ItemNotFoundException(
              name: "MethodOptionsIdempotencyLevel",
              value: value,
            ),
  );
}