// generated by diplomat-tool
// dart format off

part of 'lib.g.dart';

/// Additional information: [1](https://docs.rs/icu/2.2.0/icu/calendar/error/enum.DateFromFieldsError.html)
enum CalendarDateFromFieldsError {
  // ignore: public_member_api_docs
  unknown,
  // ignore: public_member_api_docs
  invalidDay,
  // ignore: public_member_api_docs
  invalidOrdinalMonth,
  // ignore: public_member_api_docs
  invalidEra,
  // ignore: public_member_api_docs
  monthCodeInvalidSyntax,
  // ignore: public_member_api_docs
  monthNotInCalendar,
  // ignore: public_member_api_docs
  monthNotInYear,
  // ignore: public_member_api_docs
  inconsistentYear,
  // ignore: public_member_api_docs
  inconsistentMonth,
  // ignore: public_member_api_docs
  notEnoughFields,
  // ignore: public_member_api_docs
  tooManyFields,
  // ignore: public_member_api_docs
  overflow;

  int get _ffi {
    switch (this) {
      case unknown:
        return 0;
      case invalidDay:
        return 1;
      case invalidOrdinalMonth:
        return 9;
      case invalidEra:
        return 2;
      case monthCodeInvalidSyntax:
        return 3;
      case monthNotInCalendar:
        return 4;
      case monthNotInYear:
        return 5;
      case inconsistentYear:
        return 6;
      case inconsistentMonth:
        return 7;
      case notEnoughFields:
        return 8;
      case tooManyFields:
        return 10;
      case overflow:
        return 11;
    }
  }

}

// dart format on
