registerFactsModels function

dynamic registerFactsModels(
  1. MModelRegistry modelRegistry,
  2. MEnumRegistry enumRegistry
)

Implementation

registerFactsModels(MModelRegistry modelRegistry, MEnumRegistry enumRegistry) {
  modelRegistry.register(
      AssistedTaskRef, (json) => AssistedTask(json as Map<String, dynamic>));
  IAssistedTask.of = AssistedTask.of;
  IAssistedTask.fromJson = AssistedTask.fromJson;

  modelRegistry.register(AssistedTaskListRef,
      (json) => AssistedTaskList(json as Map<String, dynamic>));
  IAssistedTaskList.of = AssistedTaskList.of;
  IAssistedTaskList.fromJson = AssistedTaskList.fromJson;

  modelRegistry.register(
      AssistedTasksRef, (json) => AssistedTasks(json as Map<String, dynamic>));
  IAssistedTasks.of = AssistedTasks.of;
  IAssistedTasks.fromJson = AssistedTasks.fromJson;

  modelRegistry.register(
      BirthdayRef, (json) => Birthday(json as Map<String, dynamic>));
  IBirthday.of = Birthday.of;
  IBirthday.fromJson = Birthday.fromJson;

  modelRegistry.register(
      BirthdayListRef, (json) => BirthdayList(json as Map<String, dynamic>));
  IBirthdayList.of = BirthdayList.of;
  IBirthdayList.fromJson = BirthdayList.fromJson;

  modelRegistry.register(
      BookClubRef, (json) => BookClub(json as Map<String, dynamic>));
  IBookClub.of = BookClub.of;
  IBookClub.fromJson = BookClub.fromJson;

  modelRegistry.register(
      BookClubListRef, (json) => BookClubList(json as Map<String, dynamic>));
  IBookClubList.of = BookClubList.of;
  IBookClubList.fromJson = BookClubList.fromJson;

  modelRegistry.register(BookClubMemberRef,
      (json) => BookClubMember(json as Map<String, dynamic>));
  IBookClubMember.of = BookClubMember.of;
  IBookClubMember.fromJson = BookClubMember.fromJson;

  modelRegistry.register(BookClubMemberListRef,
      (json) => BookClubMemberList(json as Map<String, dynamic>));
  IBookClubMemberList.of = BookClubMemberList.of;
  IBookClubMemberList.fromJson = BookClubMemberList.fromJson;

  modelRegistry.register(
      ChurchRef, (json) => Church(json as Map<String, dynamic>));
  IChurch.of = Church.of;
  IChurch.fromJson = Church.fromJson;

  modelRegistry.register(
      ChurchListRef, (json) => ChurchList(json as Map<String, dynamic>));
  IChurchList.of = ChurchList.of;
  IChurchList.fromJson = ChurchList.fromJson;

  modelRegistry.register(
      CollegeRef, (json) => College(json as Map<String, dynamic>));
  ICollege.of = College.of;
  ICollege.fromJson = College.fromJson;

  modelRegistry.register(
      CollegeListRef, (json) => CollegeList(json as Map<String, dynamic>));
  ICollegeList.of = CollegeList.of;
  ICollegeList.fromJson = CollegeList.fromJson;

  modelRegistry.register(CollegeStudentRef,
      (json) => CollegeStudent(json as Map<String, dynamic>));
  ICollegeStudent.of = CollegeStudent.of;
  ICollegeStudent.fromJson = CollegeStudent.fromJson;

  modelRegistry.register(CollegeStudentListRef,
      (json) => CollegeStudentList(json as Map<String, dynamic>));
  ICollegeStudentList.of = CollegeStudentList.of;
  ICollegeStudentList.fromJson = CollegeStudentList.fromJson;

  modelRegistry.register(
      CongregantRef, (json) => Congregant(json as Map<String, dynamic>));
  ICongregant.of = Congregant.of;
  ICongregant.fromJson = Congregant.fromJson;

  modelRegistry.register(CongregantListRef,
      (json) => CongregantList(json as Map<String, dynamic>));
  ICongregantList.of = CongregantList.of;
  ICongregantList.fromJson = CongregantList.fromJson;

  modelRegistry.register(ContactExtendedPropsRef,
      (json) => ContactExtendedProps(json as Map<String, dynamic>));
  IContactExtendedProps.of = ContactExtendedProps.of;
  IContactExtendedProps.fromJson = ContactExtendedProps.fromJson;

  modelRegistry.register(ContactExtendedPropsListRef,
      (json) => ContactExtendedPropsList(json as Map<String, dynamic>));
  IContactExtendedPropsList.of = ContactExtendedPropsList.of;
  IContactExtendedPropsList.fromJson = ContactExtendedPropsList.fromJson;

  modelRegistry.register(ContactInterestsRef,
      (json) => ContactInterests(json as Map<String, dynamic>));
  IContactInterests.of = ContactInterests.of;
  IContactInterests.fromJson = ContactInterests.fromJson;

  modelRegistry.register(ContactInterestsListRef,
      (json) => ContactInterestsList(json as Map<String, dynamic>));
  IContactInterestsList.of = ContactInterestsList.of;
  IContactInterestsList.fromJson = ContactInterestsList.fromJson;

  modelRegistry.register(
      DimensionsRef, (json) => Dimensions(json as Map<String, dynamic>));
  IDimensions.of = Dimensions.of;
  IDimensions.fromJson = Dimensions.fromJson;

  modelRegistry.register(
      EmployeeRef, (json) => Employee(json as Map<String, dynamic>));
  IEmployee.of = Employee.of;
  IEmployee.fromJson = Employee.fromJson;

  modelRegistry.register(
      EmployeeListRef, (json) => EmployeeList(json as Map<String, dynamic>));
  IEmployeeList.of = EmployeeList.of;
  IEmployeeList.fromJson = EmployeeList.fromJson;

  modelRegistry.register(
      EmployerRef, (json) => Employer(json as Map<String, dynamic>));
  IEmployer.of = Employer.of;
  IEmployer.fromJson = Employer.fromJson;

  modelRegistry.register(
      EmployerListRef, (json) => EmployerList(json as Map<String, dynamic>));
  IEmployerList.of = EmployerList.of;
  IEmployerList.fromJson = EmployerList.fromJson;

  modelRegistry.register(EventBasedDueConfigRef,
      (json) => EventBasedDueConfig(json as Map<String, dynamic>));
  IEventBasedDueConfig.of = EventBasedDueConfig.of;
  IEventBasedDueConfig.fromJson = EventBasedDueConfig.fromJson;

  EventType.init();
  enumRegistry.register("sunny.fact.definitions.eventType",
      values: IEventType.values,
      factory: (value) => EventType.fromJson(value)!);
  modelRegistry.register(ExpressionDueConfigRef,
      (json) => ExpressionDueConfig(json as Map<String, dynamic>));
  IExpressionDueConfig.of = ExpressionDueConfig.of;
  IExpressionDueConfig.fromJson = ExpressionDueConfig.fromJson;

  modelRegistry.register(
      FactRef,
      (json) =>
          throw Exception("Unable to instantiate abstract entity $FactRef"));

  modelRegistry.register(
      FactListRef, (json) => FactList(json as Map<String, dynamic>));
  IFactList.of = FactList.of;
  IFactList.fromJson = FactList.fromJson;

  modelRegistry.register(
      FactsRef, (json) => Facts(json as Map<String, dynamic>));
  IFacts.of = Facts.of;
  IFacts.fromJson = Facts.fromJson;

  modelRegistry.register(
      FamilyRef, (json) => Family(json as Map<String, dynamic>));
  IFamily.of = Family.of;
  IFamily.fromJson = Family.fromJson;

  modelRegistry.register(FamilyAssociationRef,
      (json) => FamilyAssociation(json as Map<String, dynamic>));
  IFamilyAssociation.of = FamilyAssociation.of;
  IFamilyAssociation.fromJson = FamilyAssociation.fromJson;

  modelRegistry.register(FamilyAssociationListRef,
      (json) => FamilyAssociationList(json as Map<String, dynamic>));
  IFamilyAssociationList.of = FamilyAssociationList.of;
  IFamilyAssociationList.fromJson = FamilyAssociationList.fromJson;

  modelRegistry.register(
      FamilyListRef, (json) => FamilyList(json as Map<String, dynamic>));
  IFamilyList.of = FamilyList.of;
  IFamilyList.fromJson = FamilyList.fromJson;

  Gender.init();
  enumRegistry.register("mverse.core.definitions.gender",
      values: IGender.values, factory: (value) => Gender.fromJson(value)!);
  modelRegistry.register(GiftRef, (json) => Gift(json as Map<String, dynamic>));
  IGift.of = Gift.of;
  IGift.fromJson = Gift.fromJson;

  modelRegistry.register(
      GiftListRef, (json) => GiftList(json as Map<String, dynamic>));
  IGiftList.of = GiftList.of;
  IGiftList.fromJson = GiftList.fromJson;

  modelRegistry.register(
      HometownRef, (json) => Hometown(json as Map<String, dynamic>));
  IHometown.of = Hometown.of;
  IHometown.fromJson = Hometown.fromJson;

  modelRegistry.register(
      HometownListRef, (json) => HometownList(json as Map<String, dynamic>));
  IHometownList.of = HometownList.of;
  IHometownList.fromJson = HometownList.fromJson;

  modelRegistry.register(
      MembershipRef,
      (json) => throw Exception(
          "Unable to instantiate abstract entity $MembershipRef"));

  modelRegistry.register(MembershipListRef,
      (json) => MembershipList(json as Map<String, dynamic>));
  IMembershipList.of = MembershipList.of;
  IMembershipList.fromJson = MembershipList.fromJson;

  modelRegistry.register(
      MemoryRef, (json) => Memory(json as Map<String, dynamic>));
  IMemory.of = Memory.of;
  IMemory.fromJson = Memory.fromJson;

  modelRegistry.register(
      MemoryListRef, (json) => MemoryList(json as Map<String, dynamic>));
  IMemoryList.of = MemoryList.of;
  IMemoryList.fromJson = MemoryList.fromJson;

  modelRegistry.register(MetaDateDueConfigRef,
      (json) => MetaDateDueConfig(json as Map<String, dynamic>));
  IMetaDateDueConfig.of = MetaDateDueConfig.of;
  IMetaDateDueConfig.fromJson = MetaDateDueConfig.fromJson;

  modelRegistry.register(
      MilestoneRef, (json) => Milestone(json as Map<String, dynamic>));
  IMilestone.of = Milestone.of;
  IMilestone.fromJson = Milestone.fromJson;

  modelRegistry.register(
      MilestoneListRef, (json) => MilestoneList(json as Map<String, dynamic>));
  IMilestoneList.of = MilestoneList.of;
  IMilestoneList.fromJson = MilestoneList.fromJson;

  modelRegistry.register(NoteRef, (json) => Note(json as Map<String, dynamic>));
  INote.of = Note.of;
  INote.fromJson = Note.fromJson;

  modelRegistry.register(
      NoteListRef, (json) => NoteList(json as Map<String, dynamic>));
  INoteList.of = NoteList.of;
  INoteList.fromJson = NoteList.fromJson;

  modelRegistry.register(
      OrganizationRef,
      (json) => throw Exception(
          "Unable to instantiate abstract entity $OrganizationRef"));

  modelRegistry.register(OrganizationListRef,
      (json) => OrganizationList(json as Map<String, dynamic>));
  IOrganizationList.of = OrganizationList.of;
  IOrganizationList.fromJson = OrganizationList.fromJson;

  Orientation.init();
  enumRegistry.register("sunny.content.definitions.orientation",
      values: IOrientation.values,
      factory: (value) => Orientation.fromJson(value)!);
  modelRegistry.register(
      OwesMoneyRef, (json) => OwesMoney(json as Map<String, dynamic>));
  IOwesMoney.of = OwesMoney.of;
  IOwesMoney.fromJson = OwesMoney.fromJson;

  modelRegistry.register(
      OwesMoneyListRef, (json) => OwesMoneyList(json as Map<String, dynamic>));
  IOwesMoneyList.of = OwesMoneyList.of;
  IOwesMoneyList.fromJson = OwesMoneyList.fromJson;

  modelRegistry.register(
      PaymentRef, (json) => Payment(json as Map<String, dynamic>));
  IPayment.of = Payment.of;
  IPayment.fromJson = Payment.fromJson;

  modelRegistry.register(
      PaymentListRef, (json) => PaymentList(json as Map<String, dynamic>));
  IPaymentList.of = PaymentList.of;
  IPaymentList.fromJson = PaymentList.fromJson;

  modelRegistry.register(PetRef, (json) => Pet(json as Map<String, dynamic>));
  IPet.of = Pet.of;
  IPet.fromJson = Pet.fromJson;

  modelRegistry.register(
      PetListRef, (json) => PetList(json as Map<String, dynamic>));
  IPetList.of = PetList.of;
  IPetList.fromJson = PetList.fromJson;

  modelRegistry.register(
      PhaseRef, (json) => Phase(json as Map<String, dynamic>));
  IPhase.of = Phase.of;
  IPhase.fromJson = Phase.fromJson;

  modelRegistry.register(
      PhaseListRef, (json) => PhaseList(json as Map<String, dynamic>));
  IPhaseList.of = PhaseList.of;
  IPhaseList.fromJson = PhaseList.fromJson;

  modelRegistry.register(PhoneWithExtensionRef,
      (json) => PhoneWithExtension(json as Map<String, dynamic>));
  IPhoneWithExtension.of = PhoneWithExtension.of;
  IPhoneWithExtension.fromJson = PhoneWithExtension.fromJson;

  modelRegistry.register(
      PlayerRef, (json) => Player(json as Map<String, dynamic>));
  IPlayer.of = Player.of;
  IPlayer.fromJson = Player.fromJson;

  modelRegistry.register(
      PlayerListRef, (json) => PlayerList(json as Map<String, dynamic>));
  IPlayerList.of = PlayerList.of;
  IPlayerList.fromJson = PlayerList.fromJson;

  modelRegistry.register(
      PossessionRef, (json) => Possession(json as Map<String, dynamic>));
  IPossession.of = Possession.of;
  IPossession.fromJson = Possession.fromJson;

  modelRegistry.register(PossessionListRef,
      (json) => PossessionList(json as Map<String, dynamic>));
  IPossessionList.of = PossessionList.of;
  IPossessionList.fromJson = PossessionList.fromJson;

  modelRegistry.register(
      PrepSchoolRef, (json) => PrepSchool(json as Map<String, dynamic>));
  IPrepSchool.of = PrepSchool.of;
  IPrepSchool.fromJson = PrepSchool.fromJson;

  modelRegistry.register(PrepSchoolListRef,
      (json) => PrepSchoolList(json as Map<String, dynamic>));
  IPrepSchoolList.of = PrepSchoolList.of;
  IPrepSchoolList.fromJson = PrepSchoolList.fromJson;

  modelRegistry.register(PrepSchoolStudentRef,
      (json) => PrepSchoolStudent(json as Map<String, dynamic>));
  IPrepSchoolStudent.of = PrepSchoolStudent.of;
  IPrepSchoolStudent.fromJson = PrepSchoolStudent.fromJson;

  modelRegistry.register(PrepSchoolStudentListRef,
      (json) => PrepSchoolStudentList(json as Map<String, dynamic>));
  IPrepSchoolStudentList.of = PrepSchoolStudentList.of;
  IPrepSchoolStudentList.fromJson = PrepSchoolStudentList.fromJson;

  modelRegistry.register(
      ReactionRef, (json) => Reaction(json as Map<String, dynamic>));
  IReaction.of = Reaction.of;
  IReaction.fromJson = Reaction.fromJson;

  modelRegistry.register(
      ReactionListRef, (json) => ReactionList(json as Map<String, dynamic>));
  IReactionList.of = ReactionList.of;
  IReactionList.fromJson = ReactionList.fromJson;

  modelRegistry.register(
      RecurrenceRef, (json) => Recurrence(json as Map<String, dynamic>));
  IRecurrence.of = Recurrence.of;
  IRecurrence.fromJson = Recurrence.fromJson;

  RecurringTimeSpan.init();
  enumRegistry.register("sunny.fact.definitions.recurringTimeSpan",
      values: IRecurringTimeSpan.values,
      factory: (value) => RecurringTimeSpan.fromJson(value)!);
  modelRegistry.register(
      RememberRef, (json) => Remember(json as Map<String, dynamic>));
  IRemember.of = Remember.of;
  IRemember.fromJson = Remember.fromJson;

  modelRegistry.register(
      RememberListRef, (json) => RememberList(json as Map<String, dynamic>));
  IRememberList.of = RememberList.of;
  IRememberList.fromJson = RememberList.fromJson;

  modelRegistry.register(SmartDateDueConfigRef,
      (json) => SmartDateDueConfig(json as Map<String, dynamic>));
  ISmartDateDueConfig.of = SmartDateDueConfig.of;
  ISmartDateDueConfig.fromJson = SmartDateDueConfig.fromJson;

  modelRegistry.register(
      TaskDueConfigRef, (json) => TaskDueConfig(json as Map<String, dynamic>));
  ITaskDueConfig.of = TaskDueConfig.of;
  ITaskDueConfig.fromJson = TaskDueConfig.fromJson;

  modelRegistry.register(
      TaskFactRef,
      (json) => throw Exception(
          "Unable to instantiate abstract entity $TaskFactRef"));

  modelRegistry.register(TaskFactForMModelRef,
      (json) => TaskFactForMModel(json as Map<String, dynamic>));
  ITaskFactForMModel.of = TaskFactForMModel.of;
  ITaskFactForMModel.fromJson = TaskFactForMModel.fromJson;

  modelRegistry.register(
      TaskFactListRef, (json) => TaskFactList(json as Map<String, dynamic>));
  ITaskFactList.of = TaskFactList.of;
  ITaskFactList.fromJson = TaskFactList.fromJson;

  modelRegistry.register(TeamRef, (json) => Team(json as Map<String, dynamic>));
  ITeam.of = Team.of;
  ITeam.fromJson = Team.fromJson;

  modelRegistry.register(
      TeamListRef, (json) => TeamList(json as Map<String, dynamic>));
  ITeamList.of = TeamList.of;
  ITeamList.fromJson = TeamList.fromJson;

  TimeSensitivity.init();
  enumRegistry.register("sunny.factSchema.definitions.timeSensitivity",
      values: ITimeSensitivity.values,
      factory: (value) => TimeSensitivity.fromJson(value)!);
  modelRegistry.register(
      TraditionRef, (json) => Tradition(json as Map<String, dynamic>));
  ITradition.of = Tradition.of;
  ITradition.fromJson = Tradition.fromJson;

  modelRegistry.register(
      TraditionListRef, (json) => TraditionList(json as Map<String, dynamic>));
  ITraditionList.of = TraditionList.of;
  ITraditionList.fromJson = TraditionList.fromJson;

  modelRegistry.register(
      TraitRef, (json) => Trait(json as Map<String, dynamic>));
  ITrait.of = Trait.of;
  ITrait.fromJson = Trait.fromJson;

  modelRegistry.register(
      TraitListRef, (json) => TraitList(json as Map<String, dynamic>));
  ITraitList.of = TraitList.of;
  ITraitList.fromJson = TraitList.fromJson;
}