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

part of 'lib.g.dart';

/// An ICU4X Date object capable of containing a date for any calendar.
///
/// See the [Rust documentation for `Date`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html) for more information.
final class Date implements ffi.Finalizable {
  final ffi.Pointer<ffi.Opaque> _ffi;

  // These are "used" in the sense that they keep dependencies alive
  // ignore: unused_field
  final core.List<Object> _selfEdge;

  // This takes in a list of lifetime edges (including for &self borrows)
  // corresponding to data this may borrow from. These should be flat arrays containing
  // references to objects, and this object will hold on to them to keep them alive and
  // maintain borrow validity.
  Date._fromFfi(this._ffi, this._selfEdge) {
    if (_selfEdge.isEmpty) {
      _icu4x_Date_destroy_mv1(this, _ffi.cast());
    }
  }

  // ignore: experimental_member_use
  @meta.RecordUse()
  // ignore: non_constant_identifier_names
  static void _icu4x_Date_destroy_mv1(Date cl, ffi.Pointer<ffi.Void> pointer) => _finalizer.attach(cl, pointer);

  static final _finalizer = ffi.NativeFinalizer(ffi.Native.addressOf(_internal_icu4x_Date_destroy_mv1));

  /// Creates a new [Date] representing the ISO date
  /// given but in a given calendar
  ///
  /// See the [Rust documentation for `new_from_iso`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.new_from_iso) for more information.
  ///
  /// Throws [CalendarError] on failure.
  factory Date.fromIsoInCalendar(int isoYear, int isoMonth, int isoDay, Calendar calendar) {
    final result = _icu4x_Date_from_iso_in_calendar_mv1(isoYear, isoMonth, isoDay, calendar._ffi);
    if (!result.isOk) {
      throw CalendarError.values[result.union.err];
    }
    return Date._fromFfi(result.union.ok, []);
  }

  /// Creates a new [Date] from the given fields, which are interpreted in the given calendar system.
  ///
  /// See the [Rust documentation for `try_from_fields`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.try_from_fields) for more information.
  ///
  /// Throws [CalendarDateFromFieldsError] on failure.
  factory Date.fromFieldsInCalendar(DateFields fields, DateFromFieldsOptions options, Calendar calendar) {
    final temp = _FinalizedArena();
    final result = _icu4x_Date_from_fields_in_calendar_mv1(fields._toFfi(temp.arena), options._toFfi(temp.arena), calendar._ffi);
    if (!result.isOk) {
      throw CalendarDateFromFieldsError.values.firstWhere((v) => v._ffi == result.union.err);
    }
    return Date._fromFfi(result.union.ok, []);
  }

  /// Creates a new [Date] from the given codes, which are interpreted in the given calendar system
  ///
  /// An empty era code will treat the year as an extended year
  ///
  /// See the [Rust documentation for `try_new`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.try_new) for more information.
  ///
  /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.Month.html#method.try_from_str) for more information.
  ///
  /// Throws [CalendarError] on failure.
  factory Date.fromCodesInCalendar(String eraCode, int year, String monthCode, int day, Calendar calendar) {
    final temp = _FinalizedArena();
    final result = _icu4x_Date_from_codes_in_calendar_mv1(eraCode._utf8AllocIn(temp.arena), year, monthCode._utf8AllocIn(temp.arena), day, calendar._ffi);
    if (!result.isOk) {
      throw CalendarError.values[result.union.err];
    }
    return Date._fromFfi(result.union.ok, []);
  }

  /// Creates a new [Date] from the given Rata Die
  ///
  /// See the [Rust documentation for `from_rata_die`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.from_rata_die) for more information.
  ///
  /// Throws [CalendarError] on failure.
  factory Date.fromRataDie(int rd, Calendar calendar) {
    final result = _icu4x_Date_from_rata_die_mv1(rd, calendar._ffi);
    if (!result.isOk) {
      throw CalendarError.values[result.union.err];
    }
    return Date._fromFfi(result.union.ok, []);
  }

  /// Creates a new [Date] from an IXDTF string.
  ///
  /// See the [Rust documentation for `try_from_str`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.try_from_str) for more information.
  ///
  /// Throws [Rfc9557ParseError] on failure.
  factory Date.fromString(String v, Calendar calendar) {
    final temp = _FinalizedArena();
    final result = _icu4x_Date_from_string_mv1(v._utf8AllocIn(temp.arena), calendar._ffi);
    if (!result.isOk) {
      throw Rfc9557ParseError.values[result.union.err];
    }
    return Date._fromFfi(result.union.ok, []);
  }

  /// Convert this date to one in a different calendar
  ///
  /// See the [Rust documentation for `to_calendar`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.to_calendar) for more information.
  Date toCalendar(Calendar calendar) {
    final result = _icu4x_Date_to_calendar_mv1(_ffi, calendar._ffi);
    return Date._fromFfi(result, []);
  }

  /// Converts this date to ISO
  ///
  /// See the [Rust documentation for `to_iso`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.to_iso) for more information.
  IsoDate toIso() {
    final result = _icu4x_Date_to_iso_mv1(_ffi);
    return IsoDate._fromFfi(result, []);
  }

  /// Returns this date's Rata Die
  ///
  /// See the [Rust documentation for `to_rata_die`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.to_rata_die) for more information.
  int get rataDie {
    final result = _icu4x_Date_to_rata_die_mv1(_ffi);
    return result;
  }

  /// Returns the 1-indexed day in the year for this date
  ///
  /// See the [Rust documentation for `day_of_year`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.day_of_year) for more information.
  int get dayOfYear {
    final result = _icu4x_Date_day_of_year_mv1(_ffi);
    return result;
  }

  /// Returns the 1-indexed day in the month for this date
  ///
  /// See the [Rust documentation for `day_of_month`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.day_of_month) for more information.
  int get dayOfMonth {
    final result = _icu4x_Date_day_of_month_mv1(_ffi);
    return result;
  }

  /// Returns the day in the week for this day
  ///
  /// This is *not* the day of the week, an ordinal number that is locale
  /// dependent.
  ///
  /// See the [Rust documentation for `day_of_week`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.day_of_week) for more information.
  @core.Deprecated('use `weekday`')
  Weekday get dayOfWeek {
    final result = _icu4x_Date_day_of_week_mv1(_ffi);
    return Weekday.values.firstWhere((v) => v._ffi == result);
  }

  /// Returns the day in the week for this day
  ///
  /// See the [Rust documentation for `weekday`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.weekday) for more information.
  Weekday get weekday {
    final result = _icu4x_Date_weekday_mv1(_ffi);
    return Weekday.values.firstWhere((v) => v._ffi == result);
  }

  /// Returns 1-indexed number of the month of this date in its year
  ///
  /// Note that for lunar calendars this may not lead to the same month
  /// having the same ordinal month across years; use `month_code` if you care
  /// about month identity.
  ///
  /// See the [Rust documentation for `month`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.month) for more information.
  ///
  /// See the [Rust documentation for `ordinal`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.MonthInfo.html#structfield.ordinal) for more information.
  int get ordinalMonth {
    final result = _icu4x_Date_ordinal_month_mv1(_ffi);
    return result;
  }

  /// Returns the month code for this date. Typically something
  /// like "M01", "M02", but can be more complicated for lunar calendars.
  ///
  /// See the [Rust documentation for `code`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.Month.html#method.code) for more information.
  ///
  /// See the [Rust documentation for `standard_code`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.MonthInfo.html#structfield.standard_code) for more information.
  ///
  /// Additional information: [1](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.month)
  String get monthCode {
    final write = _Write();
    _icu4x_Date_month_code_mv1(_ffi, write._ffi);
    return write.finalize();
  }

  /// Returns the month number of this month.
  ///
  /// See the [Rust documentation for `number`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.Month.html#method.number) for more information.
  int get monthNumber {
    final result = _icu4x_Date_month_number_mv1(_ffi);
    return result;
  }

  /// Returns whether the month is a leap month.
  ///
  /// See the [Rust documentation for `is_leap`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.Month.html#method.is_leap) for more information.
  bool get monthIsLeap {
    final result = _icu4x_Date_month_is_leap_mv1(_ffi);
    return result;
  }

  /// Returns the year number in the current era for this date
  ///
  /// For calendars without an era, returns the related ISO year.
  ///
  /// See the [Rust documentation for `era_year_or_related_iso`](https://docs.rs/icu/2.2.0/icu/calendar/types/enum.YearInfo.html#method.era_year_or_related_iso) for more information.
  ///
  /// Additional information: [1](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.EraYear.html#structfield.year), [2](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.CyclicYear.html#structfield.related_iso), [3](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.year)
  int get eraYearOrRelatedIso {
    final result = _icu4x_Date_era_year_or_related_iso_mv1(_ffi);
    return result;
  }

  /// Returns the extended year, which can be used for
  ///
  /// This year number can be used when you need a simple numeric representation
  /// of the year, and can be meaningfully compared with extended years from other
  /// eras or used in arithmetic.
  ///
  /// See the [Rust documentation for `extended_year`](https://docs.rs/icu/2.2.0/icu/calendar/types/enum.YearInfo.html#method.extended_year) for more information.
  int get extendedYear {
    final result = _icu4x_Date_extended_year_mv1(_ffi);
    return result;
  }

  /// Returns the era for this date, or an empty string
  ///
  /// See the [Rust documentation for `era`](https://docs.rs/icu/2.2.0/icu/calendar/types/struct.EraYear.html#structfield.era) for more information.
  ///
  /// Additional information: [1](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.year)
  String get era {
    final write = _Write();
    _icu4x_Date_era_mv1(_ffi, write._ffi);
    return write.finalize();
  }

  /// Returns the number of months in the year represented by this date
  ///
  /// See the [Rust documentation for `months_in_year`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.months_in_year) for more information.
  int get monthsInYear {
    final result = _icu4x_Date_months_in_year_mv1(_ffi);
    return result;
  }

  /// Returns the number of days in the month represented by this date
  ///
  /// See the [Rust documentation for `days_in_month`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.days_in_month) for more information.
  int get daysInMonth {
    final result = _icu4x_Date_days_in_month_mv1(_ffi);
    return result;
  }

  /// Returns the number of days in the year represented by this date
  ///
  /// See the [Rust documentation for `days_in_year`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.days_in_year) for more information.
  int get daysInYear {
    final result = _icu4x_Date_days_in_year_mv1(_ffi);
    return result;
  }

  /// Returns if the year is a leap year for this date
  ///
  /// See the [Rust documentation for `is_in_leap_year`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.is_in_leap_year) for more information.
  bool get isInLeapYear {
    final result = _icu4x_Date_is_in_leap_year_mv1(_ffi);
    return result;
  }

  /// Returns the [Calendar] object backing this date
  ///
  /// See the [Rust documentation for `calendar`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.calendar) for more information.
  Calendar get calendar {
    final result = _icu4x_Date_calendar_mv1(_ffi);
    return Calendar._fromFfi(result, []);
  }

  /// Returns a new [Date] with the given duration added to it.
  ///
  /// See the [Rust documentation for `try_added_with_options`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.try_added_with_options) for more information.
  ///
  /// Throws [CalendarDateAddError] on failure.
  Date tryAddWithOptions(DateDuration duration, DateAddOptions options) {
    final temp = _FinalizedArena();
    final result = _icu4x_Date_try_add_with_options_mv1(_ffi, duration._toFfi(temp.arena), options._toFfi(temp.arena));
    if (!result.isOk) {
      throw CalendarDateAddError.values[result.union.err];
    }
    return Date._fromFfi(result.union.ok, []);
  }

  /// Calculating the duration between `other - self`
  ///
  /// See the [Rust documentation for `try_until_with_options`](https://docs.rs/icu/2.2.0/icu/calendar/struct.Date.html#method.try_until_with_options) for more information.
  ///
  /// Throws [CalendarMismatchedCalendarError] on failure.
  DateDuration tryUntilWithOptions(Date other, DateDifferenceOptions options) {
    final temp = _FinalizedArena();
    final result = _icu4x_Date_try_until_with_options_mv1(_ffi, other._ffi, options._toFfi(temp.arena));
    if (!result.isOk) {
      throw CalendarMismatchedCalendarError();
    }
    return DateDuration._fromFfi(result.union.ok);
  }

}

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Void>)>(isLeaf: true, symbol: 'icu4x_Date_destroy_mv1')
// ignore: non_constant_identifier_names
external void _internal_icu4x_Date_destroy_mv1(ffi.Pointer<ffi.Void> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultOpaqueInt32 Function(ffi.Int32, ffi.Uint8, ffi.Uint8, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_from_iso_in_calendar_mv1')
// ignore: non_constant_identifier_names
external _ResultOpaqueInt32 _icu4x_Date_from_iso_in_calendar_mv1(int isoYear, int isoMonth, int isoDay, ffi.Pointer<ffi.Opaque> calendar);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultOpaqueInt32 Function(_DateFieldsFfi, _DateFromFieldsOptionsFfi, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_from_fields_in_calendar_mv1')
// ignore: non_constant_identifier_names
external _ResultOpaqueInt32 _icu4x_Date_from_fields_in_calendar_mv1(_DateFieldsFfi fields, _DateFromFieldsOptionsFfi options, ffi.Pointer<ffi.Opaque> calendar);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultOpaqueInt32 Function(_SliceUtf8, ffi.Int32, _SliceUtf8, ffi.Uint8, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_from_codes_in_calendar_mv1')
// ignore: non_constant_identifier_names
external _ResultOpaqueInt32 _icu4x_Date_from_codes_in_calendar_mv1(_SliceUtf8 eraCode, int year, _SliceUtf8 monthCode, int day, ffi.Pointer<ffi.Opaque> calendar);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultOpaqueInt32 Function(ffi.Int64, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_from_rata_die_mv1')
// ignore: non_constant_identifier_names
external _ResultOpaqueInt32 _icu4x_Date_from_rata_die_mv1(int rd, ffi.Pointer<ffi.Opaque> calendar);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultOpaqueInt32 Function(_SliceUtf8, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_from_string_mv1')
// ignore: non_constant_identifier_names
external _ResultOpaqueInt32 _icu4x_Date_from_string_mv1(_SliceUtf8 v, ffi.Pointer<ffi.Opaque> calendar);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Pointer<ffi.Opaque> Function(ffi.Pointer<ffi.Opaque>, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_to_calendar_mv1')
// ignore: non_constant_identifier_names
external ffi.Pointer<ffi.Opaque> _icu4x_Date_to_calendar_mv1(ffi.Pointer<ffi.Opaque> self, ffi.Pointer<ffi.Opaque> calendar);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Pointer<ffi.Opaque> Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_to_iso_mv1')
// ignore: non_constant_identifier_names
external ffi.Pointer<ffi.Opaque> _icu4x_Date_to_iso_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int64 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_to_rata_die_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_to_rata_die_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint16 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_day_of_year_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_day_of_year_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_day_of_month_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_day_of_month_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int32 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_day_of_week_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_day_of_week_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int32 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_weekday_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_weekday_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_ordinal_month_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_ordinal_month_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Opaque>, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_month_code_mv1')
// ignore: non_constant_identifier_names
external void _icu4x_Date_month_code_mv1(ffi.Pointer<ffi.Opaque> self, ffi.Pointer<ffi.Opaque> write);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_month_number_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_month_number_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Bool Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_month_is_leap_mv1')
// ignore: non_constant_identifier_names
external bool _icu4x_Date_month_is_leap_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int32 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_era_year_or_related_iso_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_era_year_or_related_iso_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Int32 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_extended_year_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_extended_year_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Opaque>, ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_era_mv1')
// ignore: non_constant_identifier_names
external void _icu4x_Date_era_mv1(ffi.Pointer<ffi.Opaque> self, ffi.Pointer<ffi.Opaque> write);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_months_in_year_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_months_in_year_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint8 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_days_in_month_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_days_in_month_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Uint16 Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_days_in_year_mv1')
// ignore: non_constant_identifier_names
external int _icu4x_Date_days_in_year_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Bool Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_is_in_leap_year_mv1')
// ignore: non_constant_identifier_names
external bool _icu4x_Date_is_in_leap_year_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<ffi.Pointer<ffi.Opaque> Function(ffi.Pointer<ffi.Opaque>)>(isLeaf: true, symbol: 'icu4x_Date_calendar_mv1')
// ignore: non_constant_identifier_names
external ffi.Pointer<ffi.Opaque> _icu4x_Date_calendar_mv1(ffi.Pointer<ffi.Opaque> self);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultOpaqueInt32 Function(ffi.Pointer<ffi.Opaque>, _DateDurationFfi, _DateAddOptionsFfi)>(isLeaf: true, symbol: 'icu4x_Date_try_add_with_options_mv1')
// ignore: non_constant_identifier_names
external _ResultOpaqueInt32 _icu4x_Date_try_add_with_options_mv1(ffi.Pointer<ffi.Opaque> self, _DateDurationFfi duration, _DateAddOptionsFfi options);

// ignore: experimental_member_use
@meta.RecordUse()
@ffi.Native<_ResultDateDurationFfiCalendarMismatchedCalendarErrorFfi Function(ffi.Pointer<ffi.Opaque>, ffi.Pointer<ffi.Opaque>, _DateDifferenceOptionsFfi)>(isLeaf: true, symbol: 'icu4x_Date_try_until_with_options_mv1')
// ignore: non_constant_identifier_names
external _ResultDateDurationFfiCalendarMismatchedCalendarErrorFfi _icu4x_Date_try_until_with_options_mv1(ffi.Pointer<ffi.Opaque> self, ffi.Pointer<ffi.Opaque> other, _DateDifferenceOptionsFfi options);

// dart format on
