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

part of 'lib.g.dart';

/// See the [Rust documentation for `LineBreak`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html) for more information.
enum LineBreak {
  /// See the [Rust documentation for `Unknown`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Unknown) for more information.
  unknown,
  /// See the [Rust documentation for `Ambiguous`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Ambiguous) for more information.
  ambiguous,
  /// See the [Rust documentation for `Alphabetic`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Alphabetic) for more information.
  alphabetic,
  /// See the [Rust documentation for `BreakBoth`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.BreakBoth) for more information.
  breakBoth,
  /// See the [Rust documentation for `BreakAfter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.BreakAfter) for more information.
  breakAfter,
  /// See the [Rust documentation for `BreakBefore`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.BreakBefore) for more information.
  breakBefore,
  /// See the [Rust documentation for `MandatoryBreak`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.MandatoryBreak) for more information.
  mandatoryBreak,
  /// See the [Rust documentation for `ContingentBreak`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ContingentBreak) for more information.
  contingentBreak,
  /// See the [Rust documentation for `ClosePunctuation`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ClosePunctuation) for more information.
  closePunctuation,
  /// See the [Rust documentation for `CombiningMark`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.CombiningMark) for more information.
  combiningMark,
  /// See the [Rust documentation for `CarriageReturn`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.CarriageReturn) for more information.
  carriageReturn,
  /// See the [Rust documentation for `Exclamation`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Exclamation) for more information.
  exclamation,
  /// See the [Rust documentation for `Glue`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Glue) for more information.
  glue,
  /// See the [Rust documentation for `Hyphen`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Hyphen) for more information.
  hyphen,
  /// See the [Rust documentation for `Ideographic`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Ideographic) for more information.
  ideographic,
  /// See the [Rust documentation for `Inseparable`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Inseparable) for more information.
  inseparable,
  /// See the [Rust documentation for `InfixNumeric`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.InfixNumeric) for more information.
  infixNumeric,
  /// See the [Rust documentation for `LineFeed`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.LineFeed) for more information.
  lineFeed,
  /// See the [Rust documentation for `Nonstarter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Nonstarter) for more information.
  nonstarter,
  /// See the [Rust documentation for `Numeric`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Numeric) for more information.
  numeric,
  /// See the [Rust documentation for `OpenPunctuation`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.OpenPunctuation) for more information.
  openPunctuation,
  /// See the [Rust documentation for `PostfixNumeric`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.PostfixNumeric) for more information.
  postfixNumeric,
  /// See the [Rust documentation for `PrefixNumeric`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.PrefixNumeric) for more information.
  prefixNumeric,
  /// See the [Rust documentation for `Quotation`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Quotation) for more information.
  quotation,
  /// See the [Rust documentation for `ComplexContext`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ComplexContext) for more information.
  complexContext,
  /// See the [Rust documentation for `Surrogate`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Surrogate) for more information.
  surrogate,
  /// See the [Rust documentation for `Space`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Space) for more information.
  space,
  /// See the [Rust documentation for `BreakSymbols`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.BreakSymbols) for more information.
  breakSymbols,
  /// See the [Rust documentation for `ZWSpace`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ZWSpace) for more information.
  zwSpace,
  /// See the [Rust documentation for `NextLine`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.NextLine) for more information.
  nextLine,
  /// See the [Rust documentation for `WordJoiner`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.WordJoiner) for more information.
  wordJoiner,
  /// See the [Rust documentation for `H2`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.H2) for more information.
  h2,
  /// See the [Rust documentation for `H3`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.H3) for more information.
  h3,
  /// See the [Rust documentation for `JL`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.JL) for more information.
  jl,
  /// See the [Rust documentation for `JT`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.JT) for more information.
  jt,
  /// See the [Rust documentation for `JV`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.JV) for more information.
  jv,
  /// See the [Rust documentation for `CloseParenthesis`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.CloseParenthesis) for more information.
  closeParenthesis,
  /// See the [Rust documentation for `ConditionalJapaneseStarter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ConditionalJapaneseStarter) for more information.
  conditionalJapaneseStarter,
  /// See the [Rust documentation for `HebrewLetter`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.HebrewLetter) for more information.
  hebrewLetter,
  /// See the [Rust documentation for `RegionalIndicator`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.RegionalIndicator) for more information.
  regionalIndicator,
  /// See the [Rust documentation for `EBase`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.EBase) for more information.
  eBase,
  /// See the [Rust documentation for `EModifier`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.EModifier) for more information.
  eModifier,
  /// See the [Rust documentation for `ZWJ`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ZWJ) for more information.
  zwj,
  /// See the [Rust documentation for `Aksara`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Aksara) for more information.
  aksara,
  /// See the [Rust documentation for `AksaraPrebase`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.AksaraPrebase) for more information.
  aksaraPrebase,
  /// See the [Rust documentation for `AksaraStart`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.AksaraStart) for more information.
  aksaraStart,
  /// See the [Rust documentation for `ViramaFinal`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.ViramaFinal) for more information.
  viramaFinal,
  /// See the [Rust documentation for `Virama`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.Virama) for more information.
  virama,
  /// See the [Rust documentation for `UnambiguousHyphen`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#associatedconstant.UnambiguousHyphen) for more information.
  unambiguousHyphen;

  /// See the [Rust documentation for `for_char`](https://docs.rs/icu/2.2.0/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information.
  static LineBreak forChar(Rune ch) {
    final result = _icu4x_LineBreak_for_char_mv1(ch);
    return LineBreak.values[result];
  }

  /// Get the "long" name of this property value (returns empty if property value is unknown)
  ///
  /// See the [Rust documentation for `get`](https://docs.rs/icu/2.2.0/icu/properties/struct.PropertyNamesLongBorrowed.html#method.get) for more information.
  String? longName() {
    final result = _icu4x_LineBreak_long_name_mv1(index);
    if (!result.isOk) {
      return null;
    }
    return result.union.ok._toDart([], isStatic: true);
  }

  /// Get the "short" name of this property value (returns empty if property value is unknown)
  ///
  /// See the [Rust documentation for `get`](https://docs.rs/icu/2.2.0/icu/properties/struct.PropertyNamesShortBorrowed.html#method.get) for more information.
  String? shortName() {
    final result = _icu4x_LineBreak_short_name_mv1(index);
    if (!result.isOk) {
      return null;
    }
    return result.union.ok._toDart([], isStatic: true);
  }

  /// Convert to an integer value usable with ICU4C and `CodePointMapData`
  ///
  /// See the [Rust documentation for `to_icu4c_value`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#method.to_icu4c_value) for more information.
  int toIntegerValue() {
    final result = _icu4x_LineBreak_to_integer_value_mv1(index);
    return result;
  }

  /// Convert from an integer value from ICU4C or `CodePointMapData`
  ///
  /// See the [Rust documentation for `from_icu4c_value`](https://docs.rs/icu/2.2.0/icu/properties/props/struct.LineBreak.html#method.from_icu4c_value) for more information.
  static LineBreak? fromIntegerValue(int other) {
    final result = _icu4x_LineBreak_from_integer_value_mv1(other);
    if (!result.isOk) {
      return null;
    }
    return LineBreak.values[result.union.ok];
  }

  static LineBreak? tryFromStr(String s) {
    final temp = _FinalizedArena();
    final result = _icu4x_LineBreak_try_from_str_mv1(s._utf8AllocIn(temp.arena));
    if (!result.isOk) {
      return null;
    }
    return LineBreak.values[result.union.ok];
  }

}

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int32 Function(ffi.Uint32)>(isLeaf: true, symbol: 'icu4x_LineBreak_for_char_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_LineBreak_for_char_mv1(Rune ch);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultSliceUtf8Void Function(ffi.Int32)>(isLeaf: true, symbol: 'icu4x_LineBreak_long_name_mv1')
// ignore: non_constant_identifier_names
external _ResultSliceUtf8Void _icu4x_LineBreak_long_name_mv1(int self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultSliceUtf8Void Function(ffi.Int32)>(isLeaf: true, symbol: 'icu4x_LineBreak_short_name_mv1')
// ignore: non_constant_identifier_names
external _ResultSliceUtf8Void _icu4x_LineBreak_short_name_mv1(int self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Int32)>(isLeaf: true, symbol: 'icu4x_LineBreak_to_integer_value_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_LineBreak_to_integer_value_mv1(int self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultInt32Void Function(ffi.Uint8)>(isLeaf: true, symbol: 'icu4x_LineBreak_from_integer_value_mv1')
// ignore: non_constant_identifier_names
external _ResultInt32Void _icu4x_LineBreak_from_integer_value_mv1(int other);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultInt32Void Function(_SliceUtf8)>(isLeaf: true, symbol: 'icu4x_LineBreak_try_from_str_mv1')
// ignore: non_constant_identifier_names
external _ResultInt32Void _icu4x_LineBreak_try_from_str_mv1(_SliceUtf8 s);

// dart format on
