// Code generated by legendsbrowser; DO NOT EDIT. package model import ( "encoding/json" "encoding/xml" "fmt" "strconv" ) func InitSameFields() { sameFields = map[string]map[string]map[string]bool{ "Artifact": { "ItemDescription": {}, "ItemSubtype": {}, "ItemType": {}, "Mat": {}, "PageCount": { "AbsTileX": true, "AbsTileY": true, "AbsTileZ": true, "HolderHfid": true, "SiteId": true, "StructureLocalId": true, "SubregionId": true, }, "Writing": { "AbsTileX": true, "AbsTileY": true, "AbsTileZ": true, "HolderHfid": true, "SiteId": true, "StructureLocalId": true, "SubregionId": true, }, }, "Creature": {}, "DanceForm": {}, "DfWorld": {}, "Entity": {}, "EntityEntityLink": {}, "EntityFormerPositionLink": {}, "EntityFormerSquadLink": {}, "EntityPopulation": {}, "EntityPosition": {}, "EntityPositionAssignment": {}, "EntityPositionLink": {}, "EntityReputation": {}, "EntitySquadLink": {}, "Feature": {}, "HfLink": {}, "HfSkill": {}, "HistoricalEra": {}, "HistoricalEvent": {}, "HistoricalEventAddHfEntityHonor": {}, "HistoricalEventAddHfEntityLink": { "Civ": { "CivId": true, "Hfid": true, "PositionId": true, }, "Histfig": { "CivId": true, "Hfid": true, "PositionId": true, }, "LinkType": { "Link": true, }, "Position": {}, }, "HistoricalEventAddHfHfLink": { "Hf": { "Hfid": true, "HfidTarget": true, }, "HfTarget": { "Hfid": true, "HfidTarget": true, }, "LinkType": {}, }, "HistoricalEventAddHfSiteLink": { "Civ": { "SiteId": true, }, "Histfig": { "SiteId": true, }, "LinkType": {}, "Site": { "SiteId": true, }, "Structure": { "SiteId": true, }, }, "HistoricalEventAgreementFormed": {}, "HistoricalEventAgreementMade": {}, "HistoricalEventAgreementRejected": {}, "HistoricalEventArtifactClaimFormed": {}, "HistoricalEventArtifactCopied": {}, "HistoricalEventArtifactCreated": { "CreatorHfid": { "HistFigureId": true, "SiteId": true, "UnitId": true, }, "CreatorUnitId": { "HistFigureId": true, "SiteId": true, "UnitId": true, }, "Reason": {}, "SanctifyHf": { "HistFigureId": true, "SiteId": true, "UnitId": true, }, "Site": { "HistFigureId": true, "SiteId": true, "UnitId": true, }, }, "HistoricalEventArtifactCreatedCircumstance": {}, "HistoricalEventArtifactDestroyed": {}, "HistoricalEventArtifactFound": {}, "HistoricalEventArtifactGiven": {}, "HistoricalEventArtifactLost": {}, "HistoricalEventArtifactPossessed": {}, "HistoricalEventArtifactRecovered": {}, "HistoricalEventArtifactStored": {}, "HistoricalEventArtifactTransformed": {}, "HistoricalEventAssumeIdentity": { "IdentityCaste": {}, "IdentityHistfigId": { "IdentityId": true, "TargetEnid": true, "TricksterHfid": true, }, "IdentityName": {}, "IdentityNemesisId": { "IdentityId": true, "TargetEnid": true, "TricksterHfid": true, }, "IdentityRace": {}, "Target": { "IdentityId": true, "TargetEnid": true, "TricksterHfid": true, }, "Trickster": { "IdentityId": true, "TargetEnid": true, "TricksterHfid": true, }, }, "HistoricalEventAttackedSite": {}, "HistoricalEventBodyAbused": { "AbuseType": {}, "Civ": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Histfig": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Interaction": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "ItemMat": { "Coords": true, }, "ItemSubtype": {}, "ItemType": {}, "PileType": {}, "Site": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Structure": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Tree": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "VictimEntity": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, }, "HistoricalEventBuildingProfileAcquired": {}, "HistoricalEventCeremony": {}, "HistoricalEventChangeHfBodyState": {}, "HistoricalEventChangeHfJob": { "NewJob": {}, "OldJob": {}, "Site": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, }, "HistoricalEventChangeHfState": { "Site": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, }, "HistoricalEventChangedCreatureType": { "Changee": { "ChangeeHfid": true, "ChangerHfid": true, }, "Changer": { "ChangeeHfid": true, "ChangerHfid": true, }, }, "HistoricalEventCollection": {}, "HistoricalEventCollectionAbduction": {}, "HistoricalEventCollectionBattle": {}, "HistoricalEventCollectionBeastAttack": {}, "HistoricalEventCollectionCeremony": {}, "HistoricalEventCollectionCompetition": {}, "HistoricalEventCollectionDuel": {}, "HistoricalEventCollectionEntityOverthrown": {}, "HistoricalEventCollectionInsurrection": {}, "HistoricalEventCollectionJourney": {}, "HistoricalEventCollectionOccasion": {}, "HistoricalEventCollectionPerformance": {}, "HistoricalEventCollectionPersecution": {}, "HistoricalEventCollectionProcession": {}, "HistoricalEventCollectionPurge": {}, "HistoricalEventCollectionRaid": {}, "HistoricalEventCollectionSiteConquered": {}, "HistoricalEventCollectionTheft": {}, "HistoricalEventCollectionWar": {}, "HistoricalEventCompetition": {}, "HistoricalEventCreateEntityPosition": {}, "HistoricalEventCreatedSite": {}, "HistoricalEventCreatedStructure": { "BuilderHf": { "BuilderHfid": true, "CivId": true, "SiteCivId": true, "SiteId": true, "StructureId": true, }, "Civ": { "BuilderHfid": true, "CivId": true, "SiteCivId": true, "SiteId": true, "StructureId": true, }, "Rebuild": {}, "Site": { "BuilderHfid": true, "CivId": true, "SiteCivId": true, "SiteId": true, "StructureId": true, }, "SiteCiv": { "BuilderHfid": true, "CivId": true, "SiteCivId": true, "SiteId": true, "StructureId": true, }, "Structure": { "BuilderHfid": true, "CivId": true, "SiteCivId": true, "SiteId": true, "StructureId": true, }, }, "HistoricalEventCreatedWorldConstruction": {}, "HistoricalEventCreatureDevoured": { "Caste": {}, "Eater": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Entity": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Race": {}, "Site": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, "Victim": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, }, }, "HistoricalEventDanceFormCreated": {}, "HistoricalEventDestroyedSite": {}, "HistoricalEventDiplomatLost": { "Entity": { "SiteId": true, }, "Involved": { "SiteId": true, }, "Site": { "SiteId": true, }, }, "HistoricalEventEntityAllianceFormed": {}, "HistoricalEventEntityBreachFeatureLayer": {}, "HistoricalEventEntityCreated": {}, "HistoricalEventEntityDissolved": {}, "HistoricalEventEntityEquipmentPurchase": {}, "HistoricalEventEntityExpelsHf": {}, "HistoricalEventEntityFledSite": {}, "HistoricalEventEntityIncorporated": {}, "HistoricalEventEntityLaw": {}, "HistoricalEventEntityOverthrown": {}, "HistoricalEventEntityPersecuted": {}, "HistoricalEventEntityPrimaryCriminals": { "Action": {}, "Entity": { "EntityId": true, "SiteId": true, "StructureId": true, }, "Site": { "EntityId": true, "SiteId": true, "StructureId": true, }, "Structure": { "EntityId": true, "SiteId": true, "StructureId": true, }, }, "HistoricalEventEntityRampagedInSite": {}, "HistoricalEventEntityRelocate": { "Action": {}, "Entity": { "EntityId": true, "SiteId": true, "StructureId": true, }, "Site": { "EntityId": true, "SiteId": true, "StructureId": true, }, "Structure": { "EntityId": true, "SiteId": true, "StructureId": true, }, }, "HistoricalEventEntitySearchedSite": {}, "HistoricalEventFailedFrameAttempt": {}, "HistoricalEventFailedIntrigueCorruption": {}, "HistoricalEventFieldBattle": {}, "HistoricalEventFirstContact": {}, "HistoricalEventGamble": {}, "HistoricalEventHfAbducted": {}, "HistoricalEventHfAttackedSite": {}, "HistoricalEventHfConfronted": {}, "HistoricalEventHfConvicted": {}, "HistoricalEventHfDestroyedSite": {}, "HistoricalEventHfDied": { "ArtifactId": { "FeatureLayerId": true, "Hfid": true, "SiteId": true, "SlayerHfid": true, "SlayerItemId": true, "SlayerShooterItemId": true, "SubregionId": true, }, "DeathCause": {}, "Item": { "FeatureLayerId": true, "Hfid": true, "SiteId": true, "SlayerHfid": true, "SlayerItemId": true, "SlayerShooterItemId": true, "SubregionId": true, }, "ItemSubtype": {}, "ItemType": {}, "Mat": {}, "Site": { "FeatureLayerId": true, "Hfid": true, "SiteId": true, "SlayerHfid": true, "SlayerItemId": true, "SlayerShooterItemId": true, "SubregionId": true, }, "SlayerHf": { "FeatureLayerId": true, "Hfid": true, "SiteId": true, "SlayerHfid": true, "SlayerItemId": true, "SlayerShooterItemId": true, "SubregionId": true, }, "VictimHf": { "FeatureLayerId": true, "Hfid": true, "SiteId": true, "SlayerHfid": true, "SlayerItemId": true, "SlayerShooterItemId": true, "SubregionId": true, }, }, "HistoricalEventHfDisturbedStructure": { "Action": {}, "Histfig": { "HistFigId": true, "SiteId": true, "StructureId": true, }, "Site": { "HistFigId": true, "SiteId": true, "StructureId": true, }, "Structure": { "HistFigId": true, "SiteId": true, "StructureId": true, }, }, "HistoricalEventHfDoesInteraction": { "Doer": { "DoerHfid": true, "TargetHfid": true, }, "InteractionAction": { "Interaction": true, }, "Region": { "DoerHfid": true, "TargetHfid": true, }, "Site": { "DoerHfid": true, "TargetHfid": true, }, "Source": { "DoerHfid": true, "TargetHfid": true, }, "Target": { "DoerHfid": true, "TargetHfid": true, }, }, "HistoricalEventHfEnslaved": {}, "HistoricalEventHfEquipmentPurchase": {}, "HistoricalEventHfFreed": {}, "HistoricalEventHfGainsSecretGoal": {}, "HistoricalEventHfInterrogated": {}, "HistoricalEventHfLearnsSecret": { "Artifact": { "ArtifactId": true, "StudentHfid": true, "TeacherHfid": true, }, "SecretText": {}, "Student": { "ArtifactId": true, "StudentHfid": true, "TeacherHfid": true, }, "Teacher": { "ArtifactId": true, "StudentHfid": true, "TeacherHfid": true, }, }, "HistoricalEventHfNewPet": { "Group": { "FeatureLayerId": true, "GroupHfid": true, "SiteId": true, "SubregionId": true, }, "Pets": { "Coords": true, }, "Site": { "FeatureLayerId": true, "GroupHfid": true, "SiteId": true, "SubregionId": true, }, }, "HistoricalEventHfPerformedHorribleExperiments": {}, "HistoricalEventHfPrayedInsideStructure": { "Action": {}, "Histfig": { "HistFigId": true, "SiteId": true, "StructureId": true, }, "Site": { "HistFigId": true, "SiteId": true, "StructureId": true, }, "Structure": { "HistFigId": true, "SiteId": true, "StructureId": true, }, }, "HistoricalEventHfPreach": {}, "HistoricalEventHfProfanedStructure": { "Action": {}, "Histfig": { "HistFigId": true, "SiteId": true, "StructureId": true, }, "Site": { "HistFigId": true, "SiteId": true, "StructureId": true, }, "Structure": { "HistFigId": true, "SiteId": true, "StructureId": true, }, }, "HistoricalEventHfRansomed": {}, "HistoricalEventHfReachSummit": {}, "HistoricalEventHfRecruitedUnitTypeForEntity": {}, "HistoricalEventHfRelationshipDenied": {}, "HistoricalEventHfReunion": {}, "HistoricalEventHfRevived": {}, "HistoricalEventHfSimpleBattleEvent": {}, "HistoricalEventHfTravel": {}, "HistoricalEventHfViewedArtifact": {}, "HistoricalEventHfWounded": { "BodyPart": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, "WoundeeHfid": true, "WounderHfid": true, }, "InjuryType": {}, "PartLost": {}, "Site": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, "WoundeeHfid": true, "WounderHfid": true, }, "Woundee": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, "WoundeeHfid": true, "WounderHfid": true, }, "WoundeeCaste": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, "WoundeeHfid": true, "WounderHfid": true, }, "WoundeeRace": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, "WoundeeHfid": true, "WounderHfid": true, }, "Wounder": { "FeatureLayerId": true, "SiteId": true, "SubregionId": true, "WoundeeHfid": true, "WounderHfid": true, }, }, "HistoricalEventHfsFormedIntrigueRelationship": {}, "HistoricalEventHfsFormedReputationRelationship": {}, "HistoricalEventHolyCityDeclaration": {}, "HistoricalEventInsurrectionStarted": {}, "HistoricalEventItemStolen": { "Entity": { "CircumstanceId": true, }, "Histfig": { "CircumstanceId": true, }, "Item": { "CircumstanceId": true, }, "ItemSubtype": {}, "ItemType": {}, "Mat": {}, "Matindex": { "CircumstanceId": true, }, "Mattype": { "CircumstanceId": true, }, "Site": { "CircumstanceId": true, }, "StashSite": { "CircumstanceId": true, }, "Structure": { "CircumstanceId": true, }, "TheftMethod": {}, }, "HistoricalEventItemStolenCircumstance": {}, "HistoricalEventKnowledgeDiscovered": {}, "HistoricalEventMasterpieceArchConstructed": { "BuildingCustom": { "EntityId": true, "Hfid": true, "SiteId": true, }, "BuildingSubtype": {}, "BuildingType": {}, "Maker": { "EntityId": true, "Hfid": true, "SiteId": true, }, "MakerEntity": { "EntityId": true, "Hfid": true, "SiteId": true, }, "Site": { "EntityId": true, "Hfid": true, "SiteId": true, }, "Unk2": { "EntityId": true, "Hfid": true, "SiteId": true, }, }, "HistoricalEventMasterpieceEngraving": { "ArtId": { "EntityId": true, "Hfid": true, "SiteId": true, }, "ArtSubid": { "EntityId": true, "Hfid": true, "SiteId": true, }, "Maker": { "EntityId": true, "Hfid": true, "SiteId": true, }, "MakerEntity": { "EntityId": true, "Hfid": true, "SiteId": true, }, "Site": { "EntityId": true, "Hfid": true, "SiteId": true, }, }, "HistoricalEventMasterpieceFood": {}, "HistoricalEventMasterpieceItem": { "ItemId": { "EntityId": true, "Hfid": true, "SiteId": true, }, "ItemSubtype": {}, "ItemType": {}, "Maker": { "EntityId": true, "Hfid": true, "SiteId": true, }, "MakerEntity": { "EntityId": true, "Hfid": true, "SiteId": true, }, "Mat": {}, "Site": { "EntityId": true, "Hfid": true, "SiteId": true, }, }, "HistoricalEventMasterpieceItemImprovement": {}, "HistoricalEventMasterpieceLost": {}, "HistoricalEventMerchant": { "Destination": { "DepotEntityId": true, "SiteId": true, "TraderEntityId": true, }, "Site": { "DepotEntityId": true, "SiteId": true, "TraderEntityId": true, }, "Source": { "DepotEntityId": true, "SiteId": true, "TraderEntityId": true, }, }, "HistoricalEventModifiedBuilding": {}, "HistoricalEventMusicalFormCreated": {}, "HistoricalEventNewSiteLeader": {}, "HistoricalEventPeaceAccepted": { "Destination": { "SiteId": true, }, "Site": { "SiteId": true, }, "Source": { "SiteId": true, }, "Topic": {}, }, "HistoricalEventPeaceRejected": { "Destination": { "SiteId": true, }, "Site": { "SiteId": true, }, "Source": { "SiteId": true, }, "Topic": {}, }, "HistoricalEventPerformance": {}, "HistoricalEventPlunderedSite": {}, "HistoricalEventPoeticFormCreated": {}, "HistoricalEventProcession": {}, "HistoricalEventRazedStructure": {}, "HistoricalEventReclaimSite": {}, "HistoricalEventRegionpopIncorporatedIntoEntity": {}, "HistoricalEventRelationship": {}, "HistoricalEventRelationshipSupplement": {}, "HistoricalEventRemoveHfEntityLink": { "Civ": { "CivId": true, "Hfid": true, "PositionId": true, }, "Histfig": { "CivId": true, "Hfid": true, "PositionId": true, }, "LinkType": { "Link": true, }, "Position": {}, }, "HistoricalEventRemoveHfHfLink": {}, "HistoricalEventRemoveHfSiteLink": { "Civ": { "SiteId": true, }, "Histfig": { "SiteId": true, }, "LinkType": {}, "Site": { "SiteId": true, }, "Structure": { "SiteId": true, }, }, "HistoricalEventReplacedStructure": { "Civ": { "CivId": true, "NewAbId": true, "OldAbId": true, "SiteCivId": true, "SiteId": true, }, "NewStructure": { "CivId": true, "NewAbId": true, "OldAbId": true, "SiteCivId": true, "SiteId": true, }, "OldStructure": { "CivId": true, "NewAbId": true, "OldAbId": true, "SiteCivId": true, "SiteId": true, }, "Site": { "CivId": true, "NewAbId": true, "OldAbId": true, "SiteCivId": true, "SiteId": true, }, "SiteCiv": { "CivId": true, "NewAbId": true, "OldAbId": true, "SiteCivId": true, "SiteId": true, }, }, "HistoricalEventSiteDied": {}, "HistoricalEventSiteDispute": {}, "HistoricalEventSiteRetired": {}, "HistoricalEventSiteSurrendered": {}, "HistoricalEventSiteTakenOver": {}, "HistoricalEventSiteTributeForced": {}, "HistoricalEventSneakIntoSite": {}, "HistoricalEventSpottedLeavingSite": {}, "HistoricalEventSquadVsSquad": {}, "HistoricalEventTacticalSituation": {}, "HistoricalEventTrade": {}, "HistoricalEventWrittenContentComposed": {}, "HistoricalFigure": { "Sex": { "Appeared": true, "BirthSeconds72": true, "BirthYear": true, "BreedId": true, "CurrentIdentityId": true, "DeathSeconds72": true, "DeathYear": true, "EntPopId": true, }, }, "HistoricalFigureEntityLink": {}, "HistoricalFigureSiteProperty": {}, "Honor": {}, "HonorEntity": {}, "Identity": {}, "IntrigueActor": {}, "IntriguePlot": {}, "Item": {}, "Landmass": {}, "MountainPeak": {}, "MusicalForm": {}, "Occasion": {}, "PlotActor": {}, "PoeticForm": {}, "Reference": {}, "Region": {}, "RelationshipProfileHfHistorical": {}, "RelationshipProfileHfIdentity": {}, "RelationshipProfileHfVisual": {}, "River": {}, "Schedule": {}, "Site": { "CivId": {}, "CurOwnerId": {}, }, "SiteLink": {}, "SiteSiteProperty": {}, "Structure": { "Deity": { "EntityId": true, "LocalId": true, "WorshipHfid": true, }, "DeityType": { "EntityId": true, "LocalId": true, "WorshipHfid": true, }, "DungeonType": { "EntityId": true, "LocalId": true, "WorshipHfid": true, }, "Name2": {}, "Religion": { "EntityId": true, "LocalId": true, "WorshipHfid": true, }, }, "UndergroundRegion": { "Coords": {}, }, "VagueRelationship": {}, "WorldConstruction": {}, "WrittenContent": { "Author": { "AuthorHfid": true, "AuthorRoll": true, "FormId": true, }, "PageEnd": { "AuthorHfid": true, "AuthorRoll": true, "FormId": true, }, "PageStart": { "AuthorHfid": true, "AuthorRoll": true, "FormId": true, }, }, } } type Artifact struct { AbsTileX int `json:"absTileX" legend:"base"` // abs_tile_x AbsTileY int `json:"absTileY" legend:"base"` // abs_tile_y AbsTileZ int `json:"absTileZ" legend:"base"` // abs_tile_z HolderHfid int `json:"holderHfid" legend:"base"` // holder_hfid Id_ int `json:"id" legend:"both"` // id Item *Item `json:"item" legend:"base"` // item ItemDescription string `json:"itemDescription" legend:"plus"` // item_description ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype ItemType string `json:"itemType" legend:"plus"` // item_type Mat string `json:"mat" legend:"plus"` // mat Name_ string `json:"name" legend:"base"` // name PageCount int `json:"pageCount" legend:"plus"` // page_count SiteId int `json:"siteId" legend:"base"` // site_id StructureLocalId int `json:"structureLocalId" legend:"base"` // structure_local_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id Writing int `json:"writing" legend:"plus"` // writing } func (x *Artifact) Id() int { return x.Id_ } func (x *Artifact) Name() string { return x.Name_ } func (x *Artifact) RelatedToEntity(id int) bool { return false } func (x *Artifact) RelatedToHf(id int) bool { return x.HolderHfid == id } func (x *Artifact) CheckFields() { if x.PageCount != x.AbsTileX && x.PageCount != 0 && x.AbsTileX != 0 { sameFields["Artifact"]["PageCount"]["AbsTileX"] = false } if x.PageCount != x.AbsTileY && x.PageCount != 0 && x.AbsTileY != 0 { sameFields["Artifact"]["PageCount"]["AbsTileY"] = false } if x.PageCount != x.AbsTileZ && x.PageCount != 0 && x.AbsTileZ != 0 { sameFields["Artifact"]["PageCount"]["AbsTileZ"] = false } if x.PageCount != x.HolderHfid && x.PageCount != 0 && x.HolderHfid != 0 { sameFields["Artifact"]["PageCount"]["HolderHfid"] = false } if x.PageCount != x.SiteId && x.PageCount != 0 && x.SiteId != 0 { sameFields["Artifact"]["PageCount"]["SiteId"] = false } if x.PageCount != x.StructureLocalId && x.PageCount != 0 && x.StructureLocalId != 0 { sameFields["Artifact"]["PageCount"]["StructureLocalId"] = false } if x.PageCount != x.SubregionId && x.PageCount != 0 && x.SubregionId != 0 { sameFields["Artifact"]["PageCount"]["SubregionId"] = false } if x.Writing != x.AbsTileX && x.Writing != 0 && x.AbsTileX != 0 { sameFields["Artifact"]["Writing"]["AbsTileX"] = false } if x.Writing != x.AbsTileY && x.Writing != 0 && x.AbsTileY != 0 { sameFields["Artifact"]["Writing"]["AbsTileY"] = false } if x.Writing != x.AbsTileZ && x.Writing != 0 && x.AbsTileZ != 0 { sameFields["Artifact"]["Writing"]["AbsTileZ"] = false } if x.Writing != x.HolderHfid && x.Writing != 0 && x.HolderHfid != 0 { sameFields["Artifact"]["Writing"]["HolderHfid"] = false } if x.Writing != x.SiteId && x.Writing != 0 && x.SiteId != 0 { sameFields["Artifact"]["Writing"]["SiteId"] = false } if x.Writing != x.StructureLocalId && x.Writing != 0 && x.StructureLocalId != 0 { sameFields["Artifact"]["Writing"]["StructureLocalId"] = false } if x.Writing != x.SubregionId && x.Writing != 0 && x.SubregionId != 0 { sameFields["Artifact"]["Writing"]["SubregionId"] = false } } type Creature struct { AllCastesAlive bool `json:"allCastesAlive" legend:"plus"` // all_castes_alive ArtificialHiveable bool `json:"artificialHiveable" legend:"plus"` // artificial_hiveable BiomeDesertBadland bool `json:"biomeDesertBadland" legend:"plus"` // biome_desert_badland BiomeDesertRock bool `json:"biomeDesertRock" legend:"plus"` // biome_desert_rock BiomeDesertSand bool `json:"biomeDesertSand" legend:"plus"` // biome_desert_sand BiomeForestTaiga bool `json:"biomeForestTaiga" legend:"plus"` // biome_forest_taiga BiomeForestTemperateBroadleaf bool `json:"biomeForestTemperateBroadleaf" legend:"plus"` // biome_forest_temperate_broadleaf BiomeForestTemperateConifer bool `json:"biomeForestTemperateConifer" legend:"plus"` // biome_forest_temperate_conifer BiomeForestTropicalConifer bool `json:"biomeForestTropicalConifer" legend:"plus"` // biome_forest_tropical_conifer BiomeForestTropicalDryBroadleaf bool `json:"biomeForestTropicalDryBroadleaf" legend:"plus"` // biome_forest_tropical_dry_broadleaf BiomeForestTropicalMoistBroadleaf bool `json:"biomeForestTropicalMoistBroadleaf" legend:"plus"` // biome_forest_tropical_moist_broadleaf BiomeGlacier bool `json:"biomeGlacier" legend:"plus"` // biome_glacier BiomeGrasslandTemperate bool `json:"biomeGrasslandTemperate" legend:"plus"` // biome_grassland_temperate BiomeGrasslandTropical bool `json:"biomeGrasslandTropical" legend:"plus"` // biome_grassland_tropical BiomeLakeTemperateBrackishwater bool `json:"biomeLakeTemperateBrackishwater" legend:"plus"` // biome_lake_temperate_brackishwater BiomeLakeTemperateFreshwater bool `json:"biomeLakeTemperateFreshwater" legend:"plus"` // biome_lake_temperate_freshwater BiomeLakeTemperateSaltwater bool `json:"biomeLakeTemperateSaltwater" legend:"plus"` // biome_lake_temperate_saltwater BiomeLakeTropicalBrackishwater bool `json:"biomeLakeTropicalBrackishwater" legend:"plus"` // biome_lake_tropical_brackishwater BiomeLakeTropicalFreshwater bool `json:"biomeLakeTropicalFreshwater" legend:"plus"` // biome_lake_tropical_freshwater BiomeLakeTropicalSaltwater bool `json:"biomeLakeTropicalSaltwater" legend:"plus"` // biome_lake_tropical_saltwater BiomeMarshTemperateFreshwater bool `json:"biomeMarshTemperateFreshwater" legend:"plus"` // biome_marsh_temperate_freshwater BiomeMarshTemperateSaltwater bool `json:"biomeMarshTemperateSaltwater" legend:"plus"` // biome_marsh_temperate_saltwater BiomeMarshTropicalFreshwater bool `json:"biomeMarshTropicalFreshwater" legend:"plus"` // biome_marsh_tropical_freshwater BiomeMarshTropicalSaltwater bool `json:"biomeMarshTropicalSaltwater" legend:"plus"` // biome_marsh_tropical_saltwater BiomeMountain bool `json:"biomeMountain" legend:"plus"` // biome_mountain BiomeOceanArctic bool `json:"biomeOceanArctic" legend:"plus"` // biome_ocean_arctic BiomeOceanTemperate bool `json:"biomeOceanTemperate" legend:"plus"` // biome_ocean_temperate BiomeOceanTropical bool `json:"biomeOceanTropical" legend:"plus"` // biome_ocean_tropical BiomePoolTemperateBrackishwater bool `json:"biomePoolTemperateBrackishwater" legend:"plus"` // biome_pool_temperate_brackishwater BiomePoolTemperateFreshwater bool `json:"biomePoolTemperateFreshwater" legend:"plus"` // biome_pool_temperate_freshwater BiomePoolTemperateSaltwater bool `json:"biomePoolTemperateSaltwater" legend:"plus"` // biome_pool_temperate_saltwater BiomePoolTropicalBrackishwater bool `json:"biomePoolTropicalBrackishwater" legend:"plus"` // biome_pool_tropical_brackishwater BiomePoolTropicalFreshwater bool `json:"biomePoolTropicalFreshwater" legend:"plus"` // biome_pool_tropical_freshwater BiomePoolTropicalSaltwater bool `json:"biomePoolTropicalSaltwater" legend:"plus"` // biome_pool_tropical_saltwater BiomeRiverTemperateBrackishwater bool `json:"biomeRiverTemperateBrackishwater" legend:"plus"` // biome_river_temperate_brackishwater BiomeRiverTemperateFreshwater bool `json:"biomeRiverTemperateFreshwater" legend:"plus"` // biome_river_temperate_freshwater BiomeRiverTemperateSaltwater bool `json:"biomeRiverTemperateSaltwater" legend:"plus"` // biome_river_temperate_saltwater BiomeRiverTropicalBrackishwater bool `json:"biomeRiverTropicalBrackishwater" legend:"plus"` // biome_river_tropical_brackishwater BiomeRiverTropicalFreshwater bool `json:"biomeRiverTropicalFreshwater" legend:"plus"` // biome_river_tropical_freshwater BiomeRiverTropicalSaltwater bool `json:"biomeRiverTropicalSaltwater" legend:"plus"` // biome_river_tropical_saltwater BiomeSavannaTemperate bool `json:"biomeSavannaTemperate" legend:"plus"` // biome_savanna_temperate BiomeSavannaTropical bool `json:"biomeSavannaTropical" legend:"plus"` // biome_savanna_tropical BiomeShrublandTemperate bool `json:"biomeShrublandTemperate" legend:"plus"` // biome_shrubland_temperate BiomeShrublandTropical bool `json:"biomeShrublandTropical" legend:"plus"` // biome_shrubland_tropical BiomeSubterraneanChasm bool `json:"biomeSubterraneanChasm" legend:"plus"` // biome_subterranean_chasm BiomeSubterraneanLava bool `json:"biomeSubterraneanLava" legend:"plus"` // biome_subterranean_lava BiomeSubterraneanWater bool `json:"biomeSubterraneanWater" legend:"plus"` // biome_subterranean_water BiomeSwampMangrove bool `json:"biomeSwampMangrove" legend:"plus"` // biome_swamp_mangrove BiomeSwampTemperateFreshwater bool `json:"biomeSwampTemperateFreshwater" legend:"plus"` // biome_swamp_temperate_freshwater BiomeSwampTemperateSaltwater bool `json:"biomeSwampTemperateSaltwater" legend:"plus"` // biome_swamp_temperate_saltwater BiomeSwampTropicalFreshwater bool `json:"biomeSwampTropicalFreshwater" legend:"plus"` // biome_swamp_tropical_freshwater BiomeSwampTropicalSaltwater bool `json:"biomeSwampTropicalSaltwater" legend:"plus"` // biome_swamp_tropical_saltwater BiomeTundra bool `json:"biomeTundra" legend:"plus"` // biome_tundra CreatureId string `json:"creatureId" legend:"plus"` // creature_id DoesNotExist bool `json:"doesNotExist" legend:"plus"` // does_not_exist Equipment bool `json:"equipment" legend:"plus"` // equipment EquipmentWagon bool `json:"equipmentWagon" legend:"plus"` // equipment_wagon Evil bool `json:"evil" legend:"plus"` // evil Fanciful bool `json:"fanciful" legend:"plus"` // fanciful Generated bool `json:"generated" legend:"plus"` // generated Good bool `json:"good" legend:"plus"` // good HasAnyBenign bool `json:"hasAnyBenign" legend:"plus"` // has_any_benign HasAnyCanSwim bool `json:"hasAnyCanSwim" legend:"plus"` // has_any_can_swim HasAnyCannotBreatheAir bool `json:"hasAnyCannotBreatheAir" legend:"plus"` // has_any_cannot_breathe_air HasAnyCannotBreatheWater bool `json:"hasAnyCannotBreatheWater" legend:"plus"` // has_any_cannot_breathe_water HasAnyCarnivore bool `json:"hasAnyCarnivore" legend:"plus"` // has_any_carnivore HasAnyCommonDomestic bool `json:"hasAnyCommonDomestic" legend:"plus"` // has_any_common_domestic HasAnyCuriousBeast bool `json:"hasAnyCuriousBeast" legend:"plus"` // has_any_curious_beast HasAnyDemon bool `json:"hasAnyDemon" legend:"plus"` // has_any_demon HasAnyFeatureBeast bool `json:"hasAnyFeatureBeast" legend:"plus"` // has_any_feature_beast HasAnyFlier bool `json:"hasAnyFlier" legend:"plus"` // has_any_flier HasAnyFlyRaceGait bool `json:"hasAnyFlyRaceGait" legend:"plus"` // has_any_fly_race_gait HasAnyGrasp bool `json:"hasAnyGrasp" legend:"plus"` // has_any_grasp HasAnyGrazer bool `json:"hasAnyGrazer" legend:"plus"` // has_any_grazer HasAnyHasBlood bool `json:"hasAnyHasBlood" legend:"plus"` // has_any_has_blood HasAnyImmobile bool `json:"hasAnyImmobile" legend:"plus"` // has_any_immobile HasAnyIntelligentLearns bool `json:"hasAnyIntelligentLearns" legend:"plus"` // has_any_intelligent_learns HasAnyIntelligentSpeaks bool `json:"hasAnyIntelligentSpeaks" legend:"plus"` // has_any_intelligent_speaks HasAnyLargePredator bool `json:"hasAnyLargePredator" legend:"plus"` // has_any_large_predator HasAnyLocalPopsControllable bool `json:"hasAnyLocalPopsControllable" legend:"plus"` // has_any_local_pops_controllable HasAnyLocalPopsProduceHeroes bool `json:"hasAnyLocalPopsProduceHeroes" legend:"plus"` // has_any_local_pops_produce_heroes HasAnyMegabeast bool `json:"hasAnyMegabeast" legend:"plus"` // has_any_megabeast HasAnyMischievous bool `json:"hasAnyMischievous" legend:"plus"` // has_any_mischievous HasAnyNaturalAnimal bool `json:"hasAnyNaturalAnimal" legend:"plus"` // has_any_natural_animal HasAnyNightCreature bool `json:"hasAnyNightCreature" legend:"plus"` // has_any_night_creature HasAnyNightCreatureBogeyman bool `json:"hasAnyNightCreatureBogeyman" legend:"plus"` // has_any_night_creature_bogeyman HasAnyNightCreatureHunter bool `json:"hasAnyNightCreatureHunter" legend:"plus"` // has_any_night_creature_hunter HasAnyNightCreatureNightmare bool `json:"hasAnyNightCreatureNightmare" legend:"plus"` // has_any_night_creature_nightmare HasAnyNotFireimmune bool `json:"hasAnyNotFireimmune" legend:"plus"` // has_any_not_fireimmune HasAnyNotLiving bool `json:"hasAnyNotLiving" legend:"plus"` // has_any_not_living HasAnyOutsiderControllable bool `json:"hasAnyOutsiderControllable" legend:"plus"` // has_any_outsider_controllable HasAnyRaceGait bool `json:"hasAnyRaceGait" legend:"plus"` // has_any_race_gait HasAnySemimegabeast bool `json:"hasAnySemimegabeast" legend:"plus"` // has_any_semimegabeast HasAnySlowLearner bool `json:"hasAnySlowLearner" legend:"plus"` // has_any_slow_learner HasAnySupernatural bool `json:"hasAnySupernatural" legend:"plus"` // has_any_supernatural HasAnyTitan bool `json:"hasAnyTitan" legend:"plus"` // has_any_titan HasAnyUniqueDemon bool `json:"hasAnyUniqueDemon" legend:"plus"` // has_any_unique_demon HasAnyUtterances bool `json:"hasAnyUtterances" legend:"plus"` // has_any_utterances HasAnyVerminHateable bool `json:"hasAnyVerminHateable" legend:"plus"` // has_any_vermin_hateable HasAnyVerminMicro bool `json:"hasAnyVerminMicro" legend:"plus"` // has_any_vermin_micro HasFemale bool `json:"hasFemale" legend:"plus"` // has_female HasMale bool `json:"hasMale" legend:"plus"` // has_male LargeRoaming bool `json:"largeRoaming" legend:"plus"` // large_roaming LooseClusters bool `json:"looseClusters" legend:"plus"` // loose_clusters MatesToBreed bool `json:"matesToBreed" legend:"plus"` // mates_to_breed Mundane bool `json:"mundane" legend:"plus"` // mundane NamePlural string `json:"namePlural" legend:"plus"` // name_plural NameSingular string `json:"nameSingular" legend:"plus"` // name_singular OccursAsEntityRace bool `json:"occursAsEntityRace" legend:"plus"` // occurs_as_entity_race Savage bool `json:"savage" legend:"plus"` // savage SmallRace bool `json:"smallRace" legend:"plus"` // small_race TwoGenders bool `json:"twoGenders" legend:"plus"` // two_genders Ubiquitous bool `json:"ubiquitous" legend:"plus"` // ubiquitous VerminEater bool `json:"verminEater" legend:"plus"` // vermin_eater VerminFish bool `json:"verminFish" legend:"plus"` // vermin_fish VerminGrounder bool `json:"verminGrounder" legend:"plus"` // vermin_grounder VerminRotter bool `json:"verminRotter" legend:"plus"` // vermin_rotter VerminSoil bool `json:"verminSoil" legend:"plus"` // vermin_soil VerminSoilColony bool `json:"verminSoilColony" legend:"plus"` // vermin_soil_colony } func (x *Creature) RelatedToEntity(id int) bool { return false } func (x *Creature) RelatedToHf(id int) bool { return false } func (x *Creature) CheckFields() { } type DanceForm struct { Description string `json:"description" legend:"base"` // description Id_ int `json:"id" legend:"both"` // id Name_ string `json:"name" legend:"plus"` // name } func (x *DanceForm) Id() int { return x.Id_ } func (x *DanceForm) Name() string { return x.Name_ } func (x *DanceForm) RelatedToEntity(id int) bool { return false } func (x *DanceForm) RelatedToHf(id int) bool { return false } func (x *DanceForm) CheckFields() { } type DfWorld struct { Altname string `json:"altname" legend:"plus"` // altname Artifacts map[int]*Artifact `json:"artifacts" legend:"both"` // artifacts CreatureRaw []*Creature `json:"creatureRaw" legend:"plus"` // creature_raw DanceForms map[int]*DanceForm `json:"danceForms" legend:"both"` // dance_forms Entities map[int]*Entity `json:"entities" legend:"both"` // entities EntityPopulations map[int]*EntityPopulation `json:"entityPopulations" legend:"both"` // entity_populations HistoricalEras []*HistoricalEra `json:"historicalEras" legend:"both"` // historical_eras HistoricalEventCollections map[int]*HistoricalEventCollection `json:"historicalEventCollections" legend:"both"` // historical_event_collections HistoricalEventRelationshipSupplements []*HistoricalEventRelationshipSupplement `json:"historicalEventRelationshipSupplements" legend:"plus"` // historical_event_relationship_supplements HistoricalEventRelationships []*HistoricalEventRelationship `json:"historicalEventRelationships" legend:"plus"` // historical_event_relationships HistoricalEvents map[int]*HistoricalEvent `json:"historicalEvents" legend:"both"` // historical_events HistoricalFigures map[int]*HistoricalFigure `json:"historicalFigures" legend:"both"` // historical_figures Identities map[int]*Identity `json:"identities" legend:"plus"` // identities Landmasses map[int]*Landmass `json:"landmasses" legend:"plus"` // landmasses MountainPeaks map[int]*MountainPeak `json:"mountainPeaks" legend:"plus"` // mountain_peaks MusicalForms map[int]*MusicalForm `json:"musicalForms" legend:"both"` // musical_forms Name_ string `json:"name" legend:"plus"` // name PoeticForms map[int]*PoeticForm `json:"poeticForms" legend:"both"` // poetic_forms Regions map[int]*Region `json:"regions" legend:"both"` // regions Rivers []*River `json:"rivers" legend:"plus"` // rivers Sites map[int]*Site `json:"sites" legend:"both"` // sites UndergroundRegions map[int]*UndergroundRegion `json:"undergroundRegions" legend:"both"` // underground_regions WorldConstructions map[int]*WorldConstruction `json:"worldConstructions" legend:"both"` // world_constructions WrittenContents map[int]*WrittenContent `json:"writtenContents" legend:"both"` // written_contents } func (x *DfWorld) Name() string { return x.Name_ } func (x *DfWorld) RelatedToEntity(id int) bool { return false } func (x *DfWorld) RelatedToHf(id int) bool { return false } func (x *DfWorld) CheckFields() { } type EntityProfession int const ( EntityProfession_Unknown EntityProfession = iota EntityProfession_Armorer EntityProfession_Blacksmith EntityProfession_BoneCarver EntityProfession_Bowyer EntityProfession_Carpenter EntityProfession_Clothier EntityProfession_Craftsman EntityProfession_GemCutter EntityProfession_Mason EntityProfession_Metalcrafter EntityProfession_Weaponsmith EntityProfession_Weaver ) func parseEntityProfession(s string) EntityProfession { switch s { case "armorer": return EntityProfession_Armorer case "blacksmith": return EntityProfession_Blacksmith case "bone_carver": return EntityProfession_BoneCarver case "bowyer": return EntityProfession_Bowyer case "carpenter": return EntityProfession_Carpenter case "clothier": return EntityProfession_Clothier case "craftsman": return EntityProfession_Craftsman case "gem_cutter": return EntityProfession_GemCutter case "mason": return EntityProfession_Mason case "metalcrafter": return EntityProfession_Metalcrafter case "weaponsmith": return EntityProfession_Weaponsmith case "weaver": return EntityProfession_Weaver } return EntityProfession_Unknown } func (s EntityProfession) String() string { switch s { case EntityProfession_Armorer: return "armorer" case EntityProfession_Blacksmith: return "blacksmith" case EntityProfession_BoneCarver: return "bone carver" case EntityProfession_Bowyer: return "bowyer" case EntityProfession_Carpenter: return "carpenter" case EntityProfession_Clothier: return "clothier" case EntityProfession_Craftsman: return "craftsman" case EntityProfession_GemCutter: return "gem cutter" case EntityProfession_Mason: return "mason" case EntityProfession_Metalcrafter: return "metalcrafter" case EntityProfession_Weaponsmith: return "weaponsmith" case EntityProfession_Weaver: return "weaver" } return "unknown" } func (s EntityProfession) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type EntityType int const ( EntityType_Unknown EntityType = iota EntityType_Civilization EntityType_Guild EntityType_Merchantcompany EntityType_Migratinggroup EntityType_Militaryunit EntityType_Nomadicgroup EntityType_Outcast EntityType_Performancetroupe EntityType_Religion EntityType_Sitegovernment ) func parseEntityType(s string) EntityType { switch s { case "civilization": return EntityType_Civilization case "guild": return EntityType_Guild case "merchantcompany": return EntityType_Merchantcompany case "migratinggroup": return EntityType_Migratinggroup case "militaryunit": return EntityType_Militaryunit case "nomadicgroup": return EntityType_Nomadicgroup case "outcast": return EntityType_Outcast case "performancetroupe": return EntityType_Performancetroupe case "religion": return EntityType_Religion case "sitegovernment": return EntityType_Sitegovernment } return EntityType_Unknown } func (s EntityType) String() string { switch s { case EntityType_Civilization: return "civilization" case EntityType_Guild: return "guild" case EntityType_Merchantcompany: return "merchantcompany" case EntityType_Migratinggroup: return "migratinggroup" case EntityType_Militaryunit: return "militaryunit" case EntityType_Nomadicgroup: return "nomadicgroup" case EntityType_Outcast: return "outcast" case EntityType_Performancetroupe: return "performancetroupe" case EntityType_Religion: return "religion" case EntityType_Sitegovernment: return "sitegovernment" } return "unknown" } func (s EntityType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type EntityWeapon int const ( EntityWeapon_Unknown EntityWeapon = iota EntityWeapon_BattleAxe EntityWeapon_Bow EntityWeapon_Crossbow EntityWeapon_Dagger EntityWeapon_Flail EntityWeapon_GreatAxe EntityWeapon_Halberd EntityWeapon_LongSword EntityWeapon_Mace EntityWeapon_Maul EntityWeapon_Morningstar EntityWeapon_Pike EntityWeapon_Scimitar EntityWeapon_Scourge EntityWeapon_ShortSword EntityWeapon_Spear EntityWeapon_TwoHandedSword EntityWeapon_WarHammer EntityWeapon_Whip ) func parseEntityWeapon(s string) EntityWeapon { switch s { case "battle axe": return EntityWeapon_BattleAxe case "bow": return EntityWeapon_Bow case "crossbow": return EntityWeapon_Crossbow case "dagger": return EntityWeapon_Dagger case "flail": return EntityWeapon_Flail case "great axe": return EntityWeapon_GreatAxe case "halberd": return EntityWeapon_Halberd case "long sword": return EntityWeapon_LongSword case "mace": return EntityWeapon_Mace case "maul": return EntityWeapon_Maul case "morningstar": return EntityWeapon_Morningstar case "pike": return EntityWeapon_Pike case "scimitar": return EntityWeapon_Scimitar case "scourge": return EntityWeapon_Scourge case "short sword": return EntityWeapon_ShortSword case "spear": return EntityWeapon_Spear case "two-handed sword": return EntityWeapon_TwoHandedSword case "war hammer": return EntityWeapon_WarHammer case "whip": return EntityWeapon_Whip } return EntityWeapon_Unknown } func (s EntityWeapon) String() string { switch s { case EntityWeapon_BattleAxe: return "battle axe" case EntityWeapon_Bow: return "bow" case EntityWeapon_Crossbow: return "crossbow" case EntityWeapon_Dagger: return "dagger" case EntityWeapon_Flail: return "flail" case EntityWeapon_GreatAxe: return "great axe" case EntityWeapon_Halberd: return "halberd" case EntityWeapon_LongSword: return "long sword" case EntityWeapon_Mace: return "mace" case EntityWeapon_Maul: return "maul" case EntityWeapon_Morningstar: return "morningstar" case EntityWeapon_Pike: return "pike" case EntityWeapon_Scimitar: return "scimitar" case EntityWeapon_Scourge: return "scourge" case EntityWeapon_ShortSword: return "short sword" case EntityWeapon_Spear: return "spear" case EntityWeapon_TwoHandedSword: return "two handed sword" case EntityWeapon_WarHammer: return "war hammer" case EntityWeapon_Whip: return "whip" } return "unknown" } func (s EntityWeapon) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Entity struct { Child []int `json:"child" legend:"plus"` // child Claims string `json:"claims" legend:"plus"` // claims EntityLink []*EntityEntityLink `json:"entityLink" legend:"plus"` // entity_link EntityPosition []*EntityPosition `json:"entityPosition" legend:"plus"` // entity_position EntityPositionAssignment []*EntityPositionAssignment `json:"entityPositionAssignment" legend:"plus"` // entity_position_assignment HistfigId []int `json:"histfigId" legend:"plus"` // histfig_id Honor []*Honor `json:"honor" legend:"base"` // honor Id_ int `json:"id" legend:"both"` // id Name_ string `json:"name" legend:"base"` // name Occasion []*Occasion `json:"occasion" legend:"plus"` // occasion Profession EntityProfession `json:"profession" legend:"plus"` // profession Race string `json:"race" legend:"plus"` // race Type EntityType `json:"type" legend:"plus"` // type Weapon []EntityWeapon `json:"weapon" legend:"plus"` // weapon WorshipId []int `json:"worshipId" legend:"plus"` // worship_id } func (x *Entity) Id() int { return x.Id_ } func (x *Entity) Name() string { return x.Name_ } func (x *Entity) RelatedToEntity(id int) bool { return false } func (x *Entity) RelatedToHf(id int) bool { return containsInt(x.HistfigId, id) } func (x *Entity) CheckFields() { } type EntityEntityLinkType int const ( EntityEntityLinkType_Unknown EntityEntityLinkType = iota EntityEntityLinkType_CHILD EntityEntityLinkType_PARENT EntityEntityLinkType_RELIGIOUS ) func parseEntityEntityLinkType(s string) EntityEntityLinkType { switch s { case "CHILD": return EntityEntityLinkType_CHILD case "PARENT": return EntityEntityLinkType_PARENT case "RELIGIOUS": return EntityEntityLinkType_RELIGIOUS } return EntityEntityLinkType_Unknown } func (s EntityEntityLinkType) String() string { switch s { case EntityEntityLinkType_CHILD: return "child" case EntityEntityLinkType_PARENT: return "parent" case EntityEntityLinkType_RELIGIOUS: return "religious" } return "unknown" } func (s EntityEntityLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type EntityEntityLink struct { Strength int `json:"strength" legend:"plus"` // strength Target int `json:"target" legend:"plus"` // target Type EntityEntityLinkType `json:"type" legend:"plus"` // type } func (x *EntityEntityLink) RelatedToEntity(id int) bool { return false } func (x *EntityEntityLink) RelatedToHf(id int) bool { return false } func (x *EntityEntityLink) CheckFields() { } type EntityFormerPositionLink struct { EndYear int `json:"endYear" legend:"base"` // end_year EntityId int `json:"entityId" legend:"base"` // entity_id PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id StartYear int `json:"startYear" legend:"base"` // start_year } func (x *EntityFormerPositionLink) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *EntityFormerPositionLink) RelatedToHf(id int) bool { return false } func (x *EntityFormerPositionLink) CheckFields() { } type EntityFormerSquadLink struct { EndYear int `json:"endYear" legend:"base"` // end_year EntityId int `json:"entityId" legend:"base"` // entity_id SquadId int `json:"squadId" legend:"base"` // squad_id StartYear int `json:"startYear" legend:"base"` // start_year } func (x *EntityFormerSquadLink) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *EntityFormerSquadLink) RelatedToHf(id int) bool { return false } func (x *EntityFormerSquadLink) CheckFields() { } type EntityPopulation struct { CivId int `json:"civId" legend:"plus"` // civ_id Id_ int `json:"id" legend:"both"` // id Race string `json:"race" legend:"plus"` // race } func (x *EntityPopulation) Id() int { return x.Id_ } func (x *EntityPopulation) RelatedToEntity(id int) bool { return x.CivId == id } func (x *EntityPopulation) RelatedToHf(id int) bool { return false } func (x *EntityPopulation) CheckFields() { } type EntityPosition struct { Id_ int `json:"id" legend:"plus"` // id Name_ string `json:"name" legend:"plus"` // name NameFemale string `json:"nameFemale" legend:"plus"` // name_female NameMale string `json:"nameMale" legend:"plus"` // name_male Spouse string `json:"spouse" legend:"plus"` // spouse SpouseFemale string `json:"spouseFemale" legend:"plus"` // spouse_female SpouseMale string `json:"spouseMale" legend:"plus"` // spouse_male } func (x *EntityPosition) Id() int { return x.Id_ } func (x *EntityPosition) Name() string { return x.Name_ } func (x *EntityPosition) RelatedToEntity(id int) bool { return false } func (x *EntityPosition) RelatedToHf(id int) bool { return false } func (x *EntityPosition) CheckFields() { } type EntityPositionAssignment struct { Histfig int `json:"histfig" legend:"plus"` // histfig Id_ int `json:"id" legend:"plus"` // id PositionId int `json:"positionId" legend:"plus"` // position_id SquadId int `json:"squadId" legend:"plus"` // squad_id } func (x *EntityPositionAssignment) Id() int { return x.Id_ } func (x *EntityPositionAssignment) RelatedToEntity(id int) bool { return false } func (x *EntityPositionAssignment) RelatedToHf(id int) bool { return x.Histfig == id } func (x *EntityPositionAssignment) CheckFields() { } type EntityPositionLink struct { EntityId int `json:"entityId" legend:"base"` // entity_id PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id StartYear int `json:"startYear" legend:"base"` // start_year } func (x *EntityPositionLink) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *EntityPositionLink) RelatedToHf(id int) bool { return false } func (x *EntityPositionLink) CheckFields() { } type EntityReputation struct { EntityId int `json:"entityId" legend:"base"` // entity_id FirstAgelessSeasonCount int `json:"firstAgelessSeasonCount" legend:"base"` // first_ageless_season_count FirstAgelessYear int `json:"firstAgelessYear" legend:"base"` // first_ageless_year RepBard int `json:"repBard" legend:"base"` // rep_bard RepEnemyFighter int `json:"repEnemyFighter" legend:"base"` // rep_enemy_fighter RepHero int `json:"repHero" legend:"base"` // rep_hero RepHunter int `json:"repHunter" legend:"base"` // rep_hunter RepKiller int `json:"repKiller" legend:"base"` // rep_killer RepKnowledgePreserver int `json:"repKnowledgePreserver" legend:"base"` // rep_knowledge_preserver RepPoet int `json:"repPoet" legend:"base"` // rep_poet RepProtectorOfWeak int `json:"repProtectorOfWeak" legend:"base"` // rep_protector_of_weak RepStoryteller int `json:"repStoryteller" legend:"base"` // rep_storyteller RepThief int `json:"repThief" legend:"base"` // rep_thief RepTreasureHunter int `json:"repTreasureHunter" legend:"base"` // rep_treasure_hunter UnsolvedMurders int `json:"unsolvedMurders" legend:"base"` // unsolved_murders } func (x *EntityReputation) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *EntityReputation) RelatedToHf(id int) bool { return false } func (x *EntityReputation) CheckFields() { } type EntitySquadLink struct { EntityId int `json:"entityId" legend:"base"` // entity_id SquadId int `json:"squadId" legend:"base"` // squad_id SquadPosition int `json:"squadPosition" legend:"base"` // squad_position StartYear int `json:"startYear" legend:"base"` // start_year } func (x *EntitySquadLink) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *EntitySquadLink) RelatedToHf(id int) bool { return false } func (x *EntitySquadLink) CheckFields() { } type FeatureType int const ( FeatureType_Unknown FeatureType = iota FeatureType_Acrobats FeatureType_Banners FeatureType_Candles FeatureType_Costumes FeatureType_CriersInFront FeatureType_DancePerformance FeatureType_Images FeatureType_IncenseBurning FeatureType_MusicalPerformance FeatureType_OrderOfPrecedence FeatureType_PoetryRecital FeatureType_Storytelling FeatureType_TheGivingOfItems FeatureType_TheSacrificeOfItems ) func parseFeatureType(s string) FeatureType { switch s { case "acrobats": return FeatureType_Acrobats case "banners": return FeatureType_Banners case "candles": return FeatureType_Candles case "costumes": return FeatureType_Costumes case "criers_in_front": return FeatureType_CriersInFront case "dance_performance": return FeatureType_DancePerformance case "images": return FeatureType_Images case "incense_burning": return FeatureType_IncenseBurning case "musical_performance": return FeatureType_MusicalPerformance case "order_of_precedence": return FeatureType_OrderOfPrecedence case "poetry_recital": return FeatureType_PoetryRecital case "storytelling": return FeatureType_Storytelling case "the_giving_of_items": return FeatureType_TheGivingOfItems case "the_sacrifice_of_items": return FeatureType_TheSacrificeOfItems } return FeatureType_Unknown } func (s FeatureType) String() string { switch s { case FeatureType_Acrobats: return "acrobats" case FeatureType_Banners: return "banners" case FeatureType_Candles: return "candles" case FeatureType_Costumes: return "costumes" case FeatureType_CriersInFront: return "criers in front" case FeatureType_DancePerformance: return "dance performance" case FeatureType_Images: return "images" case FeatureType_IncenseBurning: return "incense burning" case FeatureType_MusicalPerformance: return "musical performance" case FeatureType_OrderOfPrecedence: return "order of precedence" case FeatureType_PoetryRecital: return "poetry recital" case FeatureType_Storytelling: return "storytelling" case FeatureType_TheGivingOfItems: return "the giving of items" case FeatureType_TheSacrificeOfItems: return "the sacrifice of items" } return "unknown" } func (s FeatureType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Feature struct { Reference int `json:"reference" legend:"plus"` // reference Type FeatureType `json:"type" legend:"plus"` // type } func (x *Feature) RelatedToEntity(id int) bool { return false } func (x *Feature) RelatedToHf(id int) bool { return false } func (x *Feature) CheckFields() { } type HfLinkLinkType int const ( HfLinkLinkType_Unknown HfLinkLinkType = iota HfLinkLinkType_Apprentice HfLinkLinkType_Child HfLinkLinkType_Companion HfLinkLinkType_DeceasedSpouse HfLinkLinkType_Deity HfLinkLinkType_Father HfLinkLinkType_FormerApprentice HfLinkLinkType_FormerMaster HfLinkLinkType_FormerSpouse HfLinkLinkType_Lover HfLinkLinkType_Master HfLinkLinkType_Mother HfLinkLinkType_PetOwner HfLinkLinkType_Spouse ) func parseHfLinkLinkType(s string) HfLinkLinkType { switch s { case "apprentice": return HfLinkLinkType_Apprentice case "child": return HfLinkLinkType_Child case "companion": return HfLinkLinkType_Companion case "deceased spouse": return HfLinkLinkType_DeceasedSpouse case "deity": return HfLinkLinkType_Deity case "father": return HfLinkLinkType_Father case "former apprentice": return HfLinkLinkType_FormerApprentice case "former master": return HfLinkLinkType_FormerMaster case "former spouse": return HfLinkLinkType_FormerSpouse case "lover": return HfLinkLinkType_Lover case "master": return HfLinkLinkType_Master case "mother": return HfLinkLinkType_Mother case "pet owner": return HfLinkLinkType_PetOwner case "spouse": return HfLinkLinkType_Spouse } return HfLinkLinkType_Unknown } func (s HfLinkLinkType) String() string { switch s { case HfLinkLinkType_Apprentice: return "apprentice" case HfLinkLinkType_Child: return "child" case HfLinkLinkType_Companion: return "companion" case HfLinkLinkType_DeceasedSpouse: return "deceased spouse" case HfLinkLinkType_Deity: return "deity" case HfLinkLinkType_Father: return "father" case HfLinkLinkType_FormerApprentice: return "former apprentice" case HfLinkLinkType_FormerMaster: return "former master" case HfLinkLinkType_FormerSpouse: return "former spouse" case HfLinkLinkType_Lover: return "lover" case HfLinkLinkType_Master: return "master" case HfLinkLinkType_Mother: return "mother" case HfLinkLinkType_PetOwner: return "pet owner" case HfLinkLinkType_Spouse: return "spouse" } return "unknown" } func (s HfLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HfLink struct { Hfid int `json:"hfid" legend:"base"` // hfid LinkStrength int `json:"linkStrength" legend:"base"` // link_strength LinkType HfLinkLinkType `json:"linkType" legend:"base"` // link_type } func (x *HfLink) RelatedToEntity(id int) bool { return false } func (x *HfLink) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HfLink) CheckFields() { } type HfSkill struct { Skill string `json:"skill" legend:"base"` // skill TotalIp int `json:"totalIp" legend:"base"` // total_ip } func (x *HfSkill) RelatedToEntity(id int) bool { return false } func (x *HfSkill) RelatedToHf(id int) bool { return false } func (x *HfSkill) CheckFields() { } type HistoricalEra struct { Name_ string `json:"name" legend:"base"` // name StartYear int `json:"startYear" legend:"base"` // start_year } func (x *HistoricalEra) Name() string { return x.Name_ } func (x *HistoricalEra) RelatedToEntity(id int) bool { return false } func (x *HistoricalEra) RelatedToHf(id int) bool { return false } func (x *HistoricalEra) CheckFields() { } type HistoricalEvent struct { Id_ int `json:"id" legend:"both"` // id Seconds72 int `json:"seconds72" legend:"base"` // seconds72 Year int `json:"year" legend:"base"` // year Details HistoricalEventDetails } func (x *HistoricalEvent) Id() int { return x.Id_ } func (x *HistoricalEvent) RelatedToEntity(id int) bool { return false } func (x *HistoricalEvent) RelatedToHf(id int) bool { return false } func (x *HistoricalEvent) CheckFields() { } type HistoricalEventAddHfEntityHonor struct { EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid HonorId int `json:"honorId" legend:"base"` // honor_id } func (x *HistoricalEventAddHfEntityHonor) Type() string { return "add hf entity honor" } func (x *HistoricalEventAddHfEntityHonor) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventAddHfEntityHonor) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventAddHfEntityHonor) CheckFields() { } type HistoricalEventAddHfEntityLinkLink int const ( HistoricalEventAddHfEntityLinkLink_Unknown HistoricalEventAddHfEntityLinkLink = iota HistoricalEventAddHfEntityLinkLink_Enemy HistoricalEventAddHfEntityLinkLink_Member HistoricalEventAddHfEntityLinkLink_Position HistoricalEventAddHfEntityLinkLink_Prisoner HistoricalEventAddHfEntityLinkLink_Slave HistoricalEventAddHfEntityLinkLink_Squad ) func parseHistoricalEventAddHfEntityLinkLink(s string) HistoricalEventAddHfEntityLinkLink { switch s { case "enemy": return HistoricalEventAddHfEntityLinkLink_Enemy case "member": return HistoricalEventAddHfEntityLinkLink_Member case "position": return HistoricalEventAddHfEntityLinkLink_Position case "prisoner": return HistoricalEventAddHfEntityLinkLink_Prisoner case "slave": return HistoricalEventAddHfEntityLinkLink_Slave case "squad": return HistoricalEventAddHfEntityLinkLink_Squad } return HistoricalEventAddHfEntityLinkLink_Unknown } func (s HistoricalEventAddHfEntityLinkLink) String() string { switch s { case HistoricalEventAddHfEntityLinkLink_Enemy: return "enemy" case HistoricalEventAddHfEntityLinkLink_Member: return "member" case HistoricalEventAddHfEntityLinkLink_Position: return "position" case HistoricalEventAddHfEntityLinkLink_Prisoner: return "prisoner" case HistoricalEventAddHfEntityLinkLink_Slave: return "slave" case HistoricalEventAddHfEntityLinkLink_Squad: return "squad" } return "unknown" } func (s HistoricalEventAddHfEntityLinkLink) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAddHfEntityLinkLinkType int const ( HistoricalEventAddHfEntityLinkLinkType_Unknown HistoricalEventAddHfEntityLinkLinkType = iota HistoricalEventAddHfEntityLinkLinkType_Enemy HistoricalEventAddHfEntityLinkLinkType_Member HistoricalEventAddHfEntityLinkLinkType_Position HistoricalEventAddHfEntityLinkLinkType_Prisoner HistoricalEventAddHfEntityLinkLinkType_Slave ) func parseHistoricalEventAddHfEntityLinkLinkType(s string) HistoricalEventAddHfEntityLinkLinkType { switch s { case "enemy": return HistoricalEventAddHfEntityLinkLinkType_Enemy case "member": return HistoricalEventAddHfEntityLinkLinkType_Member case "position": return HistoricalEventAddHfEntityLinkLinkType_Position case "prisoner": return HistoricalEventAddHfEntityLinkLinkType_Prisoner case "slave": return HistoricalEventAddHfEntityLinkLinkType_Slave } return HistoricalEventAddHfEntityLinkLinkType_Unknown } func (s HistoricalEventAddHfEntityLinkLinkType) String() string { switch s { case HistoricalEventAddHfEntityLinkLinkType_Enemy: return "enemy" case HistoricalEventAddHfEntityLinkLinkType_Member: return "member" case HistoricalEventAddHfEntityLinkLinkType_Position: return "position" case HistoricalEventAddHfEntityLinkLinkType_Prisoner: return "prisoner" case HistoricalEventAddHfEntityLinkLinkType_Slave: return "slave" } return "unknown" } func (s HistoricalEventAddHfEntityLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAddHfEntityLink struct { AppointerHfid int `json:"appointerHfid" legend:"both"` // appointer_hfid CivId int `json:"civId" legend:"base"` // civ_id Hfid int `json:"hfid" legend:"base"` // hfid Link HistoricalEventAddHfEntityLinkLink `json:"link" legend:"base"` // link Position string `json:"position" legend:"plus"` // position PositionId int `json:"positionId" legend:"base"` // position_id PromiseToHfid int `json:"promiseToHfid" legend:"both"` // promise_to_hfid } func (x *HistoricalEventAddHfEntityLink) Type() string { return "add hf entity link" } func (x *HistoricalEventAddHfEntityLink) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventAddHfEntityLink) RelatedToHf(id int) bool { return x.AppointerHfid == id || x.Hfid == id || x.PromiseToHfid == id } func (x *HistoricalEventAddHfEntityLink) CheckFields() { } type HistoricalEventAddHfHfLinkLinkType int const ( HistoricalEventAddHfHfLinkLinkType_Unknown HistoricalEventAddHfHfLinkLinkType = iota HistoricalEventAddHfHfLinkLinkType_Apprentice HistoricalEventAddHfHfLinkLinkType_Deity HistoricalEventAddHfHfLinkLinkType_FormerMaster HistoricalEventAddHfHfLinkLinkType_Lover HistoricalEventAddHfHfLinkLinkType_Master HistoricalEventAddHfHfLinkLinkType_PetOwner HistoricalEventAddHfHfLinkLinkType_Prisoner HistoricalEventAddHfHfLinkLinkType_Spouse ) func parseHistoricalEventAddHfHfLinkLinkType(s string) HistoricalEventAddHfHfLinkLinkType { switch s { case "apprentice": return HistoricalEventAddHfHfLinkLinkType_Apprentice case "deity": return HistoricalEventAddHfHfLinkLinkType_Deity case "former_master": return HistoricalEventAddHfHfLinkLinkType_FormerMaster case "lover": return HistoricalEventAddHfHfLinkLinkType_Lover case "master": return HistoricalEventAddHfHfLinkLinkType_Master case "pet_owner": return HistoricalEventAddHfHfLinkLinkType_PetOwner case "prisoner": return HistoricalEventAddHfHfLinkLinkType_Prisoner case "spouse": return HistoricalEventAddHfHfLinkLinkType_Spouse } return HistoricalEventAddHfHfLinkLinkType_Unknown } func (s HistoricalEventAddHfHfLinkLinkType) String() string { switch s { case HistoricalEventAddHfHfLinkLinkType_Apprentice: return "apprentice" case HistoricalEventAddHfHfLinkLinkType_Deity: return "deity" case HistoricalEventAddHfHfLinkLinkType_FormerMaster: return "former master" case HistoricalEventAddHfHfLinkLinkType_Lover: return "lover" case HistoricalEventAddHfHfLinkLinkType_Master: return "master" case HistoricalEventAddHfHfLinkLinkType_PetOwner: return "pet owner" case HistoricalEventAddHfHfLinkLinkType_Prisoner: return "prisoner" case HistoricalEventAddHfHfLinkLinkType_Spouse: return "spouse" } return "unknown" } func (s HistoricalEventAddHfHfLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAddHfHfLink struct { Hfid int `json:"hfid" legend:"base"` // hfid HfidTarget int `json:"hfidTarget" legend:"base"` // hfid_target LinkType HistoricalEventAddHfHfLinkLinkType `json:"linkType" legend:"plus"` // link_type } func (x *HistoricalEventAddHfHfLink) Type() string { return "add hf hf link" } func (x *HistoricalEventAddHfHfLink) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventAddHfHfLink) RelatedToHf(id int) bool { return x.Hfid == id || x.HfidTarget == id } func (x *HistoricalEventAddHfHfLink) CheckFields() { } type HistoricalEventAddHfSiteLinkLinkType int const ( HistoricalEventAddHfSiteLinkLinkType_Unknown HistoricalEventAddHfSiteLinkLinkType = iota HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding HistoricalEventAddHfSiteLinkLinkType_Occupation HistoricalEventAddHfSiteLinkLinkType_SeatOfPower ) func parseHistoricalEventAddHfSiteLinkLinkType(s string) HistoricalEventAddHfSiteLinkLinkType { switch s { case "home_site_abstract_building": return HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding case "occupation": return HistoricalEventAddHfSiteLinkLinkType_Occupation case "seat_of_power": return HistoricalEventAddHfSiteLinkLinkType_SeatOfPower } return HistoricalEventAddHfSiteLinkLinkType_Unknown } func (s HistoricalEventAddHfSiteLinkLinkType) String() string { switch s { case HistoricalEventAddHfSiteLinkLinkType_HomeSiteAbstractBuilding: return "home site abstract building" case HistoricalEventAddHfSiteLinkLinkType_Occupation: return "occupation" case HistoricalEventAddHfSiteLinkLinkType_SeatOfPower: return "seat of power" } return "unknown" } func (s HistoricalEventAddHfSiteLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAddHfSiteLink struct { Civ int `json:"civ" legend:"plus"` // civ Histfig int `json:"histfig" legend:"plus"` // histfig LinkType HistoricalEventAddHfSiteLinkLinkType `json:"linkType" legend:"plus"` // link_type SiteId int `json:"siteId" legend:"base"` // site_id Structure int `json:"structure" legend:"plus"` // structure } func (x *HistoricalEventAddHfSiteLink) Type() string { return "add hf site link" } func (x *HistoricalEventAddHfSiteLink) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventAddHfSiteLink) RelatedToHf(id int) bool { return x.Histfig == id } func (x *HistoricalEventAddHfSiteLink) CheckFields() { if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 { sameFields["HistoricalEventAddHfSiteLink"]["Civ"]["SiteId"] = false } if x.Histfig != x.SiteId && x.Histfig != 0 && x.SiteId != 0 { sameFields["HistoricalEventAddHfSiteLink"]["Histfig"]["SiteId"] = false } if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 { sameFields["HistoricalEventAddHfSiteLink"]["Structure"]["SiteId"] = false } } type HistoricalEventAgreementFormedAction int const ( HistoricalEventAgreementFormedAction_Unknown HistoricalEventAgreementFormedAction = iota HistoricalEventAgreementFormedAction_BribeOfficial HistoricalEventAgreementFormedAction_InduceToEmbezzle ) func parseHistoricalEventAgreementFormedAction(s string) HistoricalEventAgreementFormedAction { switch s { case "bribe official": return HistoricalEventAgreementFormedAction_BribeOfficial case "induce to embezzle": return HistoricalEventAgreementFormedAction_InduceToEmbezzle } return HistoricalEventAgreementFormedAction_Unknown } func (s HistoricalEventAgreementFormedAction) String() string { switch s { case HistoricalEventAgreementFormedAction_BribeOfficial: return "bribe official" case HistoricalEventAgreementFormedAction_InduceToEmbezzle: return "induce to embezzle" } return "unknown" } func (s HistoricalEventAgreementFormedAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAgreementFormedMethod int const ( HistoricalEventAgreementFormedMethod_Unknown HistoricalEventAgreementFormedMethod = iota HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement HistoricalEventAgreementFormedMethod_Bribe HistoricalEventAgreementFormedMethod_Flatter HistoricalEventAgreementFormedMethod_Intimidate HistoricalEventAgreementFormedMethod_OfferImmortality HistoricalEventAgreementFormedMethod_Precedence HistoricalEventAgreementFormedMethod_ReligiousSympathy HistoricalEventAgreementFormedMethod_RevengeOnGrudge ) func parseHistoricalEventAgreementFormedMethod(s string) HistoricalEventAgreementFormedMethod { switch s { case "blackmail over embezzlement": return HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement case "bribe": return HistoricalEventAgreementFormedMethod_Bribe case "flatter": return HistoricalEventAgreementFormedMethod_Flatter case "intimidate": return HistoricalEventAgreementFormedMethod_Intimidate case "offer immortality": return HistoricalEventAgreementFormedMethod_OfferImmortality case "precedence": return HistoricalEventAgreementFormedMethod_Precedence case "religious sympathy": return HistoricalEventAgreementFormedMethod_ReligiousSympathy case "revenge on grudge": return HistoricalEventAgreementFormedMethod_RevengeOnGrudge } return HistoricalEventAgreementFormedMethod_Unknown } func (s HistoricalEventAgreementFormedMethod) String() string { switch s { case HistoricalEventAgreementFormedMethod_BlackmailOverEmbezzlement: return "blackmail over embezzlement" case HistoricalEventAgreementFormedMethod_Bribe: return "bribe" case HistoricalEventAgreementFormedMethod_Flatter: return "flatter" case HistoricalEventAgreementFormedMethod_Intimidate: return "intimidate" case HistoricalEventAgreementFormedMethod_OfferImmortality: return "offer immortality" case HistoricalEventAgreementFormedMethod_Precedence: return "precedence" case HistoricalEventAgreementFormedMethod_ReligiousSympathy: return "religious sympathy" case HistoricalEventAgreementFormedMethod_RevengeOnGrudge: return "revenge on grudge" } return "unknown" } func (s HistoricalEventAgreementFormedMethod) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAgreementFormedReason int const ( HistoricalEventAgreementFormedReason_Unknown HistoricalEventAgreementFormedReason = iota HistoricalEventAgreementFormedReason_ReunitedWithLovedOne HistoricalEventAgreementFormedReason_ViolentDisagreement HistoricalEventAgreementFormedReason_Whim ) func parseHistoricalEventAgreementFormedReason(s string) HistoricalEventAgreementFormedReason { switch s { case "reunited with loved one": return HistoricalEventAgreementFormedReason_ReunitedWithLovedOne case "violent disagreement": return HistoricalEventAgreementFormedReason_ViolentDisagreement case "whim": return HistoricalEventAgreementFormedReason_Whim } return HistoricalEventAgreementFormedReason_Unknown } func (s HistoricalEventAgreementFormedReason) String() string { switch s { case HistoricalEventAgreementFormedReason_ReunitedWithLovedOne: return "reunited with loved one" case HistoricalEventAgreementFormedReason_ViolentDisagreement: return "violent disagreement" case HistoricalEventAgreementFormedReason_Whim: return "whim" } return "unknown" } func (s HistoricalEventAgreementFormedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAgreementFormedTopFacet int const ( HistoricalEventAgreementFormedTopFacet_Unknown HistoricalEventAgreementFormedTopFacet = iota HistoricalEventAgreementFormedTopFacet_Ambition HistoricalEventAgreementFormedTopFacet_AnxietyPropensity HistoricalEventAgreementFormedTopFacet_Confidence HistoricalEventAgreementFormedTopFacet_EnvyPropensity HistoricalEventAgreementFormedTopFacet_Fearlessness HistoricalEventAgreementFormedTopFacet_Greed HistoricalEventAgreementFormedTopFacet_Hope HistoricalEventAgreementFormedTopFacet_Pride HistoricalEventAgreementFormedTopFacet_StressVulnerability HistoricalEventAgreementFormedTopFacet_Swayable HistoricalEventAgreementFormedTopFacet_Vanity HistoricalEventAgreementFormedTopFacet_Vengeful ) func parseHistoricalEventAgreementFormedTopFacet(s string) HistoricalEventAgreementFormedTopFacet { switch s { case "ambition": return HistoricalEventAgreementFormedTopFacet_Ambition case "anxiety propensity": return HistoricalEventAgreementFormedTopFacet_AnxietyPropensity case "confidence": return HistoricalEventAgreementFormedTopFacet_Confidence case "envy propensity": return HistoricalEventAgreementFormedTopFacet_EnvyPropensity case "fearlessness": return HistoricalEventAgreementFormedTopFacet_Fearlessness case "greed": return HistoricalEventAgreementFormedTopFacet_Greed case "hope": return HistoricalEventAgreementFormedTopFacet_Hope case "pride": return HistoricalEventAgreementFormedTopFacet_Pride case "stress vulnerability": return HistoricalEventAgreementFormedTopFacet_StressVulnerability case "swayable": return HistoricalEventAgreementFormedTopFacet_Swayable case "vanity": return HistoricalEventAgreementFormedTopFacet_Vanity case "vengeful": return HistoricalEventAgreementFormedTopFacet_Vengeful } return HistoricalEventAgreementFormedTopFacet_Unknown } func (s HistoricalEventAgreementFormedTopFacet) String() string { switch s { case HistoricalEventAgreementFormedTopFacet_Ambition: return "ambition" case HistoricalEventAgreementFormedTopFacet_AnxietyPropensity: return "anxiety propensity" case HistoricalEventAgreementFormedTopFacet_Confidence: return "confidence" case HistoricalEventAgreementFormedTopFacet_EnvyPropensity: return "envy propensity" case HistoricalEventAgreementFormedTopFacet_Fearlessness: return "fearlessness" case HistoricalEventAgreementFormedTopFacet_Greed: return "greed" case HistoricalEventAgreementFormedTopFacet_Hope: return "hope" case HistoricalEventAgreementFormedTopFacet_Pride: return "pride" case HistoricalEventAgreementFormedTopFacet_StressVulnerability: return "stress vulnerability" case HistoricalEventAgreementFormedTopFacet_Swayable: return "swayable" case HistoricalEventAgreementFormedTopFacet_Vanity: return "vanity" case HistoricalEventAgreementFormedTopFacet_Vengeful: return "vengeful" } return "unknown" } func (s HistoricalEventAgreementFormedTopFacet) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAgreementFormedTopRelationshipFactor int const ( HistoricalEventAgreementFormedTopRelationshipFactor_Unknown HistoricalEventAgreementFormedTopRelationshipFactor = iota HistoricalEventAgreementFormedTopRelationshipFactor_Fear HistoricalEventAgreementFormedTopRelationshipFactor_Love HistoricalEventAgreementFormedTopRelationshipFactor_Respect HistoricalEventAgreementFormedTopRelationshipFactor_Trust ) func parseHistoricalEventAgreementFormedTopRelationshipFactor(s string) HistoricalEventAgreementFormedTopRelationshipFactor { switch s { case "fear": return HistoricalEventAgreementFormedTopRelationshipFactor_Fear case "love": return HistoricalEventAgreementFormedTopRelationshipFactor_Love case "respect": return HistoricalEventAgreementFormedTopRelationshipFactor_Respect case "trust": return HistoricalEventAgreementFormedTopRelationshipFactor_Trust } return HistoricalEventAgreementFormedTopRelationshipFactor_Unknown } func (s HistoricalEventAgreementFormedTopRelationshipFactor) String() string { switch s { case HistoricalEventAgreementFormedTopRelationshipFactor_Fear: return "fear" case HistoricalEventAgreementFormedTopRelationshipFactor_Love: return "love" case HistoricalEventAgreementFormedTopRelationshipFactor_Respect: return "respect" case HistoricalEventAgreementFormedTopRelationshipFactor_Trust: return "trust" } return "unknown" } func (s HistoricalEventAgreementFormedTopRelationshipFactor) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAgreementFormedTopValue int const ( HistoricalEventAgreementFormedTopValue_Unknown HistoricalEventAgreementFormedTopValue = iota HistoricalEventAgreementFormedTopValue_Law HistoricalEventAgreementFormedTopValue_Power ) func parseHistoricalEventAgreementFormedTopValue(s string) HistoricalEventAgreementFormedTopValue { switch s { case "law": return HistoricalEventAgreementFormedTopValue_Law case "power": return HistoricalEventAgreementFormedTopValue_Power } return HistoricalEventAgreementFormedTopValue_Unknown } func (s HistoricalEventAgreementFormedTopValue) String() string { switch s { case HistoricalEventAgreementFormedTopValue_Law: return "law" case HistoricalEventAgreementFormedTopValue_Power: return "power" } return "unknown" } func (s HistoricalEventAgreementFormedTopValue) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventAgreementFormed struct { Action HistoricalEventAgreementFormedAction `json:"action" legend:"base"` // action AgreementId int `json:"agreementId" legend:"base"` // agreement_id AgreementSubjectId int `json:"agreementSubjectId" legend:"base"` // agreement_subject_id AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus ConcluderHfid int `json:"concluderHfid" legend:"base"` // concluder_hfid Delegated bool `json:"delegated" legend:"base"` // delegated FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test Method HistoricalEventAgreementFormedMethod `json:"method" legend:"base"` // method Reason HistoricalEventAgreementFormedReason `json:"reason" legend:"base"` // reason RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id Successful bool `json:"successful" legend:"base"` // successful TopFacet HistoricalEventAgreementFormedTopFacet `json:"topFacet" legend:"base"` // top_facet TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating TopRelationshipFactor HistoricalEventAgreementFormedTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating TopValue HistoricalEventAgreementFormedTopValue `json:"topValue" legend:"base"` // top_value TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating } func (x *HistoricalEventAgreementFormed) Type() string { return "agreement formed" } func (x *HistoricalEventAgreementFormed) RelatedToEntity(id int) bool { return x.RelevantEntityId == id } func (x *HistoricalEventAgreementFormed) RelatedToHf(id int) bool { return x.ConcluderHfid == id } func (x *HistoricalEventAgreementFormed) CheckFields() { } type HistoricalEventAgreementMade struct { SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventAgreementMade) Type() string { return "agreement made" } func (x *HistoricalEventAgreementMade) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventAgreementMade) RelatedToHf(id int) bool { return false } func (x *HistoricalEventAgreementMade) CheckFields() { } type HistoricalEventAgreementRejected struct { SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventAgreementRejected) Type() string { return "agreement rejected" } func (x *HistoricalEventAgreementRejected) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventAgreementRejected) RelatedToHf(id int) bool { return false } func (x *HistoricalEventAgreementRejected) CheckFields() { } type HistoricalEventArtifactClaimFormedCircumstance int const ( HistoricalEventArtifactClaimFormedCircumstance_Unknown HistoricalEventArtifactClaimFormedCircumstance = iota HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission HistoricalEventArtifactClaimFormedCircumstance_FromAfar ) func parseHistoricalEventArtifactClaimFormedCircumstance(s string) HistoricalEventArtifactClaimFormedCircumstance { switch s { case "during an infiltration mission": return HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission case "from afar": return HistoricalEventArtifactClaimFormedCircumstance_FromAfar } return HistoricalEventArtifactClaimFormedCircumstance_Unknown } func (s HistoricalEventArtifactClaimFormedCircumstance) String() string { switch s { case HistoricalEventArtifactClaimFormedCircumstance_DuringAnInfiltrationMission: return "during an infiltration mission" case HistoricalEventArtifactClaimFormedCircumstance_FromAfar: return "from afar" } return "unknown" } func (s HistoricalEventArtifactClaimFormedCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactClaimFormedClaim int const ( HistoricalEventArtifactClaimFormedClaim_Unknown HistoricalEventArtifactClaimFormedClaim = iota HistoricalEventArtifactClaimFormedClaim_Heirloom HistoricalEventArtifactClaimFormedClaim_Symbol HistoricalEventArtifactClaimFormedClaim_Treasure ) func parseHistoricalEventArtifactClaimFormedClaim(s string) HistoricalEventArtifactClaimFormedClaim { switch s { case "heirloom": return HistoricalEventArtifactClaimFormedClaim_Heirloom case "symbol": return HistoricalEventArtifactClaimFormedClaim_Symbol case "treasure": return HistoricalEventArtifactClaimFormedClaim_Treasure } return HistoricalEventArtifactClaimFormedClaim_Unknown } func (s HistoricalEventArtifactClaimFormedClaim) String() string { switch s { case HistoricalEventArtifactClaimFormedClaim_Heirloom: return "heirloom" case HistoricalEventArtifactClaimFormedClaim_Symbol: return "symbol" case HistoricalEventArtifactClaimFormedClaim_Treasure: return "treasure" } return "unknown" } func (s HistoricalEventArtifactClaimFormedClaim) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactClaimFormed struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id Circumstance HistoricalEventArtifactClaimFormedCircumstance `json:"circumstance" legend:"base"` // circumstance Claim HistoricalEventArtifactClaimFormedClaim `json:"claim" legend:"base"` // claim EntityId int `json:"entityId" legend:"base"` // entity_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id } func (x *HistoricalEventArtifactClaimFormed) Type() string { return "artifact claim formed" } func (x *HistoricalEventArtifactClaimFormed) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventArtifactClaimFormed) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventArtifactClaimFormed) CheckFields() { } type HistoricalEventArtifactCopied struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id DestEntityId int `json:"destEntityId" legend:"base"` // dest_entity_id DestSiteId int `json:"destSiteId" legend:"base"` // dest_site_id DestStructureId int `json:"destStructureId" legend:"base"` // dest_structure_id FromOriginal bool `json:"fromOriginal" legend:"base"` // from_original SourceEntityId int `json:"sourceEntityId" legend:"base"` // source_entity_id SourceSiteId int `json:"sourceSiteId" legend:"base"` // source_site_id SourceStructureId int `json:"sourceStructureId" legend:"base"` // source_structure_id } func (x *HistoricalEventArtifactCopied) Type() string { return "artifact copied" } func (x *HistoricalEventArtifactCopied) RelatedToEntity(id int) bool { return x.DestEntityId == id || x.SourceEntityId == id } func (x *HistoricalEventArtifactCopied) RelatedToHf(id int) bool { return false } func (x *HistoricalEventArtifactCopied) CheckFields() { } type HistoricalEventArtifactCreatedReason int const ( HistoricalEventArtifactCreatedReason_Unknown HistoricalEventArtifactCreatedReason = iota HistoricalEventArtifactCreatedReason_SanctifyHf ) func parseHistoricalEventArtifactCreatedReason(s string) HistoricalEventArtifactCreatedReason { switch s { case "sanctify_hf": return HistoricalEventArtifactCreatedReason_SanctifyHf } return HistoricalEventArtifactCreatedReason_Unknown } func (s HistoricalEventArtifactCreatedReason) String() string { switch s { case HistoricalEventArtifactCreatedReason_SanctifyHf: return "sanctify hf" } return "unknown" } func (s HistoricalEventArtifactCreatedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactCreated struct { ArtifactId int `json:"artifactId" legend:"both"` // artifact_id Circumstance *HistoricalEventArtifactCreatedCircumstance `json:"circumstance" legend:"plus"` // circumstance HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id NameOnly bool `json:"nameOnly" legend:"base"` // name_only Reason HistoricalEventArtifactCreatedReason `json:"reason" legend:"plus"` // reason SanctifyHf int `json:"sanctifyHf" legend:"plus"` // sanctify_hf SiteId int `json:"siteId" legend:"base"` // site_id UnitId int `json:"unitId" legend:"base"` // unit_id } func (x *HistoricalEventArtifactCreated) Type() string { return "artifact created" } func (x *HistoricalEventArtifactCreated) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactCreated) RelatedToHf(id int) bool { return x.HistFigureId == id || x.SanctifyHf == id } func (x *HistoricalEventArtifactCreated) CheckFields() { if x.SanctifyHf != x.HistFigureId && x.SanctifyHf != 0 && x.HistFigureId != 0 { sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["HistFigureId"] = false } if x.SanctifyHf != x.SiteId && x.SanctifyHf != 0 && x.SiteId != 0 { sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["SiteId"] = false } if x.SanctifyHf != x.UnitId && x.SanctifyHf != 0 && x.UnitId != 0 { sameFields["HistoricalEventArtifactCreated"]["SanctifyHf"]["UnitId"] = false } } type HistoricalEventArtifactCreatedCircumstanceType int const ( HistoricalEventArtifactCreatedCircumstanceType_Unknown HistoricalEventArtifactCreatedCircumstanceType = iota HistoricalEventArtifactCreatedCircumstanceType_Defeated HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession HistoricalEventArtifactCreatedCircumstanceType_Preservebody ) func parseHistoricalEventArtifactCreatedCircumstanceType(s string) HistoricalEventArtifactCreatedCircumstanceType { switch s { case "defeated": return HistoricalEventArtifactCreatedCircumstanceType_Defeated case "favoritepossession": return HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession case "preservebody": return HistoricalEventArtifactCreatedCircumstanceType_Preservebody } return HistoricalEventArtifactCreatedCircumstanceType_Unknown } func (s HistoricalEventArtifactCreatedCircumstanceType) String() string { switch s { case HistoricalEventArtifactCreatedCircumstanceType_Defeated: return "defeated" case HistoricalEventArtifactCreatedCircumstanceType_Favoritepossession: return "favoritepossession" case HistoricalEventArtifactCreatedCircumstanceType_Preservebody: return "preservebody" } return "unknown" } func (s HistoricalEventArtifactCreatedCircumstanceType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactCreatedCircumstance struct { Defeated int `json:"defeated" legend:"plus"` // defeated Type HistoricalEventArtifactCreatedCircumstanceType `json:"type" legend:"plus"` // type } func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactCreatedCircumstance) RelatedToHf(id int) bool { return false } func (x *HistoricalEventArtifactCreatedCircumstance) CheckFields() { } type HistoricalEventArtifactDestroyed struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id DestroyerEnid int `json:"destroyerEnid" legend:"base"` // destroyer_enid SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventArtifactDestroyed) Type() string { return "artifact destroyed" } func (x *HistoricalEventArtifactDestroyed) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactDestroyed) RelatedToHf(id int) bool { return false } func (x *HistoricalEventArtifactDestroyed) CheckFields() { } type HistoricalEventArtifactFound struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id SiteId int `json:"siteId" legend:"base"` // site_id UnitId int `json:"unitId" legend:"base"` // unit_id } func (x *HistoricalEventArtifactFound) Type() string { return "artifact found" } func (x *HistoricalEventArtifactFound) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactFound) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventArtifactFound) CheckFields() { } type HistoricalEventArtifactGivenReason int const ( HistoricalEventArtifactGivenReason_Unknown HistoricalEventArtifactGivenReason = iota HistoricalEventArtifactGivenReason_PartOfTradeNegotiation ) func parseHistoricalEventArtifactGivenReason(s string) HistoricalEventArtifactGivenReason { switch s { case "part of trade negotiation": return HistoricalEventArtifactGivenReason_PartOfTradeNegotiation } return HistoricalEventArtifactGivenReason_Unknown } func (s HistoricalEventArtifactGivenReason) String() string { switch s { case HistoricalEventArtifactGivenReason_PartOfTradeNegotiation: return "part of trade negotiation" } return "unknown" } func (s HistoricalEventArtifactGivenReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactGiven struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id GiverEntityId int `json:"giverEntityId" legend:"base"` // giver_entity_id GiverHistFigureId int `json:"giverHistFigureId" legend:"base"` // giver_hist_figure_id Reason HistoricalEventArtifactGivenReason `json:"reason" legend:"base"` // reason ReceiverEntityId int `json:"receiverEntityId" legend:"base"` // receiver_entity_id ReceiverHistFigureId int `json:"receiverHistFigureId" legend:"base"` // receiver_hist_figure_id } func (x *HistoricalEventArtifactGiven) Type() string { return "artifact given" } func (x *HistoricalEventArtifactGiven) RelatedToEntity(id int) bool { return x.GiverEntityId == id || x.ReceiverEntityId == id } func (x *HistoricalEventArtifactGiven) RelatedToHf(id int) bool { return x.GiverHistFigureId == id || x.ReceiverHistFigureId == id } func (x *HistoricalEventArtifactGiven) CheckFields() { } type HistoricalEventArtifactLost struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id SiteId int `json:"siteId" legend:"base"` // site_id SitePropertyId int `json:"sitePropertyId" legend:"base"` // site_property_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventArtifactLost) Type() string { return "artifact lost" } func (x *HistoricalEventArtifactLost) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactLost) RelatedToHf(id int) bool { return false } func (x *HistoricalEventArtifactLost) CheckFields() { } type HistoricalEventArtifactPossessedCircumstance int const ( HistoricalEventArtifactPossessedCircumstance_Unknown HistoricalEventArtifactPossessedCircumstance = iota HistoricalEventArtifactPossessedCircumstance_HfIsDead ) func parseHistoricalEventArtifactPossessedCircumstance(s string) HistoricalEventArtifactPossessedCircumstance { switch s { case "hf is dead": return HistoricalEventArtifactPossessedCircumstance_HfIsDead } return HistoricalEventArtifactPossessedCircumstance_Unknown } func (s HistoricalEventArtifactPossessedCircumstance) String() string { switch s { case HistoricalEventArtifactPossessedCircumstance_HfIsDead: return "hf is dead" } return "unknown" } func (s HistoricalEventArtifactPossessedCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactPossessedReason int const ( HistoricalEventArtifactPossessedReason_Unknown HistoricalEventArtifactPossessedReason = iota HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition ) func parseHistoricalEventArtifactPossessedReason(s string) HistoricalEventArtifactPossessedReason { switch s { case "artifact is heirloom of family hfid": return HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid case "artifact is symbol of entity position": return HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition } return HistoricalEventArtifactPossessedReason_Unknown } func (s HistoricalEventArtifactPossessedReason) String() string { switch s { case HistoricalEventArtifactPossessedReason_ArtifactIsHeirloomOfFamilyHfid: return "artifact is heirloom of family hfid" case HistoricalEventArtifactPossessedReason_ArtifactIsSymbolOfEntityPosition: return "artifact is symbol of entity position" } return "unknown" } func (s HistoricalEventArtifactPossessedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventArtifactPossessed struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id Circumstance HistoricalEventArtifactPossessedCircumstance `json:"circumstance" legend:"base"` // circumstance CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id Reason HistoricalEventArtifactPossessedReason `json:"reason" legend:"base"` // reason ReasonId int `json:"reasonId" legend:"base"` // reason_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id UnitId int `json:"unitId" legend:"base"` // unit_id } func (x *HistoricalEventArtifactPossessed) Type() string { return "artifact possessed" } func (x *HistoricalEventArtifactPossessed) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactPossessed) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventArtifactPossessed) CheckFields() { } type HistoricalEventArtifactRecovered struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id UnitId int `json:"unitId" legend:"base"` // unit_id } func (x *HistoricalEventArtifactRecovered) Type() string { return "artifact recovered" } func (x *HistoricalEventArtifactRecovered) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactRecovered) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventArtifactRecovered) CheckFields() { } type HistoricalEventArtifactStored struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id SiteId int `json:"siteId" legend:"base"` // site_id UnitId int `json:"unitId" legend:"base"` // unit_id } func (x *HistoricalEventArtifactStored) Type() string { return "artifact stored" } func (x *HistoricalEventArtifactStored) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactStored) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventArtifactStored) CheckFields() { } type HistoricalEventArtifactTransformed struct { HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id NewArtifactId int `json:"newArtifactId" legend:"base"` // new_artifact_id OldArtifactId int `json:"oldArtifactId" legend:"base"` // old_artifact_id SiteId int `json:"siteId" legend:"base"` // site_id UnitId int `json:"unitId" legend:"base"` // unit_id } func (x *HistoricalEventArtifactTransformed) Type() string { return "artifact transformed" } func (x *HistoricalEventArtifactTransformed) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventArtifactTransformed) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventArtifactTransformed) CheckFields() { } type HistoricalEventAssumeIdentity struct { IdentityCaste string `json:"identityCaste" legend:"plus"` // identity_caste IdentityId int `json:"identityId" legend:"base"` // identity_id IdentityName string `json:"identityName" legend:"plus"` // identity_name IdentityRace string `json:"identityRace" legend:"plus"` // identity_race TargetEnid int `json:"targetEnid" legend:"base"` // target_enid TricksterHfid int `json:"tricksterHfid" legend:"base"` // trickster_hfid } func (x *HistoricalEventAssumeIdentity) Type() string { return "assume identity" } func (x *HistoricalEventAssumeIdentity) RelatedToEntity(id int) bool { return x.IdentityId == id } func (x *HistoricalEventAssumeIdentity) RelatedToHf(id int) bool { return x.TricksterHfid == id } func (x *HistoricalEventAssumeIdentity) CheckFields() { } type HistoricalEventAttackedSite struct { ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` // attacker_general_hfid AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` // attacker_merc_enid DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` // defender_general_hfid DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` // defender_merc_enid SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventAttackedSite) Type() string { return "attacked site" } func (x *HistoricalEventAttackedSite) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventAttackedSite) RelatedToHf(id int) bool { return x.AttackerGeneralHfid == id || x.DefenderGeneralHfid == id } func (x *HistoricalEventAttackedSite) CheckFields() { } type HistoricalEventBodyAbusedAbuseType int const ( HistoricalEventBodyAbusedAbuseType_Unknown HistoricalEventBodyAbusedAbuseType = iota HistoricalEventBodyAbusedAbuseType_Animated HistoricalEventBodyAbusedAbuseType_Flayed HistoricalEventBodyAbusedAbuseType_Hung HistoricalEventBodyAbusedAbuseType_Impaled HistoricalEventBodyAbusedAbuseType_Mutilated HistoricalEventBodyAbusedAbuseType_Piled ) func parseHistoricalEventBodyAbusedAbuseType(s string) HistoricalEventBodyAbusedAbuseType { switch s { case "animated": return HistoricalEventBodyAbusedAbuseType_Animated case "flayed": return HistoricalEventBodyAbusedAbuseType_Flayed case "hung": return HistoricalEventBodyAbusedAbuseType_Hung case "impaled": return HistoricalEventBodyAbusedAbuseType_Impaled case "mutilated": return HistoricalEventBodyAbusedAbuseType_Mutilated case "piled": return HistoricalEventBodyAbusedAbuseType_Piled } return HistoricalEventBodyAbusedAbuseType_Unknown } func (s HistoricalEventBodyAbusedAbuseType) String() string { switch s { case HistoricalEventBodyAbusedAbuseType_Animated: return "animated" case HistoricalEventBodyAbusedAbuseType_Flayed: return "flayed" case HistoricalEventBodyAbusedAbuseType_Hung: return "hung" case HistoricalEventBodyAbusedAbuseType_Impaled: return "impaled" case HistoricalEventBodyAbusedAbuseType_Mutilated: return "mutilated" case HistoricalEventBodyAbusedAbuseType_Piled: return "piled" } return "unknown" } func (s HistoricalEventBodyAbusedAbuseType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventBodyAbusedItemSubtype int const ( HistoricalEventBodyAbusedItemSubtype_Unknown HistoricalEventBodyAbusedItemSubtype = iota HistoricalEventBodyAbusedItemSubtype_Pike HistoricalEventBodyAbusedItemSubtype_Spear ) func parseHistoricalEventBodyAbusedItemSubtype(s string) HistoricalEventBodyAbusedItemSubtype { switch s { case "pike": return HistoricalEventBodyAbusedItemSubtype_Pike case "spear": return HistoricalEventBodyAbusedItemSubtype_Spear } return HistoricalEventBodyAbusedItemSubtype_Unknown } func (s HistoricalEventBodyAbusedItemSubtype) String() string { switch s { case HistoricalEventBodyAbusedItemSubtype_Pike: return "pike" case HistoricalEventBodyAbusedItemSubtype_Spear: return "spear" } return "unknown" } func (s HistoricalEventBodyAbusedItemSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventBodyAbusedItemType int const ( HistoricalEventBodyAbusedItemType_Unknown HistoricalEventBodyAbusedItemType = iota HistoricalEventBodyAbusedItemType_Weapon ) func parseHistoricalEventBodyAbusedItemType(s string) HistoricalEventBodyAbusedItemType { switch s { case "weapon": return HistoricalEventBodyAbusedItemType_Weapon } return HistoricalEventBodyAbusedItemType_Unknown } func (s HistoricalEventBodyAbusedItemType) String() string { switch s { case HistoricalEventBodyAbusedItemType_Weapon: return "weapon" } return "unknown" } func (s HistoricalEventBodyAbusedItemType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventBodyAbusedPileType int const ( HistoricalEventBodyAbusedPileType_Unknown HistoricalEventBodyAbusedPileType = iota HistoricalEventBodyAbusedPileType_Grislymound HistoricalEventBodyAbusedPileType_Grotesquepillar HistoricalEventBodyAbusedPileType_Gruesomesculpture ) func parseHistoricalEventBodyAbusedPileType(s string) HistoricalEventBodyAbusedPileType { switch s { case "grislymound": return HistoricalEventBodyAbusedPileType_Grislymound case "grotesquepillar": return HistoricalEventBodyAbusedPileType_Grotesquepillar case "gruesomesculpture": return HistoricalEventBodyAbusedPileType_Gruesomesculpture } return HistoricalEventBodyAbusedPileType_Unknown } func (s HistoricalEventBodyAbusedPileType) String() string { switch s { case HistoricalEventBodyAbusedPileType_Grislymound: return "grislymound" case HistoricalEventBodyAbusedPileType_Grotesquepillar: return "grotesquepillar" case HistoricalEventBodyAbusedPileType_Gruesomesculpture: return "gruesomesculpture" } return "unknown" } func (s HistoricalEventBodyAbusedPileType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventBodyAbused struct { AbuseType HistoricalEventBodyAbusedAbuseType `json:"abuseType" legend:"plus"` // abuse_type Bodies []int `json:"bodies" legend:"plus"` // bodies Civ int `json:"civ" legend:"plus"` // civ Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Histfig int `json:"histfig" legend:"plus"` // histfig Interaction int `json:"interaction" legend:"plus"` // interaction ItemMat string `json:"itemMat" legend:"plus"` // item_mat ItemSubtype HistoricalEventBodyAbusedItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype ItemType HistoricalEventBodyAbusedItemType `json:"itemType" legend:"plus"` // item_type PileType HistoricalEventBodyAbusedPileType `json:"pileType" legend:"plus"` // pile_type SiteId int `json:"siteId" legend:"base"` // site_id Structure int `json:"structure" legend:"plus"` // structure SubregionId int `json:"subregionId" legend:"base"` // subregion_id Tree int `json:"tree" legend:"plus"` // tree VictimEntity int `json:"victimEntity" legend:"plus"` // victim_entity } func (x *HistoricalEventBodyAbused) Type() string { return "body abused" } func (x *HistoricalEventBodyAbused) RelatedToEntity(id int) bool { return x.VictimEntity == id } func (x *HistoricalEventBodyAbused) RelatedToHf(id int) bool { return containsInt(x.Bodies, id) || x.Histfig == id } func (x *HistoricalEventBodyAbused) CheckFields() { if x.Civ != x.FeatureLayerId && x.Civ != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventBodyAbused"]["Civ"]["FeatureLayerId"] = false } if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 { sameFields["HistoricalEventBodyAbused"]["Civ"]["SiteId"] = false } if x.Civ != x.SubregionId && x.Civ != 0 && x.SubregionId != 0 { sameFields["HistoricalEventBodyAbused"]["Civ"]["SubregionId"] = false } if x.Histfig != x.FeatureLayerId && x.Histfig != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventBodyAbused"]["Histfig"]["FeatureLayerId"] = false } if x.Histfig != x.SiteId && x.Histfig != 0 && x.SiteId != 0 { sameFields["HistoricalEventBodyAbused"]["Histfig"]["SiteId"] = false } if x.Histfig != x.SubregionId && x.Histfig != 0 && x.SubregionId != 0 { sameFields["HistoricalEventBodyAbused"]["Histfig"]["SubregionId"] = false } if x.Interaction != x.FeatureLayerId && x.Interaction != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventBodyAbused"]["Interaction"]["FeatureLayerId"] = false } if x.Interaction != x.SiteId && x.Interaction != 0 && x.SiteId != 0 { sameFields["HistoricalEventBodyAbused"]["Interaction"]["SiteId"] = false } if x.Interaction != x.SubregionId && x.Interaction != 0 && x.SubregionId != 0 { sameFields["HistoricalEventBodyAbused"]["Interaction"]["SubregionId"] = false } if x.ItemMat != x.Coords && x.ItemMat != "" && x.Coords != "" { sameFields["HistoricalEventBodyAbused"]["ItemMat"]["Coords"] = false } if x.Structure != x.FeatureLayerId && x.Structure != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventBodyAbused"]["Structure"]["FeatureLayerId"] = false } if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 { sameFields["HistoricalEventBodyAbused"]["Structure"]["SiteId"] = false } if x.Structure != x.SubregionId && x.Structure != 0 && x.SubregionId != 0 { sameFields["HistoricalEventBodyAbused"]["Structure"]["SubregionId"] = false } if x.Tree != x.FeatureLayerId && x.Tree != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventBodyAbused"]["Tree"]["FeatureLayerId"] = false } if x.Tree != x.SiteId && x.Tree != 0 && x.SiteId != 0 { sameFields["HistoricalEventBodyAbused"]["Tree"]["SiteId"] = false } if x.Tree != x.SubregionId && x.Tree != 0 && x.SubregionId != 0 { sameFields["HistoricalEventBodyAbused"]["Tree"]["SubregionId"] = false } if x.VictimEntity != x.FeatureLayerId && x.VictimEntity != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["FeatureLayerId"] = false } if x.VictimEntity != x.SiteId && x.VictimEntity != 0 && x.SiteId != 0 { sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["SiteId"] = false } if x.VictimEntity != x.SubregionId && x.VictimEntity != 0 && x.SubregionId != 0 { sameFields["HistoricalEventBodyAbused"]["VictimEntity"]["SubregionId"] = false } } type HistoricalEventBuildingProfileAcquired struct { AcquirerEnid int `json:"acquirerEnid" legend:"base"` // acquirer_enid AcquirerHfid int `json:"acquirerHfid" legend:"base"` // acquirer_hfid BuildingProfileId int `json:"buildingProfileId" legend:"base"` // building_profile_id Inherited bool `json:"inherited" legend:"base"` // inherited LastOwnerHfid int `json:"lastOwnerHfid" legend:"base"` // last_owner_hfid PurchasedUnowned bool `json:"purchasedUnowned" legend:"base"` // purchased_unowned RebuiltRuined bool `json:"rebuiltRuined" legend:"base"` // rebuilt_ruined SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventBuildingProfileAcquired) Type() string { return "building profile acquired" } func (x *HistoricalEventBuildingProfileAcquired) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventBuildingProfileAcquired) RelatedToHf(id int) bool { return x.AcquirerHfid == id || x.LastOwnerHfid == id } func (x *HistoricalEventBuildingProfileAcquired) CheckFields() { } type HistoricalEventCeremony struct { CivId int `json:"civId" legend:"base"` // civ_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id OccasionId int `json:"occasionId" legend:"base"` // occasion_id ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventCeremony) Type() string { return "ceremony" } func (x *HistoricalEventCeremony) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventCeremony) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCeremony) CheckFields() { } type HistoricalEventChangeHfBodyStateBodyState int const ( HistoricalEventChangeHfBodyStateBodyState_Unknown HistoricalEventChangeHfBodyStateBodyState = iota HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite ) func parseHistoricalEventChangeHfBodyStateBodyState(s string) HistoricalEventChangeHfBodyStateBodyState { switch s { case "entombed at site": return HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite } return HistoricalEventChangeHfBodyStateBodyState_Unknown } func (s HistoricalEventChangeHfBodyStateBodyState) String() string { switch s { case HistoricalEventChangeHfBodyStateBodyState_EntombedAtSite: return "entombed at site" } return "unknown" } func (s HistoricalEventChangeHfBodyStateBodyState) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventChangeHfBodyState struct { BodyState HistoricalEventChangeHfBodyStateBodyState `json:"bodyState" legend:"base"` // body_state Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Hfid int `json:"hfid" legend:"base"` // hfid SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventChangeHfBodyState) Type() string { return "change hf body state" } func (x *HistoricalEventChangeHfBodyState) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventChangeHfBodyState) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventChangeHfBodyState) CheckFields() { } type HistoricalEventChangeHfJob struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Hfid int `json:"hfid" legend:"both"` // hfid NewJob string `json:"newJob" legend:"plus"` // new_job OldJob string `json:"oldJob" legend:"plus"` // old_job SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventChangeHfJob) Type() string { return "change hf job" } func (x *HistoricalEventChangeHfJob) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventChangeHfJob) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventChangeHfJob) CheckFields() { } type HistoricalEventChangeHfStateMood int const ( HistoricalEventChangeHfStateMood_Unknown HistoricalEventChangeHfStateMood = iota HistoricalEventChangeHfStateMood_Berserk HistoricalEventChangeHfStateMood_Fell HistoricalEventChangeHfStateMood_Fey HistoricalEventChangeHfStateMood_Insane HistoricalEventChangeHfStateMood_Macabre HistoricalEventChangeHfStateMood_Melancholy HistoricalEventChangeHfStateMood_Possessed HistoricalEventChangeHfStateMood_Secretive ) func parseHistoricalEventChangeHfStateMood(s string) HistoricalEventChangeHfStateMood { switch s { case "berserk": return HistoricalEventChangeHfStateMood_Berserk case "fell": return HistoricalEventChangeHfStateMood_Fell case "fey": return HistoricalEventChangeHfStateMood_Fey case "insane": return HistoricalEventChangeHfStateMood_Insane case "macabre": return HistoricalEventChangeHfStateMood_Macabre case "melancholy": return HistoricalEventChangeHfStateMood_Melancholy case "possessed": return HistoricalEventChangeHfStateMood_Possessed case "secretive": return HistoricalEventChangeHfStateMood_Secretive } return HistoricalEventChangeHfStateMood_Unknown } func (s HistoricalEventChangeHfStateMood) String() string { switch s { case HistoricalEventChangeHfStateMood_Berserk: return "berserk" case HistoricalEventChangeHfStateMood_Fell: return "fell" case HistoricalEventChangeHfStateMood_Fey: return "fey" case HistoricalEventChangeHfStateMood_Insane: return "insane" case HistoricalEventChangeHfStateMood_Macabre: return "macabre" case HistoricalEventChangeHfStateMood_Melancholy: return "melancholy" case HistoricalEventChangeHfStateMood_Possessed: return "possessed" case HistoricalEventChangeHfStateMood_Secretive: return "secretive" } return "unknown" } func (s HistoricalEventChangeHfStateMood) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventChangeHfStateReason int const ( HistoricalEventChangeHfStateReason_Unknown HistoricalEventChangeHfStateReason = iota HistoricalEventChangeHfStateReason_BeWithMaster HistoricalEventChangeHfStateReason_ConvictionExile HistoricalEventChangeHfStateReason_ExiledAfterConviction HistoricalEventChangeHfStateReason_FailedMood HistoricalEventChangeHfStateReason_Flight HistoricalEventChangeHfStateReason_GatherInformation HistoricalEventChangeHfStateReason_GreatDealOfStress HistoricalEventChangeHfStateReason_LackOfSleep HistoricalEventChangeHfStateReason_None HistoricalEventChangeHfStateReason_OnAPilgrimage HistoricalEventChangeHfStateReason_Scholarship HistoricalEventChangeHfStateReason_UnableToLeaveLocation ) func parseHistoricalEventChangeHfStateReason(s string) HistoricalEventChangeHfStateReason { switch s { case "be with master": return HistoricalEventChangeHfStateReason_BeWithMaster case "be_with_master": return HistoricalEventChangeHfStateReason_BeWithMaster case "conviction_exile": return HistoricalEventChangeHfStateReason_ConvictionExile case "exiled after conviction": return HistoricalEventChangeHfStateReason_ExiledAfterConviction case "failed mood": return HistoricalEventChangeHfStateReason_FailedMood case "flight": return HistoricalEventChangeHfStateReason_Flight case "gather information": return HistoricalEventChangeHfStateReason_GatherInformation case "gather_information": return HistoricalEventChangeHfStateReason_GatherInformation case "great deal of stress": return HistoricalEventChangeHfStateReason_GreatDealOfStress case "lack of sleep": return HistoricalEventChangeHfStateReason_LackOfSleep case "none": return HistoricalEventChangeHfStateReason_None case "on a pilgrimage": return HistoricalEventChangeHfStateReason_OnAPilgrimage case "on_a_pilgrimage": return HistoricalEventChangeHfStateReason_OnAPilgrimage case "scholarship": return HistoricalEventChangeHfStateReason_Scholarship case "unable to leave location": return HistoricalEventChangeHfStateReason_UnableToLeaveLocation } return HistoricalEventChangeHfStateReason_Unknown } func (s HistoricalEventChangeHfStateReason) String() string { switch s { case HistoricalEventChangeHfStateReason_BeWithMaster: return "be with master" case HistoricalEventChangeHfStateReason_ConvictionExile: return "conviction exile" case HistoricalEventChangeHfStateReason_ExiledAfterConviction: return "exiled after conviction" case HistoricalEventChangeHfStateReason_FailedMood: return "failed mood" case HistoricalEventChangeHfStateReason_Flight: return "flight" case HistoricalEventChangeHfStateReason_GatherInformation: return "gather information" case HistoricalEventChangeHfStateReason_GreatDealOfStress: return "great deal of stress" case HistoricalEventChangeHfStateReason_LackOfSleep: return "lack of sleep" case HistoricalEventChangeHfStateReason_None: return "none" case HistoricalEventChangeHfStateReason_OnAPilgrimage: return "on a pilgrimage" case HistoricalEventChangeHfStateReason_Scholarship: return "scholarship" case HistoricalEventChangeHfStateReason_UnableToLeaveLocation: return "unable to leave location" } return "unknown" } func (s HistoricalEventChangeHfStateReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventChangeHfStateState int const ( HistoricalEventChangeHfStateState_Unknown HistoricalEventChangeHfStateState = iota HistoricalEventChangeHfStateState_Refugee HistoricalEventChangeHfStateState_Settled HistoricalEventChangeHfStateState_Visiting HistoricalEventChangeHfStateState_Wandering ) func parseHistoricalEventChangeHfStateState(s string) HistoricalEventChangeHfStateState { switch s { case "refugee": return HistoricalEventChangeHfStateState_Refugee case "settled": return HistoricalEventChangeHfStateState_Settled case "visiting": return HistoricalEventChangeHfStateState_Visiting case "wandering": return HistoricalEventChangeHfStateState_Wandering } return HistoricalEventChangeHfStateState_Unknown } func (s HistoricalEventChangeHfStateState) String() string { switch s { case HistoricalEventChangeHfStateState_Refugee: return "refugee" case HistoricalEventChangeHfStateState_Settled: return "settled" case HistoricalEventChangeHfStateState_Visiting: return "visiting" case HistoricalEventChangeHfStateState_Wandering: return "wandering" } return "unknown" } func (s HistoricalEventChangeHfStateState) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventChangeHfState struct { Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Hfid int `json:"hfid" legend:"both"` // hfid Mood HistoricalEventChangeHfStateMood `json:"mood" legend:"base"` // mood Reason HistoricalEventChangeHfStateReason `json:"reason" legend:"both"` // reason SiteId int `json:"siteId" legend:"base"` // site_id State HistoricalEventChangeHfStateState `json:"state" legend:"both"` // state SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventChangeHfState) Type() string { return "change hf state" } func (x *HistoricalEventChangeHfState) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventChangeHfState) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventChangeHfState) CheckFields() { } type HistoricalEventChangedCreatureType struct { ChangeeHfid int `json:"changeeHfid" legend:"base"` // changee_hfid ChangerHfid int `json:"changerHfid" legend:"base"` // changer_hfid NewCaste string `json:"newCaste" legend:"both"` // new_caste NewRace string `json:"newRace" legend:"both"` // new_race OldCaste string `json:"oldCaste" legend:"both"` // old_caste OldRace string `json:"oldRace" legend:"both"` // old_race } func (x *HistoricalEventChangedCreatureType) Type() string { return "changed creature type" } func (x *HistoricalEventChangedCreatureType) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventChangedCreatureType) RelatedToHf(id int) bool { return x.ChangeeHfid == id || x.ChangerHfid == id } func (x *HistoricalEventChangedCreatureType) CheckFields() { } type HistoricalEventCollectionType int const ( HistoricalEventCollectionType_Unknown HistoricalEventCollectionType = iota HistoricalEventCollectionType_Abduction HistoricalEventCollectionType_Battle HistoricalEventCollectionType_BeastAttack HistoricalEventCollectionType_Ceremony HistoricalEventCollectionType_Competition HistoricalEventCollectionType_Duel HistoricalEventCollectionType_EntityOverthrown HistoricalEventCollectionType_Insurrection HistoricalEventCollectionType_Journey HistoricalEventCollectionType_Occasion HistoricalEventCollectionType_Performance HistoricalEventCollectionType_Persecution HistoricalEventCollectionType_Procession HistoricalEventCollectionType_Purge HistoricalEventCollectionType_Raid HistoricalEventCollectionType_SiteConquered HistoricalEventCollectionType_Theft HistoricalEventCollectionType_War ) func parseHistoricalEventCollectionType(s string) HistoricalEventCollectionType { switch s { case "abduction": return HistoricalEventCollectionType_Abduction case "battle": return HistoricalEventCollectionType_Battle case "beast attack": return HistoricalEventCollectionType_BeastAttack case "ceremony": return HistoricalEventCollectionType_Ceremony case "competition": return HistoricalEventCollectionType_Competition case "duel": return HistoricalEventCollectionType_Duel case "entity overthrown": return HistoricalEventCollectionType_EntityOverthrown case "insurrection": return HistoricalEventCollectionType_Insurrection case "journey": return HistoricalEventCollectionType_Journey case "occasion": return HistoricalEventCollectionType_Occasion case "performance": return HistoricalEventCollectionType_Performance case "persecution": return HistoricalEventCollectionType_Persecution case "procession": return HistoricalEventCollectionType_Procession case "purge": return HistoricalEventCollectionType_Purge case "raid": return HistoricalEventCollectionType_Raid case "site conquered": return HistoricalEventCollectionType_SiteConquered case "theft": return HistoricalEventCollectionType_Theft case "war": return HistoricalEventCollectionType_War } return HistoricalEventCollectionType_Unknown } func (s HistoricalEventCollectionType) String() string { switch s { case HistoricalEventCollectionType_Abduction: return "abduction" case HistoricalEventCollectionType_Battle: return "battle" case HistoricalEventCollectionType_BeastAttack: return "beast attack" case HistoricalEventCollectionType_Ceremony: return "ceremony" case HistoricalEventCollectionType_Competition: return "competition" case HistoricalEventCollectionType_Duel: return "duel" case HistoricalEventCollectionType_EntityOverthrown: return "entity overthrown" case HistoricalEventCollectionType_Insurrection: return "insurrection" case HistoricalEventCollectionType_Journey: return "journey" case HistoricalEventCollectionType_Occasion: return "occasion" case HistoricalEventCollectionType_Performance: return "performance" case HistoricalEventCollectionType_Persecution: return "persecution" case HistoricalEventCollectionType_Procession: return "procession" case HistoricalEventCollectionType_Purge: return "purge" case HistoricalEventCollectionType_Raid: return "raid" case HistoricalEventCollectionType_SiteConquered: return "site conquered" case HistoricalEventCollectionType_Theft: return "theft" case HistoricalEventCollectionType_War: return "war" } return "unknown" } func (s HistoricalEventCollectionType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventCollection struct { EndSeconds72 int `json:"endSeconds72" legend:"base"` // end_seconds72 EndYear int `json:"endYear" legend:"base"` // end_year Event []int `json:"event" legend:"base"` // event Eventcol []int `json:"eventcol" legend:"base"` // eventcol Id_ int `json:"id" legend:"base"` // id StartSeconds72 int `json:"startSeconds72" legend:"base"` // start_seconds72 StartYear int `json:"startYear" legend:"base"` // start_year Details HistoricalEventCollectionDetails } func (x *HistoricalEventCollection) Id() int { return x.Id_ } func (x *HistoricalEventCollection) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollection) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollection) CheckFields() { } type HistoricalEventCollectionAbduction struct { AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid Coords string `json:"coords" legend:"base"` // coords DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Ordinal int `json:"ordinal" legend:"base"` // ordinal ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventCollectionAbduction) Type() string { return "abduction" } func (x *HistoricalEventCollectionAbduction) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionAbduction) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionAbduction) CheckFields() { } type HistoricalEventCollectionBattleOutcome int const ( HistoricalEventCollectionBattleOutcome_Unknown HistoricalEventCollectionBattleOutcome = iota HistoricalEventCollectionBattleOutcome_AttackerWon HistoricalEventCollectionBattleOutcome_DefenderWon ) func parseHistoricalEventCollectionBattleOutcome(s string) HistoricalEventCollectionBattleOutcome { switch s { case "attacker won": return HistoricalEventCollectionBattleOutcome_AttackerWon case "defender won": return HistoricalEventCollectionBattleOutcome_DefenderWon } return HistoricalEventCollectionBattleOutcome_Unknown } func (s HistoricalEventCollectionBattleOutcome) String() string { switch s { case HistoricalEventCollectionBattleOutcome_AttackerWon: return "attacker won" case HistoricalEventCollectionBattleOutcome_DefenderWon: return "defender won" } return "unknown" } func (s HistoricalEventCollectionBattleOutcome) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventCollectionBattle struct { ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid ASupportMercHfid []int `json:"aSupportMercHfid" legend:"base"` // a_support_merc_hfid AttackingHfid []int `json:"attackingHfid" legend:"base"` // attacking_hfid AttackingMercEnid int `json:"attackingMercEnid" legend:"base"` // attacking_merc_enid AttackingSquadAnimated []bool `json:"attackingSquadAnimated" legend:"base"` // attacking_squad_animated AttackingSquadDeaths []int `json:"attackingSquadDeaths" legend:"base"` // attacking_squad_deaths AttackingSquadEntityPop []int `json:"attackingSquadEntityPop" legend:"base"` // attacking_squad_entity_pop AttackingSquadNumber []int `json:"attackingSquadNumber" legend:"base"` // attacking_squad_number AttackingSquadRace []string `json:"attackingSquadRace" legend:"base"` // attacking_squad_race AttackingSquadSite []int `json:"attackingSquadSite" legend:"base"` // attacking_squad_site CompanyMerc []bool `json:"companyMerc" legend:"base"` // company_merc Coords string `json:"coords" legend:"base"` // coords DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid DSupportMercHfid []int `json:"dSupportMercHfid" legend:"base"` // d_support_merc_hfid DefendingHfid []int `json:"defendingHfid" legend:"base"` // defending_hfid DefendingMercEnid int `json:"defendingMercEnid" legend:"base"` // defending_merc_enid DefendingSquadAnimated []bool `json:"defendingSquadAnimated" legend:"base"` // defending_squad_animated DefendingSquadDeaths []int `json:"defendingSquadDeaths" legend:"base"` // defending_squad_deaths DefendingSquadEntityPop []int `json:"defendingSquadEntityPop" legend:"base"` // defending_squad_entity_pop DefendingSquadNumber []int `json:"defendingSquadNumber" legend:"base"` // defending_squad_number DefendingSquadRace []string `json:"defendingSquadRace" legend:"base"` // defending_squad_race DefendingSquadSite []int `json:"defendingSquadSite" legend:"base"` // defending_squad_site FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id IndividualMerc []bool `json:"individualMerc" legend:"base"` // individual_merc Name_ string `json:"name" legend:"base"` // name NoncomHfid []int `json:"noncomHfid" legend:"base"` // noncom_hfid Outcome HistoricalEventCollectionBattleOutcome `json:"outcome" legend:"base"` // outcome SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id WarEventcol int `json:"warEventcol" legend:"base"` // war_eventcol } func (x *HistoricalEventCollectionBattle) Name() string { return x.Name_ } func (x *HistoricalEventCollectionBattle) Type() string { return "battle" } func (x *HistoricalEventCollectionBattle) RelatedToEntity(id int) bool { return containsInt(x.AttackingSquadEntityPop, id) || containsInt(x.DefendingSquadEntityPop, id) } func (x *HistoricalEventCollectionBattle) RelatedToHf(id int) bool { return containsInt(x.ASupportMercHfid, id) || containsInt(x.AttackingHfid, id) || containsInt(x.DSupportMercHfid, id) || containsInt(x.DefendingHfid, id) || containsInt(x.NoncomHfid, id) } func (x *HistoricalEventCollectionBattle) CheckFields() { } type HistoricalEventCollectionBeastAttack struct { Coords string `json:"coords" legend:"base"` // coords DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Ordinal int `json:"ordinal" legend:"base"` // ordinal ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventCollectionBeastAttack) Type() string { return "beast attack" } func (x *HistoricalEventCollectionBeastAttack) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionBeastAttack) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionBeastAttack) CheckFields() { } type HistoricalEventCollectionCeremony struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal } func (x *HistoricalEventCollectionCeremony) Type() string { return "ceremony" } func (x *HistoricalEventCollectionCeremony) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionCeremony) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionCeremony) CheckFields() { } type HistoricalEventCollectionCompetition struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal } func (x *HistoricalEventCollectionCompetition) Type() string { return "competition" } func (x *HistoricalEventCollectionCompetition) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionCompetition) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionCompetition) CheckFields() { } type HistoricalEventCollectionDuel struct { AttackingHfid int `json:"attackingHfid" legend:"base"` // attacking_hfid Coords string `json:"coords" legend:"base"` // coords DefendingHfid int `json:"defendingHfid" legend:"base"` // defending_hfid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Ordinal int `json:"ordinal" legend:"base"` // ordinal ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventCollectionDuel) Type() string { return "duel" } func (x *HistoricalEventCollectionDuel) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionDuel) RelatedToHf(id int) bool { return x.AttackingHfid == id || x.DefendingHfid == id } func (x *HistoricalEventCollectionDuel) CheckFields() { } type HistoricalEventCollectionEntityOverthrown struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal SiteId int `json:"siteId" legend:"base"` // site_id TargetEntityId int `json:"targetEntityId" legend:"base"` // target_entity_id } func (x *HistoricalEventCollectionEntityOverthrown) Type() string { return "entity overthrown" } func (x *HistoricalEventCollectionEntityOverthrown) RelatedToEntity(id int) bool { return x.TargetEntityId == id } func (x *HistoricalEventCollectionEntityOverthrown) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionEntityOverthrown) CheckFields() { } type HistoricalEventCollectionInsurrection struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal SiteId int `json:"siteId" legend:"base"` // site_id TargetEnid int `json:"targetEnid" legend:"base"` // target_enid } func (x *HistoricalEventCollectionInsurrection) Type() string { return "insurrection" } func (x *HistoricalEventCollectionInsurrection) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionInsurrection) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionInsurrection) CheckFields() { } type HistoricalEventCollectionJourney struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal } func (x *HistoricalEventCollectionJourney) Type() string { return "journey" } func (x *HistoricalEventCollectionJourney) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionJourney) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionJourney) CheckFields() { } type HistoricalEventCollectionOccasion struct { CivId int `json:"civId" legend:"base"` // civ_id OccasionId int `json:"occasionId" legend:"base"` // occasion_id Ordinal int `json:"ordinal" legend:"base"` // ordinal } func (x *HistoricalEventCollectionOccasion) Type() string { return "occasion" } func (x *HistoricalEventCollectionOccasion) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventCollectionOccasion) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionOccasion) CheckFields() { } type HistoricalEventCollectionPerformance struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal } func (x *HistoricalEventCollectionPerformance) Type() string { return "performance" } func (x *HistoricalEventCollectionPerformance) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionPerformance) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionPerformance) CheckFields() { } type HistoricalEventCollectionPersecution struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal SiteId int `json:"siteId" legend:"base"` // site_id TargetEntityId int `json:"targetEntityId" legend:"base"` // target_entity_id } func (x *HistoricalEventCollectionPersecution) Type() string { return "persecution" } func (x *HistoricalEventCollectionPersecution) RelatedToEntity(id int) bool { return x.TargetEntityId == id } func (x *HistoricalEventCollectionPersecution) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionPersecution) CheckFields() { } type HistoricalEventCollectionProcession struct { Ordinal int `json:"ordinal" legend:"base"` // ordinal } func (x *HistoricalEventCollectionProcession) Type() string { return "procession" } func (x *HistoricalEventCollectionProcession) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionProcession) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionProcession) CheckFields() { } type HistoricalEventCollectionPurgeAdjective int const ( HistoricalEventCollectionPurgeAdjective_Unknown HistoricalEventCollectionPurgeAdjective = iota HistoricalEventCollectionPurgeAdjective_Vampire ) func parseHistoricalEventCollectionPurgeAdjective(s string) HistoricalEventCollectionPurgeAdjective { switch s { case "Vampire": return HistoricalEventCollectionPurgeAdjective_Vampire } return HistoricalEventCollectionPurgeAdjective_Unknown } func (s HistoricalEventCollectionPurgeAdjective) String() string { switch s { case HistoricalEventCollectionPurgeAdjective_Vampire: return "vampire" } return "unknown" } func (s HistoricalEventCollectionPurgeAdjective) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventCollectionPurge struct { Adjective HistoricalEventCollectionPurgeAdjective `json:"adjective" legend:"base"` // adjective Ordinal int `json:"ordinal" legend:"base"` // ordinal SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventCollectionPurge) Type() string { return "purge" } func (x *HistoricalEventCollectionPurge) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionPurge) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionPurge) CheckFields() { } type HistoricalEventCollectionRaid struct { AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid Coords string `json:"coords" legend:"base"` // coords DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Ordinal int `json:"ordinal" legend:"base"` // ordinal ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventCollectionRaid) Type() string { return "raid" } func (x *HistoricalEventCollectionRaid) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionRaid) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionRaid) CheckFields() { } type HistoricalEventCollectionSiteConquered struct { AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid Ordinal int `json:"ordinal" legend:"base"` // ordinal SiteId int `json:"siteId" legend:"base"` // site_id WarEventcol int `json:"warEventcol" legend:"base"` // war_eventcol } func (x *HistoricalEventCollectionSiteConquered) Type() string { return "site conquered" } func (x *HistoricalEventCollectionSiteConquered) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionSiteConquered) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionSiteConquered) CheckFields() { } type HistoricalEventCollectionTheft struct { AttackingEnid int `json:"attackingEnid" legend:"base"` // attacking_enid Coords string `json:"coords" legend:"base"` // coords DefendingEnid int `json:"defendingEnid" legend:"base"` // defending_enid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Ordinal int `json:"ordinal" legend:"base"` // ordinal ParentEventcol int `json:"parentEventcol" legend:"base"` // parent_eventcol SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventCollectionTheft) Type() string { return "theft" } func (x *HistoricalEventCollectionTheft) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionTheft) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionTheft) CheckFields() { } type HistoricalEventCollectionWar struct { AggressorEntId int `json:"aggressorEntId" legend:"base"` // aggressor_ent_id DefenderEntId int `json:"defenderEntId" legend:"base"` // defender_ent_id Name_ string `json:"name" legend:"base"` // name } func (x *HistoricalEventCollectionWar) Name() string { return x.Name_ } func (x *HistoricalEventCollectionWar) Type() string { return "war" } func (x *HistoricalEventCollectionWar) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCollectionWar) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCollectionWar) CheckFields() { } type HistoricalEventCompetition struct { CivId int `json:"civId" legend:"base"` // civ_id CompetitorHfid []int `json:"competitorHfid" legend:"base"` // competitor_hfid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id OccasionId int `json:"occasionId" legend:"base"` // occasion_id ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id WinnerHfid int `json:"winnerHfid" legend:"base"` // winner_hfid } func (x *HistoricalEventCompetition) Type() string { return "competition" } func (x *HistoricalEventCompetition) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventCompetition) RelatedToHf(id int) bool { return containsInt(x.CompetitorHfid, id) || x.WinnerHfid == id } func (x *HistoricalEventCompetition) CheckFields() { } type HistoricalEventCreateEntityPositionReason int const ( HistoricalEventCreateEntityPositionReason_Unknown HistoricalEventCreateEntityPositionReason = iota HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse HistoricalEventCreateEntityPositionReason_Collaboration HistoricalEventCreateEntityPositionReason_ForceOfArgument HistoricalEventCreateEntityPositionReason_ThreatOfViolence HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport ) func parseHistoricalEventCreateEntityPositionReason(s string) HistoricalEventCreateEntityPositionReason { switch s { case "as_a_matter_of_course": return HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse case "collaboration": return HistoricalEventCreateEntityPositionReason_Collaboration case "force_of_argument": return HistoricalEventCreateEntityPositionReason_ForceOfArgument case "threat_of_violence": return HistoricalEventCreateEntityPositionReason_ThreatOfViolence case "wave_of_popular_support": return HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport } return HistoricalEventCreateEntityPositionReason_Unknown } func (s HistoricalEventCreateEntityPositionReason) String() string { switch s { case HistoricalEventCreateEntityPositionReason_AsAMatterOfCourse: return "as a matter of course" case HistoricalEventCreateEntityPositionReason_Collaboration: return "collaboration" case HistoricalEventCreateEntityPositionReason_ForceOfArgument: return "force of argument" case HistoricalEventCreateEntityPositionReason_ThreatOfViolence: return "threat of violence" case HistoricalEventCreateEntityPositionReason_WaveOfPopularSupport: return "wave of popular support" } return "unknown" } func (s HistoricalEventCreateEntityPositionReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventCreateEntityPosition struct { Civ int `json:"civ" legend:"plus"` // civ Histfig int `json:"histfig" legend:"plus"` // histfig Position string `json:"position" legend:"plus"` // position Reason HistoricalEventCreateEntityPositionReason `json:"reason" legend:"plus"` // reason SiteCiv int `json:"siteCiv" legend:"plus"` // site_civ } func (x *HistoricalEventCreateEntityPosition) Type() string { return "create entity position" } func (x *HistoricalEventCreateEntityPosition) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventCreateEntityPosition) RelatedToHf(id int) bool { return x.Histfig == id } func (x *HistoricalEventCreateEntityPosition) CheckFields() { } type HistoricalEventCreatedSite struct { BuilderHfid int `json:"builderHfid" legend:"base"` // builder_hfid CivId int `json:"civId" legend:"base"` // civ_id ResidentCivId int `json:"residentCivId" legend:"base"` // resident_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventCreatedSite) Type() string { return "created site" } func (x *HistoricalEventCreatedSite) RelatedToEntity(id int) bool { return x.CivId == id || x.ResidentCivId == id || x.SiteCivId == id } func (x *HistoricalEventCreatedSite) RelatedToHf(id int) bool { return x.BuilderHfid == id } func (x *HistoricalEventCreatedSite) CheckFields() { } type HistoricalEventCreatedStructureRebuild int const ( HistoricalEventCreatedStructureRebuild_Unknown HistoricalEventCreatedStructureRebuild = iota HistoricalEventCreatedStructureRebuild_False HistoricalEventCreatedStructureRebuild_True ) func parseHistoricalEventCreatedStructureRebuild(s string) HistoricalEventCreatedStructureRebuild { switch s { case "false": return HistoricalEventCreatedStructureRebuild_False case "true": return HistoricalEventCreatedStructureRebuild_True } return HistoricalEventCreatedStructureRebuild_Unknown } func (s HistoricalEventCreatedStructureRebuild) String() string { switch s { case HistoricalEventCreatedStructureRebuild_False: return "false" case HistoricalEventCreatedStructureRebuild_True: return "true" } return "unknown" } func (s HistoricalEventCreatedStructureRebuild) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventCreatedStructure struct { BuilderHfid int `json:"builderHfid" legend:"base"` // builder_hfid CivId int `json:"civId" legend:"base"` // civ_id Rebuild HistoricalEventCreatedStructureRebuild `json:"rebuild" legend:"plus"` // rebuild Rebuilt bool `json:"rebuilt" legend:"base"` // rebuilt SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id Structure int `json:"structure" legend:"plus"` // structure StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventCreatedStructure) Type() string { return "created structure" } func (x *HistoricalEventCreatedStructure) RelatedToEntity(id int) bool { return x.CivId == id || x.SiteCivId == id } func (x *HistoricalEventCreatedStructure) RelatedToHf(id int) bool { return x.BuilderHfid == id } func (x *HistoricalEventCreatedStructure) CheckFields() { if x.Structure != x.BuilderHfid && x.Structure != 0 && x.BuilderHfid != 0 { sameFields["HistoricalEventCreatedStructure"]["Structure"]["BuilderHfid"] = false } if x.Structure != x.CivId && x.Structure != 0 && x.CivId != 0 { sameFields["HistoricalEventCreatedStructure"]["Structure"]["CivId"] = false } if x.Structure != x.SiteCivId && x.Structure != 0 && x.SiteCivId != 0 { sameFields["HistoricalEventCreatedStructure"]["Structure"]["SiteCivId"] = false } if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 { sameFields["HistoricalEventCreatedStructure"]["Structure"]["SiteId"] = false } if x.Structure != x.StructureId && x.Structure != 0 && x.StructureId != 0 { sameFields["HistoricalEventCreatedStructure"]["Structure"]["StructureId"] = false } } type HistoricalEventCreatedWorldConstruction struct { CivId int `json:"civId" legend:"base"` // civ_id MasterWcid int `json:"masterWcid" legend:"base"` // master_wcid SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId1 int `json:"siteId1" legend:"base"` // site_id1 SiteId2 int `json:"siteId2" legend:"base"` // site_id2 Wcid int `json:"wcid" legend:"base"` // wcid } func (x *HistoricalEventCreatedWorldConstruction) Type() string { return "created world construction" } func (x *HistoricalEventCreatedWorldConstruction) RelatedToEntity(id int) bool { return x.CivId == id || x.SiteCivId == id } func (x *HistoricalEventCreatedWorldConstruction) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCreatedWorldConstruction) CheckFields() { } type HistoricalEventCreatureDevoured struct { Caste string `json:"caste" legend:"plus"` // caste Eater int `json:"eater" legend:"plus"` // eater Entity int `json:"entity" legend:"plus"` // entity FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Race string `json:"race" legend:"plus"` // race SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id Victim int `json:"victim" legend:"plus"` // victim } func (x *HistoricalEventCreatureDevoured) Type() string { return "creature devoured" } func (x *HistoricalEventCreatureDevoured) RelatedToEntity(id int) bool { return x.Entity == id } func (x *HistoricalEventCreatureDevoured) RelatedToHf(id int) bool { return false } func (x *HistoricalEventCreatureDevoured) CheckFields() { if x.Eater != x.FeatureLayerId && x.Eater != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Eater"]["FeatureLayerId"] = false } if x.Eater != x.SiteId && x.Eater != 0 && x.SiteId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Eater"]["SiteId"] = false } if x.Eater != x.SubregionId && x.Eater != 0 && x.SubregionId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Eater"]["SubregionId"] = false } if x.Entity != x.FeatureLayerId && x.Entity != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Entity"]["FeatureLayerId"] = false } if x.Entity != x.SiteId && x.Entity != 0 && x.SiteId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Entity"]["SiteId"] = false } if x.Entity != x.SubregionId && x.Entity != 0 && x.SubregionId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Entity"]["SubregionId"] = false } if x.Victim != x.FeatureLayerId && x.Victim != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Victim"]["FeatureLayerId"] = false } if x.Victim != x.SiteId && x.Victim != 0 && x.SiteId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Victim"]["SiteId"] = false } if x.Victim != x.SubregionId && x.Victim != 0 && x.SubregionId != 0 { sameFields["HistoricalEventCreatureDevoured"]["Victim"]["SubregionId"] = false } } type HistoricalEventDanceFormCreatedCircumstance int const ( HistoricalEventDanceFormCreatedCircumstance_Unknown HistoricalEventDanceFormCreatedCircumstance = iota HistoricalEventDanceFormCreatedCircumstance_Dream HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf HistoricalEventDanceFormCreatedCircumstance_Nightmare HistoricalEventDanceFormCreatedCircumstance_PrayToHf ) func parseHistoricalEventDanceFormCreatedCircumstance(s string) HistoricalEventDanceFormCreatedCircumstance { switch s { case "dream": return HistoricalEventDanceFormCreatedCircumstance_Dream case "dream about hf": return HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf case "nightmare": return HistoricalEventDanceFormCreatedCircumstance_Nightmare case "pray to hf": return HistoricalEventDanceFormCreatedCircumstance_PrayToHf } return HistoricalEventDanceFormCreatedCircumstance_Unknown } func (s HistoricalEventDanceFormCreatedCircumstance) String() string { switch s { case HistoricalEventDanceFormCreatedCircumstance_Dream: return "dream" case HistoricalEventDanceFormCreatedCircumstance_DreamAboutHf: return "dream about hf" case HistoricalEventDanceFormCreatedCircumstance_Nightmare: return "nightmare" case HistoricalEventDanceFormCreatedCircumstance_PrayToHf: return "pray to hf" } return "unknown" } func (s HistoricalEventDanceFormCreatedCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventDanceFormCreatedReason int const ( HistoricalEventDanceFormCreatedReason_Unknown HistoricalEventDanceFormCreatedReason = iota HistoricalEventDanceFormCreatedReason_GlorifyHf ) func parseHistoricalEventDanceFormCreatedReason(s string) HistoricalEventDanceFormCreatedReason { switch s { case "glorify hf": return HistoricalEventDanceFormCreatedReason_GlorifyHf } return HistoricalEventDanceFormCreatedReason_Unknown } func (s HistoricalEventDanceFormCreatedReason) String() string { switch s { case HistoricalEventDanceFormCreatedReason_GlorifyHf: return "glorify hf" } return "unknown" } func (s HistoricalEventDanceFormCreatedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventDanceFormCreated struct { Circumstance HistoricalEventDanceFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id FormId int `json:"formId" legend:"base"` // form_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id Reason HistoricalEventDanceFormCreatedReason `json:"reason" legend:"base"` // reason ReasonId int `json:"reasonId" legend:"base"` // reason_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventDanceFormCreated) Type() string { return "dance form created" } func (x *HistoricalEventDanceFormCreated) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventDanceFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventDanceFormCreated) CheckFields() { } type HistoricalEventDestroyedSite struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id NoDefeatMention bool `json:"noDefeatMention" legend:"base"` // no_defeat_mention SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventDestroyedSite) Type() string { return "destroyed site" } func (x *HistoricalEventDestroyedSite) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventDestroyedSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventDestroyedSite) CheckFields() { } type HistoricalEventDiplomatLost struct { Entity int `json:"entity" legend:"plus"` // entity Involved int `json:"involved" legend:"plus"` // involved Site int `json:"site" legend:"plus"` // site SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventDiplomatLost) Type() string { return "diplomat lost" } func (x *HistoricalEventDiplomatLost) RelatedToEntity(id int) bool { return x.Entity == id } func (x *HistoricalEventDiplomatLost) RelatedToHf(id int) bool { return false } func (x *HistoricalEventDiplomatLost) CheckFields() { if x.Entity != x.SiteId && x.Entity != 0 && x.SiteId != 0 { sameFields["HistoricalEventDiplomatLost"]["Entity"]["SiteId"] = false } if x.Involved != x.SiteId && x.Involved != 0 && x.SiteId != 0 { sameFields["HistoricalEventDiplomatLost"]["Involved"]["SiteId"] = false } if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 { sameFields["HistoricalEventDiplomatLost"]["Site"]["SiteId"] = false } } type HistoricalEventEntityAllianceFormed struct { InitiatingEnid int `json:"initiatingEnid" legend:"base"` // initiating_enid JoiningEnid []int `json:"joiningEnid" legend:"base"` // joining_enid } func (x *HistoricalEventEntityAllianceFormed) Type() string { return "entity alliance formed" } func (x *HistoricalEventEntityAllianceFormed) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventEntityAllianceFormed) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityAllianceFormed) CheckFields() { } type HistoricalEventEntityBreachFeatureLayer struct { CivEntityId int `json:"civEntityId" legend:"base"` // civ_entity_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id SiteEntityId int `json:"siteEntityId" legend:"base"` // site_entity_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntityBreachFeatureLayer) Type() string { return "entity breach feature layer" } func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToEntity(id int) bool { return x.CivEntityId == id || x.SiteEntityId == id } func (x *HistoricalEventEntityBreachFeatureLayer) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityBreachFeatureLayer) CheckFields() { } type HistoricalEventEntityCreated struct { CreatorHfid int `json:"creatorHfid" legend:"base"` // creator_hfid EntityId int `json:"entityId" legend:"base"` // entity_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventEntityCreated) Type() string { return "entity created" } func (x *HistoricalEventEntityCreated) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityCreated) RelatedToHf(id int) bool { return x.CreatorHfid == id } func (x *HistoricalEventEntityCreated) CheckFields() { } type HistoricalEventEntityDissolvedReason int const ( HistoricalEventEntityDissolvedReason_Unknown HistoricalEventEntityDissolvedReason = iota HistoricalEventEntityDissolvedReason_HeavyLossesInBattle HistoricalEventEntityDissolvedReason_LackOfFunds ) func parseHistoricalEventEntityDissolvedReason(s string) HistoricalEventEntityDissolvedReason { switch s { case "heavy losses in battle": return HistoricalEventEntityDissolvedReason_HeavyLossesInBattle case "lack of funds": return HistoricalEventEntityDissolvedReason_LackOfFunds } return HistoricalEventEntityDissolvedReason_Unknown } func (s HistoricalEventEntityDissolvedReason) String() string { switch s { case HistoricalEventEntityDissolvedReason_HeavyLossesInBattle: return "heavy losses in battle" case HistoricalEventEntityDissolvedReason_LackOfFunds: return "lack of funds" } return "unknown" } func (s HistoricalEventEntityDissolvedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventEntityDissolved struct { EntityId int `json:"entityId" legend:"base"` // entity_id Reason HistoricalEventEntityDissolvedReason `json:"reason" legend:"base"` // reason } func (x *HistoricalEventEntityDissolved) Type() string { return "entity dissolved" } func (x *HistoricalEventEntityDissolved) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityDissolved) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityDissolved) CheckFields() { } type HistoricalEventEntityEquipmentPurchase struct { EntityId int `json:"entityId" legend:"base"` // entity_id Hfid []int `json:"hfid" legend:"base"` // hfid NewEquipmentLevel int `json:"newEquipmentLevel" legend:"base"` // new_equipment_level } func (x *HistoricalEventEntityEquipmentPurchase) Type() string { return "entity equipment purchase" } func (x *HistoricalEventEntityEquipmentPurchase) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityEquipmentPurchase) RelatedToHf(id int) bool { return containsInt(x.Hfid, id) } func (x *HistoricalEventEntityEquipmentPurchase) CheckFields() { } type HistoricalEventEntityExpelsHf struct { EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntityExpelsHf) Type() string { return "entity expels hf" } func (x *HistoricalEventEntityExpelsHf) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityExpelsHf) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventEntityExpelsHf) CheckFields() { } type HistoricalEventEntityFledSite struct { FledCivId int `json:"fledCivId" legend:"base"` // fled_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntityFledSite) Type() string { return "entity fled site" } func (x *HistoricalEventEntityFledSite) RelatedToEntity(id int) bool { return x.FledCivId == id } func (x *HistoricalEventEntityFledSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityFledSite) CheckFields() { } type HistoricalEventEntityIncorporated struct { JoinedEntityId int `json:"joinedEntityId" legend:"base"` // joined_entity_id JoinerEntityId int `json:"joinerEntityId" legend:"base"` // joiner_entity_id LeaderHfid int `json:"leaderHfid" legend:"base"` // leader_hfid PartialIncorporation bool `json:"partialIncorporation" legend:"base"` // partial_incorporation SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntityIncorporated) Type() string { return "entity incorporated" } func (x *HistoricalEventEntityIncorporated) RelatedToEntity(id int) bool { return x.JoinedEntityId == id || x.JoinerEntityId == id } func (x *HistoricalEventEntityIncorporated) RelatedToHf(id int) bool { return x.LeaderHfid == id } func (x *HistoricalEventEntityIncorporated) CheckFields() { } type HistoricalEventEntityLawLawAdd int const ( HistoricalEventEntityLawLawAdd_Unknown HistoricalEventEntityLawLawAdd = iota HistoricalEventEntityLawLawAdd_Harsh ) func parseHistoricalEventEntityLawLawAdd(s string) HistoricalEventEntityLawLawAdd { switch s { case "harsh": return HistoricalEventEntityLawLawAdd_Harsh } return HistoricalEventEntityLawLawAdd_Unknown } func (s HistoricalEventEntityLawLawAdd) String() string { switch s { case HistoricalEventEntityLawLawAdd_Harsh: return "harsh" } return "unknown" } func (s HistoricalEventEntityLawLawAdd) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventEntityLawLawRemove int const ( HistoricalEventEntityLawLawRemove_Unknown HistoricalEventEntityLawLawRemove = iota HistoricalEventEntityLawLawRemove_Harsh ) func parseHistoricalEventEntityLawLawRemove(s string) HistoricalEventEntityLawLawRemove { switch s { case "harsh": return HistoricalEventEntityLawLawRemove_Harsh } return HistoricalEventEntityLawLawRemove_Unknown } func (s HistoricalEventEntityLawLawRemove) String() string { switch s { case HistoricalEventEntityLawLawRemove_Harsh: return "harsh" } return "unknown" } func (s HistoricalEventEntityLawLawRemove) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventEntityLaw struct { EntityId int `json:"entityId" legend:"base"` // entity_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id LawAdd HistoricalEventEntityLawLawAdd `json:"lawAdd" legend:"base"` // law_add LawRemove HistoricalEventEntityLawLawRemove `json:"lawRemove" legend:"base"` // law_remove } func (x *HistoricalEventEntityLaw) Type() string { return "entity law" } func (x *HistoricalEventEntityLaw) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityLaw) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventEntityLaw) CheckFields() { } type HistoricalEventEntityOverthrown struct { ConspiratorHfid []int `json:"conspiratorHfid" legend:"base"` // conspirator_hfid EntityId int `json:"entityId" legend:"base"` // entity_id InstigatorHfid int `json:"instigatorHfid" legend:"base"` // instigator_hfid OverthrownHfid int `json:"overthrownHfid" legend:"base"` // overthrown_hfid PosTakerHfid int `json:"posTakerHfid" legend:"base"` // pos_taker_hfid PositionProfileId int `json:"positionProfileId" legend:"base"` // position_profile_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntityOverthrown) Type() string { return "entity overthrown" } func (x *HistoricalEventEntityOverthrown) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityOverthrown) RelatedToHf(id int) bool { return containsInt(x.ConspiratorHfid, id) || x.InstigatorHfid == id || x.OverthrownHfid == id || x.PosTakerHfid == id } func (x *HistoricalEventEntityOverthrown) CheckFields() { } type HistoricalEventEntityPersecuted struct { DestroyedStructureId int `json:"destroyedStructureId" legend:"base"` // destroyed_structure_id ExpelledCreature []int `json:"expelledCreature" legend:"base"` // expelled_creature ExpelledHfid []int `json:"expelledHfid" legend:"base"` // expelled_hfid ExpelledNumber []int `json:"expelledNumber" legend:"base"` // expelled_number ExpelledPopId []int `json:"expelledPopId" legend:"base"` // expelled_pop_id PersecutorEnid int `json:"persecutorEnid" legend:"base"` // persecutor_enid PersecutorHfid int `json:"persecutorHfid" legend:"base"` // persecutor_hfid PropertyConfiscatedFromHfid []int `json:"propertyConfiscatedFromHfid" legend:"base"` // property_confiscated_from_hfid ShrineAmountDestroyed int `json:"shrineAmountDestroyed" legend:"base"` // shrine_amount_destroyed SiteId int `json:"siteId" legend:"base"` // site_id TargetEnid int `json:"targetEnid" legend:"base"` // target_enid } func (x *HistoricalEventEntityPersecuted) Type() string { return "entity persecuted" } func (x *HistoricalEventEntityPersecuted) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventEntityPersecuted) RelatedToHf(id int) bool { return containsInt(x.ExpelledHfid, id) || containsInt(x.PropertyConfiscatedFromHfid, id) || x.PersecutorHfid == id } func (x *HistoricalEventEntityPersecuted) CheckFields() { } type HistoricalEventEntityPrimaryCriminalsAction int const ( HistoricalEventEntityPrimaryCriminalsAction_Unknown HistoricalEventEntityPrimaryCriminalsAction = iota HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals ) func parseHistoricalEventEntityPrimaryCriminalsAction(s string) HistoricalEventEntityPrimaryCriminalsAction { switch s { case "entity_primary_criminals": return HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals } return HistoricalEventEntityPrimaryCriminalsAction_Unknown } func (s HistoricalEventEntityPrimaryCriminalsAction) String() string { switch s { case HistoricalEventEntityPrimaryCriminalsAction_EntityPrimaryCriminals: return "entity primary criminals" } return "unknown" } func (s HistoricalEventEntityPrimaryCriminalsAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventEntityPrimaryCriminals struct { Action HistoricalEventEntityPrimaryCriminalsAction `json:"action" legend:"plus"` // action EntityId int `json:"entityId" legend:"base"` // entity_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventEntityPrimaryCriminals) Type() string { return "entity primary criminals" } func (x *HistoricalEventEntityPrimaryCriminals) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityPrimaryCriminals) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityPrimaryCriminals) CheckFields() { } type HistoricalEventEntityRampagedInSite struct { RampageCivId int `json:"rampageCivId" legend:"base"` // rampage_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntityRampagedInSite) Type() string { return "entity rampaged in site" } func (x *HistoricalEventEntityRampagedInSite) RelatedToEntity(id int) bool { return x.RampageCivId == id } func (x *HistoricalEventEntityRampagedInSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityRampagedInSite) CheckFields() { } type HistoricalEventEntityRelocateAction int const ( HistoricalEventEntityRelocateAction_Unknown HistoricalEventEntityRelocateAction = iota HistoricalEventEntityRelocateAction_EntityRelocate ) func parseHistoricalEventEntityRelocateAction(s string) HistoricalEventEntityRelocateAction { switch s { case "entity_relocate": return HistoricalEventEntityRelocateAction_EntityRelocate } return HistoricalEventEntityRelocateAction_Unknown } func (s HistoricalEventEntityRelocateAction) String() string { switch s { case HistoricalEventEntityRelocateAction_EntityRelocate: return "entity relocate" } return "unknown" } func (s HistoricalEventEntityRelocateAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventEntityRelocate struct { Action HistoricalEventEntityRelocateAction `json:"action" legend:"plus"` // action EntityId int `json:"entityId" legend:"base"` // entity_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventEntityRelocate) Type() string { return "entity relocate" } func (x *HistoricalEventEntityRelocate) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventEntityRelocate) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntityRelocate) CheckFields() { } type HistoricalEventEntitySearchedSiteResult int const ( HistoricalEventEntitySearchedSiteResult_Unknown HistoricalEventEntitySearchedSiteResult = iota HistoricalEventEntitySearchedSiteResult_FoundNothing ) func parseHistoricalEventEntitySearchedSiteResult(s string) HistoricalEventEntitySearchedSiteResult { switch s { case "found nothing": return HistoricalEventEntitySearchedSiteResult_FoundNothing } return HistoricalEventEntitySearchedSiteResult_Unknown } func (s HistoricalEventEntitySearchedSiteResult) String() string { switch s { case HistoricalEventEntitySearchedSiteResult_FoundNothing: return "found nothing" } return "unknown" } func (s HistoricalEventEntitySearchedSiteResult) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventEntitySearchedSite struct { Result HistoricalEventEntitySearchedSiteResult `json:"result" legend:"base"` // result SearcherCivId int `json:"searcherCivId" legend:"base"` // searcher_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventEntitySearchedSite) Type() string { return "entity searched site" } func (x *HistoricalEventEntitySearchedSite) RelatedToEntity(id int) bool { return x.SearcherCivId == id } func (x *HistoricalEventEntitySearchedSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventEntitySearchedSite) CheckFields() { } type HistoricalEventFailedFrameAttemptCrime int const ( HistoricalEventFailedFrameAttemptCrime_Unknown HistoricalEventFailedFrameAttemptCrime = iota HistoricalEventFailedFrameAttemptCrime_Treason ) func parseHistoricalEventFailedFrameAttemptCrime(s string) HistoricalEventFailedFrameAttemptCrime { switch s { case "treason": return HistoricalEventFailedFrameAttemptCrime_Treason } return HistoricalEventFailedFrameAttemptCrime_Unknown } func (s HistoricalEventFailedFrameAttemptCrime) String() string { switch s { case HistoricalEventFailedFrameAttemptCrime_Treason: return "treason" } return "unknown" } func (s HistoricalEventFailedFrameAttemptCrime) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventFailedFrameAttempt struct { ConvicterEnid int `json:"convicterEnid" legend:"base"` // convicter_enid Crime HistoricalEventFailedFrameAttemptCrime `json:"crime" legend:"base"` // crime FooledHfid int `json:"fooledHfid" legend:"base"` // fooled_hfid FramerHfid int `json:"framerHfid" legend:"base"` // framer_hfid PlotterHfid int `json:"plotterHfid" legend:"base"` // plotter_hfid TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid } func (x *HistoricalEventFailedFrameAttempt) Type() string { return "failed frame attempt" } func (x *HistoricalEventFailedFrameAttempt) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventFailedFrameAttempt) RelatedToHf(id int) bool { return x.FooledHfid == id || x.FramerHfid == id || x.PlotterHfid == id || x.TargetHfid == id } func (x *HistoricalEventFailedFrameAttempt) CheckFields() { } type HistoricalEventFailedIntrigueCorruptionAction int const ( HistoricalEventFailedIntrigueCorruptionAction_Unknown HistoricalEventFailedIntrigueCorruptionAction = iota HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle ) func parseHistoricalEventFailedIntrigueCorruptionAction(s string) HistoricalEventFailedIntrigueCorruptionAction { switch s { case "bribe official": return HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial case "bring into network": return HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork case "corrupt in place": return HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace case "induce to embezzle": return HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle } return HistoricalEventFailedIntrigueCorruptionAction_Unknown } func (s HistoricalEventFailedIntrigueCorruptionAction) String() string { switch s { case HistoricalEventFailedIntrigueCorruptionAction_BribeOfficial: return "bribe official" case HistoricalEventFailedIntrigueCorruptionAction_BringIntoNetwork: return "bring into network" case HistoricalEventFailedIntrigueCorruptionAction_CorruptInPlace: return "corrupt in place" case HistoricalEventFailedIntrigueCorruptionAction_InduceToEmbezzle: return "induce to embezzle" } return "unknown" } func (s HistoricalEventFailedIntrigueCorruptionAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventFailedIntrigueCorruptionMethod int const ( HistoricalEventFailedIntrigueCorruptionMethod_Unknown HistoricalEventFailedIntrigueCorruptionMethod = iota HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement HistoricalEventFailedIntrigueCorruptionMethod_Bribe HistoricalEventFailedIntrigueCorruptionMethod_Flatter HistoricalEventFailedIntrigueCorruptionMethod_Intimidate HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality HistoricalEventFailedIntrigueCorruptionMethod_Precedence HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge ) func parseHistoricalEventFailedIntrigueCorruptionMethod(s string) HistoricalEventFailedIntrigueCorruptionMethod { switch s { case "blackmail over embezzlement": return HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement case "bribe": return HistoricalEventFailedIntrigueCorruptionMethod_Bribe case "flatter": return HistoricalEventFailedIntrigueCorruptionMethod_Flatter case "intimidate": return HistoricalEventFailedIntrigueCorruptionMethod_Intimidate case "offer immortality": return HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality case "precedence": return HistoricalEventFailedIntrigueCorruptionMethod_Precedence case "religious sympathy": return HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy case "revenge on grudge": return HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge } return HistoricalEventFailedIntrigueCorruptionMethod_Unknown } func (s HistoricalEventFailedIntrigueCorruptionMethod) String() string { switch s { case HistoricalEventFailedIntrigueCorruptionMethod_BlackmailOverEmbezzlement: return "blackmail over embezzlement" case HistoricalEventFailedIntrigueCorruptionMethod_Bribe: return "bribe" case HistoricalEventFailedIntrigueCorruptionMethod_Flatter: return "flatter" case HistoricalEventFailedIntrigueCorruptionMethod_Intimidate: return "intimidate" case HistoricalEventFailedIntrigueCorruptionMethod_OfferImmortality: return "offer immortality" case HistoricalEventFailedIntrigueCorruptionMethod_Precedence: return "precedence" case HistoricalEventFailedIntrigueCorruptionMethod_ReligiousSympathy: return "religious sympathy" case HistoricalEventFailedIntrigueCorruptionMethod_RevengeOnGrudge: return "revenge on grudge" } return "unknown" } func (s HistoricalEventFailedIntrigueCorruptionMethod) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventFailedIntrigueCorruptionTopFacet int const ( HistoricalEventFailedIntrigueCorruptionTopFacet_Unknown HistoricalEventFailedIntrigueCorruptionTopFacet = iota HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness HistoricalEventFailedIntrigueCorruptionTopFacet_Greed HistoricalEventFailedIntrigueCorruptionTopFacet_Hope HistoricalEventFailedIntrigueCorruptionTopFacet_Pride HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful ) func parseHistoricalEventFailedIntrigueCorruptionTopFacet(s string) HistoricalEventFailedIntrigueCorruptionTopFacet { switch s { case "ambition": return HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition case "anxiety propensity": return HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity case "confidence": return HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence case "envy propensity": return HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity case "fearlessness": return HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness case "greed": return HistoricalEventFailedIntrigueCorruptionTopFacet_Greed case "hope": return HistoricalEventFailedIntrigueCorruptionTopFacet_Hope case "pride": return HistoricalEventFailedIntrigueCorruptionTopFacet_Pride case "stress vulnerability": return HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability case "swayable": return HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable case "vanity": return HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity case "vengeful": return HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful } return HistoricalEventFailedIntrigueCorruptionTopFacet_Unknown } func (s HistoricalEventFailedIntrigueCorruptionTopFacet) String() string { switch s { case HistoricalEventFailedIntrigueCorruptionTopFacet_Ambition: return "ambition" case HistoricalEventFailedIntrigueCorruptionTopFacet_AnxietyPropensity: return "anxiety propensity" case HistoricalEventFailedIntrigueCorruptionTopFacet_Confidence: return "confidence" case HistoricalEventFailedIntrigueCorruptionTopFacet_EnvyPropensity: return "envy propensity" case HistoricalEventFailedIntrigueCorruptionTopFacet_Fearlessness: return "fearlessness" case HistoricalEventFailedIntrigueCorruptionTopFacet_Greed: return "greed" case HistoricalEventFailedIntrigueCorruptionTopFacet_Hope: return "hope" case HistoricalEventFailedIntrigueCorruptionTopFacet_Pride: return "pride" case HistoricalEventFailedIntrigueCorruptionTopFacet_StressVulnerability: return "stress vulnerability" case HistoricalEventFailedIntrigueCorruptionTopFacet_Swayable: return "swayable" case HistoricalEventFailedIntrigueCorruptionTopFacet_Vanity: return "vanity" case HistoricalEventFailedIntrigueCorruptionTopFacet_Vengeful: return "vengeful" } return "unknown" } func (s HistoricalEventFailedIntrigueCorruptionTopFacet) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor int const ( HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Unknown HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor = iota HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust ) func parseHistoricalEventFailedIntrigueCorruptionTopRelationshipFactor(s string) HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor { switch s { case "fear": return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear case "love": return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love case "respect": return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect case "trust": return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust } return HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Unknown } func (s HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor) String() string { switch s { case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Fear: return "fear" case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Love: return "love" case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Respect: return "respect" case HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor_Trust: return "trust" } return "unknown" } func (s HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventFailedIntrigueCorruptionTopValue int const ( HistoricalEventFailedIntrigueCorruptionTopValue_Unknown HistoricalEventFailedIntrigueCorruptionTopValue = iota HistoricalEventFailedIntrigueCorruptionTopValue_Law HistoricalEventFailedIntrigueCorruptionTopValue_Power ) func parseHistoricalEventFailedIntrigueCorruptionTopValue(s string) HistoricalEventFailedIntrigueCorruptionTopValue { switch s { case "law": return HistoricalEventFailedIntrigueCorruptionTopValue_Law case "power": return HistoricalEventFailedIntrigueCorruptionTopValue_Power } return HistoricalEventFailedIntrigueCorruptionTopValue_Unknown } func (s HistoricalEventFailedIntrigueCorruptionTopValue) String() string { switch s { case HistoricalEventFailedIntrigueCorruptionTopValue_Law: return "law" case HistoricalEventFailedIntrigueCorruptionTopValue_Power: return "power" } return "unknown" } func (s HistoricalEventFailedIntrigueCorruptionTopValue) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventFailedIntrigueCorruption struct { Action HistoricalEventFailedIntrigueCorruptionAction `json:"action" legend:"base"` // action AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus CorruptorHfid int `json:"corruptorHfid" legend:"base"` // corruptor_hfid CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` // corruptor_identity FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id LureHfid int `json:"lureHfid" legend:"base"` // lure_hfid Method HistoricalEventFailedIntrigueCorruptionMethod `json:"method" legend:"base"` // method RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid TargetIdentity int `json:"targetIdentity" legend:"base"` // target_identity TopFacet HistoricalEventFailedIntrigueCorruptionTopFacet `json:"topFacet" legend:"base"` // top_facet TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating TopRelationshipFactor HistoricalEventFailedIntrigueCorruptionTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating TopValue HistoricalEventFailedIntrigueCorruptionTopValue `json:"topValue" legend:"base"` // top_value TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating } func (x *HistoricalEventFailedIntrigueCorruption) Type() string { return "failed intrigue corruption" } func (x *HistoricalEventFailedIntrigueCorruption) RelatedToEntity(id int) bool { return x.CorruptorIdentity == id || x.RelevantEntityId == id || x.TargetIdentity == id } func (x *HistoricalEventFailedIntrigueCorruption) RelatedToHf(id int) bool { return x.CorruptorHfid == id || x.LureHfid == id || x.TargetHfid == id } func (x *HistoricalEventFailedIntrigueCorruption) CheckFields() { } type HistoricalEventFieldBattle struct { ASupportMercEnid int `json:"aSupportMercEnid" legend:"base"` // a_support_merc_enid AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id AttackerGeneralHfid int `json:"attackerGeneralHfid" legend:"base"` // attacker_general_hfid AttackerMercEnid int `json:"attackerMercEnid" legend:"base"` // attacker_merc_enid Coords string `json:"coords" legend:"base"` // coords DSupportMercEnid int `json:"dSupportMercEnid" legend:"base"` // d_support_merc_enid DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id DefenderGeneralHfid int `json:"defenderGeneralHfid" legend:"base"` // defender_general_hfid DefenderMercEnid int `json:"defenderMercEnid" legend:"base"` // defender_merc_enid FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventFieldBattle) Type() string { return "field battle" } func (x *HistoricalEventFieldBattle) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id } func (x *HistoricalEventFieldBattle) RelatedToHf(id int) bool { return x.AttackerGeneralHfid == id || x.DefenderGeneralHfid == id } func (x *HistoricalEventFieldBattle) CheckFields() { } type HistoricalEventFirstContact struct { ContactedEnid int `json:"contactedEnid" legend:"base"` // contacted_enid ContactorEnid int `json:"contactorEnid" legend:"base"` // contactor_enid SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventFirstContact) Type() string { return "first contact" } func (x *HistoricalEventFirstContact) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventFirstContact) RelatedToHf(id int) bool { return false } func (x *HistoricalEventFirstContact) CheckFields() { } type HistoricalEventGamble struct { GamblerHfid int `json:"gamblerHfid" legend:"base"` // gambler_hfid NewAccount int `json:"newAccount" legend:"base"` // new_account OldAccount int `json:"oldAccount" legend:"base"` // old_account SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventGamble) Type() string { return "gamble" } func (x *HistoricalEventGamble) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventGamble) RelatedToHf(id int) bool { return x.GamblerHfid == id } func (x *HistoricalEventGamble) CheckFields() { } type HistoricalEventHfAbducted struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id SiteId int `json:"siteId" legend:"base"` // site_id SnatcherHfid int `json:"snatcherHfid" legend:"base"` // snatcher_hfid SubregionId int `json:"subregionId" legend:"base"` // subregion_id TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid } func (x *HistoricalEventHfAbducted) Type() string { return "hf abducted" } func (x *HistoricalEventHfAbducted) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfAbducted) RelatedToHf(id int) bool { return x.SnatcherHfid == id || x.TargetHfid == id } func (x *HistoricalEventHfAbducted) CheckFields() { } type HistoricalEventHfAttackedSite struct { AttackerHfid int `json:"attackerHfid" legend:"base"` // attacker_hfid DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventHfAttackedSite) Type() string { return "hf attacked site" } func (x *HistoricalEventHfAttackedSite) RelatedToEntity(id int) bool { return x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventHfAttackedSite) RelatedToHf(id int) bool { return x.AttackerHfid == id } func (x *HistoricalEventHfAttackedSite) CheckFields() { } type HistoricalEventHfConfrontedReason int const ( HistoricalEventHfConfrontedReason_Unknown HistoricalEventHfConfrontedReason = iota HistoricalEventHfConfrontedReason_Ageless HistoricalEventHfConfrontedReason_Murder ) func parseHistoricalEventHfConfrontedReason(s string) HistoricalEventHfConfrontedReason { switch s { case "ageless": return HistoricalEventHfConfrontedReason_Ageless case "murder": return HistoricalEventHfConfrontedReason_Murder } return HistoricalEventHfConfrontedReason_Unknown } func (s HistoricalEventHfConfrontedReason) String() string { switch s { case HistoricalEventHfConfrontedReason_Ageless: return "ageless" case HistoricalEventHfConfrontedReason_Murder: return "murder" } return "unknown" } func (s HistoricalEventHfConfrontedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfConfrontedSituation int const ( HistoricalEventHfConfrontedSituation_Unknown HistoricalEventHfConfrontedSituation = iota HistoricalEventHfConfrontedSituation_GeneralSuspicion ) func parseHistoricalEventHfConfrontedSituation(s string) HistoricalEventHfConfrontedSituation { switch s { case "general suspicion": return HistoricalEventHfConfrontedSituation_GeneralSuspicion } return HistoricalEventHfConfrontedSituation_Unknown } func (s HistoricalEventHfConfrontedSituation) String() string { switch s { case HistoricalEventHfConfrontedSituation_GeneralSuspicion: return "general suspicion" } return "unknown" } func (s HistoricalEventHfConfrontedSituation) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfConfronted struct { Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Hfid int `json:"hfid" legend:"base"` // hfid Reason []HistoricalEventHfConfrontedReason `json:"reason" legend:"base"` // reason SiteId int `json:"siteId" legend:"base"` // site_id Situation HistoricalEventHfConfrontedSituation `json:"situation" legend:"base"` // situation SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfConfronted) Type() string { return "hf confronted" } func (x *HistoricalEventHfConfronted) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfConfronted) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventHfConfronted) CheckFields() { } type HistoricalEventHfConvictedCrime int const ( HistoricalEventHfConvictedCrime_Unknown HistoricalEventHfConvictedCrime = iota HistoricalEventHfConvictedCrime_AttemptedKidnapping HistoricalEventHfConvictedCrime_AttemptedMurder HistoricalEventHfConvictedCrime_AttemptedTheft HistoricalEventHfConvictedCrime_Bribery HistoricalEventHfConvictedCrime_BuildingDestruction HistoricalEventHfConvictedCrime_DisorderlyConduct HistoricalEventHfConvictedCrime_Embezzlement HistoricalEventHfConvictedCrime_Espionage HistoricalEventHfConvictedCrime_Murder HistoricalEventHfConvictedCrime_Theft HistoricalEventHfConvictedCrime_Treason HistoricalEventHfConvictedCrime_Vandalism ) func parseHistoricalEventHfConvictedCrime(s string) HistoricalEventHfConvictedCrime { switch s { case "attempted kidnapping": return HistoricalEventHfConvictedCrime_AttemptedKidnapping case "attempted murder": return HistoricalEventHfConvictedCrime_AttemptedMurder case "attempted theft": return HistoricalEventHfConvictedCrime_AttemptedTheft case "bribery": return HistoricalEventHfConvictedCrime_Bribery case "building destruction": return HistoricalEventHfConvictedCrime_BuildingDestruction case "disorderly conduct": return HistoricalEventHfConvictedCrime_DisorderlyConduct case "embezzlement": return HistoricalEventHfConvictedCrime_Embezzlement case "espionage": return HistoricalEventHfConvictedCrime_Espionage case "murder": return HistoricalEventHfConvictedCrime_Murder case "theft": return HistoricalEventHfConvictedCrime_Theft case "treason": return HistoricalEventHfConvictedCrime_Treason case "vandalism": return HistoricalEventHfConvictedCrime_Vandalism } return HistoricalEventHfConvictedCrime_Unknown } func (s HistoricalEventHfConvictedCrime) String() string { switch s { case HistoricalEventHfConvictedCrime_AttemptedKidnapping: return "attempted kidnapping" case HistoricalEventHfConvictedCrime_AttemptedMurder: return "attempted murder" case HistoricalEventHfConvictedCrime_AttemptedTheft: return "attempted theft" case HistoricalEventHfConvictedCrime_Bribery: return "bribery" case HistoricalEventHfConvictedCrime_BuildingDestruction: return "building destruction" case HistoricalEventHfConvictedCrime_DisorderlyConduct: return "disorderly conduct" case HistoricalEventHfConvictedCrime_Embezzlement: return "embezzlement" case HistoricalEventHfConvictedCrime_Espionage: return "espionage" case HistoricalEventHfConvictedCrime_Murder: return "murder" case HistoricalEventHfConvictedCrime_Theft: return "theft" case HistoricalEventHfConvictedCrime_Treason: return "treason" case HistoricalEventHfConvictedCrime_Vandalism: return "vandalism" } return "unknown" } func (s HistoricalEventHfConvictedCrime) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfConvicted struct { Beating bool `json:"beating" legend:"base"` // beating CoconspiratorHfid int `json:"coconspiratorHfid" legend:"base"` // coconspirator_hfid ConfessedAfterApbArrestEnid int `json:"confessedAfterApbArrestEnid" legend:"base"` // confessed_after_apb_arrest_enid ContactHfid int `json:"contactHfid" legend:"base"` // contact_hfid ConvictIsContact bool `json:"convictIsContact" legend:"base"` // convict_is_contact ConvictedHfid int `json:"convictedHfid" legend:"base"` // convicted_hfid ConvicterEnid int `json:"convicterEnid" legend:"base"` // convicter_enid CorruptConvicterHfid int `json:"corruptConvicterHfid" legend:"base"` // corrupt_convicter_hfid Crime HistoricalEventHfConvictedCrime `json:"crime" legend:"base"` // crime DeathPenalty bool `json:"deathPenalty" legend:"base"` // death_penalty DidNotRevealAllInInterrogation bool `json:"didNotRevealAllInInterrogation" legend:"base"` // did_not_reveal_all_in_interrogation Exiled bool `json:"exiled" legend:"base"` // exiled FooledHfid int `json:"fooledHfid" legend:"base"` // fooled_hfid FramerHfid int `json:"framerHfid" legend:"base"` // framer_hfid Hammerstrokes int `json:"hammerstrokes" legend:"base"` // hammerstrokes HeldFirmInInterrogation bool `json:"heldFirmInInterrogation" legend:"base"` // held_firm_in_interrogation ImplicatedHfid []int `json:"implicatedHfid" legend:"base"` // implicated_hfid InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` // interrogator_hfid NoPrisonAvailable bool `json:"noPrisonAvailable" legend:"base"` // no_prison_available PlotterHfid int `json:"plotterHfid" legend:"base"` // plotter_hfid PrisonMonths int `json:"prisonMonths" legend:"base"` // prison_months SurveiledCoconspirator bool `json:"surveiledCoconspirator" legend:"base"` // surveiled_coconspirator SurveiledContact bool `json:"surveiledContact" legend:"base"` // surveiled_contact SurveiledConvicted bool `json:"surveiledConvicted" legend:"base"` // surveiled_convicted SurveiledTarget bool `json:"surveiledTarget" legend:"base"` // surveiled_target TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid WrongfulConviction bool `json:"wrongfulConviction" legend:"base"` // wrongful_conviction } func (x *HistoricalEventHfConvicted) Type() string { return "hf convicted" } func (x *HistoricalEventHfConvicted) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfConvicted) RelatedToHf(id int) bool { return containsInt(x.ImplicatedHfid, id) || x.CoconspiratorHfid == id || x.ContactHfid == id || x.ConvictedHfid == id || x.CorruptConvicterHfid == id || x.FooledHfid == id || x.FramerHfid == id || x.InterrogatorHfid == id || x.PlotterHfid == id || x.TargetHfid == id } func (x *HistoricalEventHfConvicted) CheckFields() { } type HistoricalEventHfDestroyedSite struct { AttackerHfid int `json:"attackerHfid" legend:"base"` // attacker_hfid DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventHfDestroyedSite) Type() string { return "hf destroyed site" } func (x *HistoricalEventHfDestroyedSite) RelatedToEntity(id int) bool { return x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventHfDestroyedSite) RelatedToHf(id int) bool { return x.AttackerHfid == id } func (x *HistoricalEventHfDestroyedSite) CheckFields() { } type HistoricalEventHfDiedDeathCause int const ( HistoricalEventHfDiedDeathCause_Unknown HistoricalEventHfDiedDeathCause = iota HistoricalEventHfDiedDeathCause_Behead HistoricalEventHfDiedDeathCause_Bleed HistoricalEventHfDiedDeathCause_BurnAlive HistoricalEventHfDiedDeathCause_BuryAlive HistoricalEventHfDiedDeathCause_Cavein HistoricalEventHfDiedDeathCause_Crucify HistoricalEventHfDiedDeathCause_Drown HistoricalEventHfDiedDeathCause_DrownAlt HistoricalEventHfDiedDeathCause_DrownAltTwo HistoricalEventHfDiedDeathCause_ExecutionGeneric HistoricalEventHfDiedDeathCause_FeedToBeasts HistoricalEventHfDiedDeathCause_HackToPieces HistoricalEventHfDiedDeathCause_Heat HistoricalEventHfDiedDeathCause_Infection HistoricalEventHfDiedDeathCause_LeaptFromHeight HistoricalEventHfDiedDeathCause_Memorialize HistoricalEventHfDiedDeathCause_Murder HistoricalEventHfDiedDeathCause_OldAge HistoricalEventHfDiedDeathCause_Shot HistoricalEventHfDiedDeathCause_StruckDown HistoricalEventHfDiedDeathCause_Suffocate HistoricalEventHfDiedDeathCause_Thirst ) func parseHistoricalEventHfDiedDeathCause(s string) HistoricalEventHfDiedDeathCause { switch s { case "behead": return HistoricalEventHfDiedDeathCause_Behead case "bleed": return HistoricalEventHfDiedDeathCause_Bleed case "burn_alive": return HistoricalEventHfDiedDeathCause_BurnAlive case "bury_alive": return HistoricalEventHfDiedDeathCause_BuryAlive case "cavein": return HistoricalEventHfDiedDeathCause_Cavein case "crucify": return HistoricalEventHfDiedDeathCause_Crucify case "drown": return HistoricalEventHfDiedDeathCause_Drown case "drown_alt": return HistoricalEventHfDiedDeathCause_DrownAlt case "drown_alt2": return HistoricalEventHfDiedDeathCause_DrownAltTwo case "execution_generic": return HistoricalEventHfDiedDeathCause_ExecutionGeneric case "feed_to_beasts": return HistoricalEventHfDiedDeathCause_FeedToBeasts case "hack_to_pieces": return HistoricalEventHfDiedDeathCause_HackToPieces case "heat": return HistoricalEventHfDiedDeathCause_Heat case "infection": return HistoricalEventHfDiedDeathCause_Infection case "leapt_from_height": return HistoricalEventHfDiedDeathCause_LeaptFromHeight case "memorialize": return HistoricalEventHfDiedDeathCause_Memorialize case "murder": return HistoricalEventHfDiedDeathCause_Murder case "old_age": return HistoricalEventHfDiedDeathCause_OldAge case "shot": return HistoricalEventHfDiedDeathCause_Shot case "struck_down": return HistoricalEventHfDiedDeathCause_StruckDown case "suffocate": return HistoricalEventHfDiedDeathCause_Suffocate case "thirst": return HistoricalEventHfDiedDeathCause_Thirst } return HistoricalEventHfDiedDeathCause_Unknown } func (s HistoricalEventHfDiedDeathCause) String() string { switch s { case HistoricalEventHfDiedDeathCause_Behead: return "behead" case HistoricalEventHfDiedDeathCause_Bleed: return "bleed" case HistoricalEventHfDiedDeathCause_BurnAlive: return "burn alive" case HistoricalEventHfDiedDeathCause_BuryAlive: return "bury alive" case HistoricalEventHfDiedDeathCause_Cavein: return "cavein" case HistoricalEventHfDiedDeathCause_Crucify: return "crucify" case HistoricalEventHfDiedDeathCause_Drown: return "drown" case HistoricalEventHfDiedDeathCause_DrownAlt: return "drown alt" case HistoricalEventHfDiedDeathCause_DrownAltTwo: return "drown alt two" case HistoricalEventHfDiedDeathCause_ExecutionGeneric: return "execution generic" case HistoricalEventHfDiedDeathCause_FeedToBeasts: return "feed to beasts" case HistoricalEventHfDiedDeathCause_HackToPieces: return "hack to pieces" case HistoricalEventHfDiedDeathCause_Heat: return "heat" case HistoricalEventHfDiedDeathCause_Infection: return "infection" case HistoricalEventHfDiedDeathCause_LeaptFromHeight: return "leapt from height" case HistoricalEventHfDiedDeathCause_Memorialize: return "memorialize" case HistoricalEventHfDiedDeathCause_Murder: return "murder" case HistoricalEventHfDiedDeathCause_OldAge: return "old age" case HistoricalEventHfDiedDeathCause_Shot: return "shot" case HistoricalEventHfDiedDeathCause_StruckDown: return "struck down" case HistoricalEventHfDiedDeathCause_Suffocate: return "suffocate" case HistoricalEventHfDiedDeathCause_Thirst: return "thirst" } return "unknown" } func (s HistoricalEventHfDiedDeathCause) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfDiedItemSubtype int const ( HistoricalEventHfDiedItemSubtype_Unknown HistoricalEventHfDiedItemSubtype = iota HistoricalEventHfDiedItemSubtype_BattleAxe HistoricalEventHfDiedItemSubtype_Buckler HistoricalEventHfDiedItemSubtype_Pick HistoricalEventHfDiedItemSubtype_Shield HistoricalEventHfDiedItemSubtype_Spear HistoricalEventHfDiedItemSubtype_WarHammer ) func parseHistoricalEventHfDiedItemSubtype(s string) HistoricalEventHfDiedItemSubtype { switch s { case "battle axe": return HistoricalEventHfDiedItemSubtype_BattleAxe case "buckler": return HistoricalEventHfDiedItemSubtype_Buckler case "pick": return HistoricalEventHfDiedItemSubtype_Pick case "shield": return HistoricalEventHfDiedItemSubtype_Shield case "spear": return HistoricalEventHfDiedItemSubtype_Spear case "war hammer": return HistoricalEventHfDiedItemSubtype_WarHammer } return HistoricalEventHfDiedItemSubtype_Unknown } func (s HistoricalEventHfDiedItemSubtype) String() string { switch s { case HistoricalEventHfDiedItemSubtype_BattleAxe: return "battle axe" case HistoricalEventHfDiedItemSubtype_Buckler: return "buckler" case HistoricalEventHfDiedItemSubtype_Pick: return "pick" case HistoricalEventHfDiedItemSubtype_Shield: return "shield" case HistoricalEventHfDiedItemSubtype_Spear: return "spear" case HistoricalEventHfDiedItemSubtype_WarHammer: return "war hammer" } return "unknown" } func (s HistoricalEventHfDiedItemSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfDiedItemType int const ( HistoricalEventHfDiedItemType_Unknown HistoricalEventHfDiedItemType = iota HistoricalEventHfDiedItemType_None HistoricalEventHfDiedItemType_Shield HistoricalEventHfDiedItemType_Weapon ) func parseHistoricalEventHfDiedItemType(s string) HistoricalEventHfDiedItemType { switch s { case "none": return HistoricalEventHfDiedItemType_None case "shield": return HistoricalEventHfDiedItemType_Shield case "weapon": return HistoricalEventHfDiedItemType_Weapon } return HistoricalEventHfDiedItemType_Unknown } func (s HistoricalEventHfDiedItemType) String() string { switch s { case HistoricalEventHfDiedItemType_None: return "none" case HistoricalEventHfDiedItemType_Shield: return "shield" case HistoricalEventHfDiedItemType_Weapon: return "weapon" } return "unknown" } func (s HistoricalEventHfDiedItemType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfDiedMat int const ( HistoricalEventHfDiedMat_Unknown HistoricalEventHfDiedMat = iota HistoricalEventHfDiedMat_Bronze HistoricalEventHfDiedMat_Copper HistoricalEventHfDiedMat_Silver HistoricalEventHfDiedMat_SporeTree ) func parseHistoricalEventHfDiedMat(s string) HistoricalEventHfDiedMat { switch s { case "bronze": return HistoricalEventHfDiedMat_Bronze case "copper": return HistoricalEventHfDiedMat_Copper case "silver": return HistoricalEventHfDiedMat_Silver case "spore tree": return HistoricalEventHfDiedMat_SporeTree } return HistoricalEventHfDiedMat_Unknown } func (s HistoricalEventHfDiedMat) String() string { switch s { case HistoricalEventHfDiedMat_Bronze: return "bronze" case HistoricalEventHfDiedMat_Copper: return "copper" case HistoricalEventHfDiedMat_Silver: return "silver" case HistoricalEventHfDiedMat_SporeTree: return "spore tree" } return "unknown" } func (s HistoricalEventHfDiedMat) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfDied struct { Cause string `json:"cause" legend:"base"` // cause DeathCause HistoricalEventHfDiedDeathCause `json:"deathCause" legend:"plus"` // death_cause FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Hfid int `json:"hfid" legend:"base"` // hfid ItemSubtype HistoricalEventHfDiedItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype ItemType HistoricalEventHfDiedItemType `json:"itemType" legend:"plus"` // item_type Mat HistoricalEventHfDiedMat `json:"mat" legend:"plus"` // mat SiteId int `json:"siteId" legend:"base"` // site_id SlayerCaste string `json:"slayerCaste" legend:"both"` // slayer_caste SlayerHfid int `json:"slayerHfid" legend:"base"` // slayer_hfid SlayerItemId int `json:"slayerItemId" legend:"base"` // slayer_item_id SlayerRace string `json:"slayerRace" legend:"both"` // slayer_race SlayerShooterItemId int `json:"slayerShooterItemId" legend:"base"` // slayer_shooter_item_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfDied) Type() string { return "hf died" } func (x *HistoricalEventHfDied) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfDied) RelatedToHf(id int) bool { return x.Hfid == id || x.SlayerHfid == id } func (x *HistoricalEventHfDied) CheckFields() { } type HistoricalEventHfDisturbedStructureAction int const ( HistoricalEventHfDisturbedStructureAction_Unknown HistoricalEventHfDisturbedStructureAction = iota HistoricalEventHfDisturbedStructureAction_Disturb ) func parseHistoricalEventHfDisturbedStructureAction(s string) HistoricalEventHfDisturbedStructureAction { switch s { case "disturb": return HistoricalEventHfDisturbedStructureAction_Disturb } return HistoricalEventHfDisturbedStructureAction_Unknown } func (s HistoricalEventHfDisturbedStructureAction) String() string { switch s { case HistoricalEventHfDisturbedStructureAction_Disturb: return "disturb" } return "unknown" } func (s HistoricalEventHfDisturbedStructureAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfDisturbedStructure struct { Action HistoricalEventHfDisturbedStructureAction `json:"action" legend:"plus"` // action HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventHfDisturbedStructure) Type() string { return "hf disturbed structure" } func (x *HistoricalEventHfDisturbedStructure) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfDisturbedStructure) RelatedToHf(id int) bool { return false } func (x *HistoricalEventHfDisturbedStructure) CheckFields() { } type HistoricalEventHfDoesInteraction struct { DoerHfid int `json:"doerHfid" legend:"base"` // doer_hfid Interaction string `json:"interaction" legend:"base"` // interaction InteractionAction string `json:"interactionAction" legend:"plus"` // interaction_action Region int `json:"region" legend:"plus"` // region Site int `json:"site" legend:"plus"` // site Source int `json:"source" legend:"plus"` // source TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid } func (x *HistoricalEventHfDoesInteraction) Type() string { return "hf does interaction" } func (x *HistoricalEventHfDoesInteraction) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfDoesInteraction) RelatedToHf(id int) bool { return x.DoerHfid == id || x.TargetHfid == id } func (x *HistoricalEventHfDoesInteraction) CheckFields() { if x.InteractionAction != x.Interaction && x.InteractionAction != "" && x.Interaction != "" { sameFields["HistoricalEventHfDoesInteraction"]["InteractionAction"]["Interaction"] = false } if x.Region != x.DoerHfid && x.Region != 0 && x.DoerHfid != 0 { sameFields["HistoricalEventHfDoesInteraction"]["Region"]["DoerHfid"] = false } if x.Region != x.TargetHfid && x.Region != 0 && x.TargetHfid != 0 { sameFields["HistoricalEventHfDoesInteraction"]["Region"]["TargetHfid"] = false } if x.Site != x.DoerHfid && x.Site != 0 && x.DoerHfid != 0 { sameFields["HistoricalEventHfDoesInteraction"]["Site"]["DoerHfid"] = false } if x.Site != x.TargetHfid && x.Site != 0 && x.TargetHfid != 0 { sameFields["HistoricalEventHfDoesInteraction"]["Site"]["TargetHfid"] = false } if x.Source != x.DoerHfid && x.Source != 0 && x.DoerHfid != 0 { sameFields["HistoricalEventHfDoesInteraction"]["Source"]["DoerHfid"] = false } if x.Source != x.TargetHfid && x.Source != 0 && x.TargetHfid != 0 { sameFields["HistoricalEventHfDoesInteraction"]["Source"]["TargetHfid"] = false } } type HistoricalEventHfEnslaved struct { EnslavedHfid int `json:"enslavedHfid" legend:"base"` // enslaved_hfid MovedToSiteId int `json:"movedToSiteId" legend:"base"` // moved_to_site_id PayerEntityId int `json:"payerEntityId" legend:"base"` // payer_entity_id SellerHfid int `json:"sellerHfid" legend:"base"` // seller_hfid } func (x *HistoricalEventHfEnslaved) Type() string { return "hf enslaved" } func (x *HistoricalEventHfEnslaved) RelatedToEntity(id int) bool { return x.PayerEntityId == id } func (x *HistoricalEventHfEnslaved) RelatedToHf(id int) bool { return x.EnslavedHfid == id || x.SellerHfid == id } func (x *HistoricalEventHfEnslaved) CheckFields() { } type HistoricalEventHfEquipmentPurchase struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid Quality int `json:"quality" legend:"base"` // quality SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfEquipmentPurchase) Type() string { return "hf equipment purchase" } func (x *HistoricalEventHfEquipmentPurchase) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfEquipmentPurchase) RelatedToHf(id int) bool { return x.GroupHfid == id } func (x *HistoricalEventHfEquipmentPurchase) CheckFields() { } type HistoricalEventHfFreed struct { FreeingHfid int `json:"freeingHfid" legend:"base"` // freeing_hfid HoldingCivId int `json:"holdingCivId" legend:"base"` // holding_civ_id RescuedHfid int `json:"rescuedHfid" legend:"base"` // rescued_hfid SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventHfFreed) Type() string { return "hf freed" } func (x *HistoricalEventHfFreed) RelatedToEntity(id int) bool { return x.HoldingCivId == id || x.SiteCivId == id } func (x *HistoricalEventHfFreed) RelatedToHf(id int) bool { return x.FreeingHfid == id || x.RescuedHfid == id } func (x *HistoricalEventHfFreed) CheckFields() { } type HistoricalEventHfGainsSecretGoalSecretGoal int const ( HistoricalEventHfGainsSecretGoalSecretGoal_Unknown HistoricalEventHfGainsSecretGoalSecretGoal = iota HistoricalEventHfGainsSecretGoalSecretGoal_Immortality ) func parseHistoricalEventHfGainsSecretGoalSecretGoal(s string) HistoricalEventHfGainsSecretGoalSecretGoal { switch s { case "immortality": return HistoricalEventHfGainsSecretGoalSecretGoal_Immortality } return HistoricalEventHfGainsSecretGoalSecretGoal_Unknown } func (s HistoricalEventHfGainsSecretGoalSecretGoal) String() string { switch s { case HistoricalEventHfGainsSecretGoalSecretGoal_Immortality: return "immortality" } return "unknown" } func (s HistoricalEventHfGainsSecretGoalSecretGoal) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfGainsSecretGoal struct { Hfid int `json:"hfid" legend:"base"` // hfid SecretGoal HistoricalEventHfGainsSecretGoalSecretGoal `json:"secretGoal" legend:"base"` // secret_goal } func (x *HistoricalEventHfGainsSecretGoal) Type() string { return "hf gains secret goal" } func (x *HistoricalEventHfGainsSecretGoal) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfGainsSecretGoal) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventHfGainsSecretGoal) CheckFields() { } type HistoricalEventHfInterrogated struct { ArrestingEnid int `json:"arrestingEnid" legend:"base"` // arresting_enid HeldFirmInInterrogation bool `json:"heldFirmInInterrogation" legend:"base"` // held_firm_in_interrogation ImplicatedHfid int `json:"implicatedHfid" legend:"base"` // implicated_hfid InterrogatorHfid int `json:"interrogatorHfid" legend:"base"` // interrogator_hfid TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid WantedAndRecognized bool `json:"wantedAndRecognized" legend:"base"` // wanted_and_recognized } func (x *HistoricalEventHfInterrogated) Type() string { return "hf interrogated" } func (x *HistoricalEventHfInterrogated) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfInterrogated) RelatedToHf(id int) bool { return x.ImplicatedHfid == id || x.InterrogatorHfid == id || x.TargetHfid == id } func (x *HistoricalEventHfInterrogated) CheckFields() { } type HistoricalEventHfLearnsSecretSecretText int const ( HistoricalEventHfLearnsSecretSecretText_Unknown HistoricalEventHfLearnsSecretSecretText = iota HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath ) func parseHistoricalEventHfLearnsSecretSecretText(s string) HistoricalEventHfLearnsSecretSecretText { switch s { case "the secrets of life and death": return HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath } return HistoricalEventHfLearnsSecretSecretText_Unknown } func (s HistoricalEventHfLearnsSecretSecretText) String() string { switch s { case HistoricalEventHfLearnsSecretSecretText_TheSecretsOfLifeAndDeath: return "the secrets of life and death" } return "unknown" } func (s HistoricalEventHfLearnsSecretSecretText) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfLearnsSecret struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id Interaction string `json:"interaction" legend:"base"` // interaction SecretText HistoricalEventHfLearnsSecretSecretText `json:"secretText" legend:"plus"` // secret_text StudentHfid int `json:"studentHfid" legend:"base"` // student_hfid TeacherHfid int `json:"teacherHfid" legend:"base"` // teacher_hfid } func (x *HistoricalEventHfLearnsSecret) Type() string { return "hf learns secret" } func (x *HistoricalEventHfLearnsSecret) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfLearnsSecret) RelatedToHf(id int) bool { return x.StudentHfid == id || x.TeacherHfid == id } func (x *HistoricalEventHfLearnsSecret) CheckFields() { } type HistoricalEventHfNewPet struct { Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid Pets string `json:"pets" legend:"plus"` // pets SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfNewPet) Type() string { return "hf new pet" } func (x *HistoricalEventHfNewPet) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfNewPet) RelatedToHf(id int) bool { return x.GroupHfid == id } func (x *HistoricalEventHfNewPet) CheckFields() { if x.Pets != x.Coords && x.Pets != "" && x.Coords != "" { sameFields["HistoricalEventHfNewPet"]["Pets"]["Coords"] = false } } type HistoricalEventHfPerformedHorribleExperiments struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id GroupHfid int `json:"groupHfid" legend:"base"` // group_hfid SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfPerformedHorribleExperiments) Type() string { return "hf performed horrible experiments" } func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfPerformedHorribleExperiments) RelatedToHf(id int) bool { return x.GroupHfid == id } func (x *HistoricalEventHfPerformedHorribleExperiments) CheckFields() { } type HistoricalEventHfPrayedInsideStructureAction int const ( HistoricalEventHfPrayedInsideStructureAction_Unknown HistoricalEventHfPrayedInsideStructureAction = iota HistoricalEventHfPrayedInsideStructureAction_Prayedinside ) func parseHistoricalEventHfPrayedInsideStructureAction(s string) HistoricalEventHfPrayedInsideStructureAction { switch s { case "prayedinside": return HistoricalEventHfPrayedInsideStructureAction_Prayedinside } return HistoricalEventHfPrayedInsideStructureAction_Unknown } func (s HistoricalEventHfPrayedInsideStructureAction) String() string { switch s { case HistoricalEventHfPrayedInsideStructureAction_Prayedinside: return "prayedinside" } return "unknown" } func (s HistoricalEventHfPrayedInsideStructureAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfPrayedInsideStructure struct { Action HistoricalEventHfPrayedInsideStructureAction `json:"action" legend:"plus"` // action HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventHfPrayedInsideStructure) Type() string { return "hf prayed inside structure" } func (x *HistoricalEventHfPrayedInsideStructure) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfPrayedInsideStructure) RelatedToHf(id int) bool { return false } func (x *HistoricalEventHfPrayedInsideStructure) CheckFields() { } type HistoricalEventHfPreachTopic int const ( HistoricalEventHfPreachTopic_Unknown HistoricalEventHfPreachTopic = iota HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo ) func parseHistoricalEventHfPreachTopic(s string) HistoricalEventHfPreachTopic { switch s { case "entity 1 should love entity 2": return HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo case "set entity 1 against entity 2": return HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo } return HistoricalEventHfPreachTopic_Unknown } func (s HistoricalEventHfPreachTopic) String() string { switch s { case HistoricalEventHfPreachTopic_Entity1ShouldLoveEntityTwo: return "entity 1 should love entity two" case HistoricalEventHfPreachTopic_SetEntity1AgainstEntityTwo: return "set entity 1 against entity two" } return "unknown" } func (s HistoricalEventHfPreachTopic) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfPreach struct { Entity1 int `json:"entity1" legend:"base"` // entity_1 Entity2 int `json:"entity2" legend:"base"` // entity_2 SiteHfid int `json:"siteHfid" legend:"base"` // site_hfid SpeakerHfid int `json:"speakerHfid" legend:"base"` // speaker_hfid Topic HistoricalEventHfPreachTopic `json:"topic" legend:"base"` // topic } func (x *HistoricalEventHfPreach) Type() string { return "hf preach" } func (x *HistoricalEventHfPreach) RelatedToEntity(id int) bool { return x.Entity1 == id || x.Entity2 == id } func (x *HistoricalEventHfPreach) RelatedToHf(id int) bool { return x.SiteHfid == id || x.SpeakerHfid == id } func (x *HistoricalEventHfPreach) CheckFields() { } type HistoricalEventHfProfanedStructureAction int const ( HistoricalEventHfProfanedStructureAction_Unknown HistoricalEventHfProfanedStructureAction = iota HistoricalEventHfProfanedStructureAction_Profane ) func parseHistoricalEventHfProfanedStructureAction(s string) HistoricalEventHfProfanedStructureAction { switch s { case "profane": return HistoricalEventHfProfanedStructureAction_Profane } return HistoricalEventHfProfanedStructureAction_Unknown } func (s HistoricalEventHfProfanedStructureAction) String() string { switch s { case HistoricalEventHfProfanedStructureAction_Profane: return "profane" } return "unknown" } func (s HistoricalEventHfProfanedStructureAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfProfanedStructure struct { Action HistoricalEventHfProfanedStructureAction `json:"action" legend:"plus"` // action HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventHfProfanedStructure) Type() string { return "hf profaned structure" } func (x *HistoricalEventHfProfanedStructure) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfProfanedStructure) RelatedToHf(id int) bool { return false } func (x *HistoricalEventHfProfanedStructure) CheckFields() { } type HistoricalEventHfRansomed struct { MovedToSiteId int `json:"movedToSiteId" legend:"base"` // moved_to_site_id PayerEntityId int `json:"payerEntityId" legend:"base"` // payer_entity_id PayerHfid int `json:"payerHfid" legend:"base"` // payer_hfid RansomedHfid int `json:"ransomedHfid" legend:"base"` // ransomed_hfid RansomerHfid int `json:"ransomerHfid" legend:"base"` // ransomer_hfid } func (x *HistoricalEventHfRansomed) Type() string { return "hf ransomed" } func (x *HistoricalEventHfRansomed) RelatedToEntity(id int) bool { return x.PayerEntityId == id } func (x *HistoricalEventHfRansomed) RelatedToHf(id int) bool { return x.PayerHfid == id || x.RansomedHfid == id || x.RansomerHfid == id } func (x *HistoricalEventHfRansomed) CheckFields() { } type HistoricalEventHfReachSummit struct { Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id GroupHfid []int `json:"groupHfid" legend:"base"` // group_hfid SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfReachSummit) Type() string { return "hf reach summit" } func (x *HistoricalEventHfReachSummit) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfReachSummit) RelatedToHf(id int) bool { return containsInt(x.GroupHfid, id) } func (x *HistoricalEventHfReachSummit) CheckFields() { } type HistoricalEventHfRecruitedUnitTypeForEntityUnitType int const ( HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Unknown HistoricalEventHfRecruitedUnitTypeForEntityUnitType = iota HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk ) func parseHistoricalEventHfRecruitedUnitTypeForEntityUnitType(s string) HistoricalEventHfRecruitedUnitTypeForEntityUnitType { switch s { case "monk": return HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk } return HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Unknown } func (s HistoricalEventHfRecruitedUnitTypeForEntityUnitType) String() string { switch s { case HistoricalEventHfRecruitedUnitTypeForEntityUnitType_Monk: return "monk" } return "unknown" } func (s HistoricalEventHfRecruitedUnitTypeForEntityUnitType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfRecruitedUnitTypeForEntity struct { EntityId int `json:"entityId" legend:"base"` // entity_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Hfid int `json:"hfid" legend:"base"` // hfid SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id UnitType HistoricalEventHfRecruitedUnitTypeForEntityUnitType `json:"unitType" legend:"base"` // unit_type } func (x *HistoricalEventHfRecruitedUnitTypeForEntity) Type() string { return "hf recruited unit type for entity" } func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventHfRecruitedUnitTypeForEntity) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventHfRecruitedUnitTypeForEntity) CheckFields() { } type HistoricalEventHfRelationshipDeniedReason int const ( HistoricalEventHfRelationshipDeniedReason_Unknown HistoricalEventHfRelationshipDeniedReason = iota HistoricalEventHfRelationshipDeniedReason_Jealousy HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone ) func parseHistoricalEventHfRelationshipDeniedReason(s string) HistoricalEventHfRelationshipDeniedReason { switch s { case "jealousy": return HistoricalEventHfRelationshipDeniedReason_Jealousy case "prefers working alone": return HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone } return HistoricalEventHfRelationshipDeniedReason_Unknown } func (s HistoricalEventHfRelationshipDeniedReason) String() string { switch s { case HistoricalEventHfRelationshipDeniedReason_Jealousy: return "jealousy" case HistoricalEventHfRelationshipDeniedReason_PrefersWorkingAlone: return "prefers working alone" } return "unknown" } func (s HistoricalEventHfRelationshipDeniedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfRelationshipDeniedRelationship int const ( HistoricalEventHfRelationshipDeniedRelationship_Unknown HistoricalEventHfRelationshipDeniedRelationship = iota HistoricalEventHfRelationshipDeniedRelationship_Apprentice ) func parseHistoricalEventHfRelationshipDeniedRelationship(s string) HistoricalEventHfRelationshipDeniedRelationship { switch s { case "apprentice": return HistoricalEventHfRelationshipDeniedRelationship_Apprentice } return HistoricalEventHfRelationshipDeniedRelationship_Unknown } func (s HistoricalEventHfRelationshipDeniedRelationship) String() string { switch s { case HistoricalEventHfRelationshipDeniedRelationship_Apprentice: return "apprentice" } return "unknown" } func (s HistoricalEventHfRelationshipDeniedRelationship) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfRelationshipDenied struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Reason HistoricalEventHfRelationshipDeniedReason `json:"reason" legend:"base"` // reason ReasonId int `json:"reasonId" legend:"base"` // reason_id Relationship HistoricalEventHfRelationshipDeniedRelationship `json:"relationship" legend:"base"` // relationship SeekerHfid int `json:"seekerHfid" legend:"base"` // seeker_hfid SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid } func (x *HistoricalEventHfRelationshipDenied) Type() string { return "hf relationship denied" } func (x *HistoricalEventHfRelationshipDenied) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfRelationshipDenied) RelatedToHf(id int) bool { return x.SeekerHfid == id || x.TargetHfid == id } func (x *HistoricalEventHfRelationshipDenied) CheckFields() { } type HistoricalEventHfReunion struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Group1Hfid int `json:"group1Hfid" legend:"base"` // group_1_hfid Group2Hfid []int `json:"group2Hfid" legend:"base"` // group_2_hfid SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfReunion) Type() string { return "hf reunion" } func (x *HistoricalEventHfReunion) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfReunion) RelatedToHf(id int) bool { return containsInt(x.Group2Hfid, id) || x.Group1Hfid == id } func (x *HistoricalEventHfReunion) CheckFields() { } type HistoricalEventHfRevivedGhost int const ( HistoricalEventHfRevivedGhost_Unknown HistoricalEventHfRevivedGhost = iota HistoricalEventHfRevivedGhost_AngryGhost HistoricalEventHfRevivedGhost_EnergeticPoltergeist HistoricalEventHfRevivedGhost_ForlornHaunt HistoricalEventHfRevivedGhost_HowlingSpirit HistoricalEventHfRevivedGhost_MoaningSpirit HistoricalEventHfRevivedGhost_MurderousGhost HistoricalEventHfRevivedGhost_RestlessHaunt HistoricalEventHfRevivedGhost_SecretivePoltergeist HistoricalEventHfRevivedGhost_TroublesomePoltergeist HistoricalEventHfRevivedGhost_ViolentGhost ) func parseHistoricalEventHfRevivedGhost(s string) HistoricalEventHfRevivedGhost { switch s { case "angry ghost": return HistoricalEventHfRevivedGhost_AngryGhost case "energetic poltergeist": return HistoricalEventHfRevivedGhost_EnergeticPoltergeist case "forlorn haunt": return HistoricalEventHfRevivedGhost_ForlornHaunt case "howling spirit": return HistoricalEventHfRevivedGhost_HowlingSpirit case "moaning spirit": return HistoricalEventHfRevivedGhost_MoaningSpirit case "murderous ghost": return HistoricalEventHfRevivedGhost_MurderousGhost case "restless haunt": return HistoricalEventHfRevivedGhost_RestlessHaunt case "secretive poltergeist": return HistoricalEventHfRevivedGhost_SecretivePoltergeist case "troublesome poltergeist": return HistoricalEventHfRevivedGhost_TroublesomePoltergeist case "violent ghost": return HistoricalEventHfRevivedGhost_ViolentGhost } return HistoricalEventHfRevivedGhost_Unknown } func (s HistoricalEventHfRevivedGhost) String() string { switch s { case HistoricalEventHfRevivedGhost_AngryGhost: return "angry ghost" case HistoricalEventHfRevivedGhost_EnergeticPoltergeist: return "energetic poltergeist" case HistoricalEventHfRevivedGhost_ForlornHaunt: return "forlorn haunt" case HistoricalEventHfRevivedGhost_HowlingSpirit: return "howling spirit" case HistoricalEventHfRevivedGhost_MoaningSpirit: return "moaning spirit" case HistoricalEventHfRevivedGhost_MurderousGhost: return "murderous ghost" case HistoricalEventHfRevivedGhost_RestlessHaunt: return "restless haunt" case HistoricalEventHfRevivedGhost_SecretivePoltergeist: return "secretive poltergeist" case HistoricalEventHfRevivedGhost_TroublesomePoltergeist: return "troublesome poltergeist" case HistoricalEventHfRevivedGhost_ViolentGhost: return "violent ghost" } return "unknown" } func (s HistoricalEventHfRevivedGhost) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfRevived struct { ActorHfid int `json:"actorHfid" legend:"base"` // actor_hfid Disturbance bool `json:"disturbance" legend:"base"` // disturbance FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Ghost HistoricalEventHfRevivedGhost `json:"ghost" legend:"base"` // ghost Hfid int `json:"hfid" legend:"base"` // hfid RaisedBefore bool `json:"raisedBefore" legend:"base"` // raised_before SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfRevived) Type() string { return "hf revived" } func (x *HistoricalEventHfRevived) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfRevived) RelatedToHf(id int) bool { return x.ActorHfid == id || x.Hfid == id } func (x *HistoricalEventHfRevived) CheckFields() { } type HistoricalEventHfSimpleBattleEventSubtype int const ( HistoricalEventHfSimpleBattleEventSubtype_Unknown HistoricalEventHfSimpleBattleEventSubtype = iota HistoricalEventHfSimpleBattleEventSubtype_Ambushed HistoricalEventHfSimpleBattleEventSubtype_Attacked HistoricalEventHfSimpleBattleEventSubtype_Confront HistoricalEventHfSimpleBattleEventSubtype_Corner HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl HistoricalEventHfSimpleBattleEventSubtype_HappenUpon HistoricalEventHfSimpleBattleEventSubtype_Scuffle HistoricalEventHfSimpleBattleEventSubtype_Subdued HistoricalEventHfSimpleBattleEventSubtype_Surprised HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds ) func parseHistoricalEventHfSimpleBattleEventSubtype(s string) HistoricalEventHfSimpleBattleEventSubtype { switch s { case "2 lost after giving wounds": return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds case "2 lost after mutual wounds": return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds case "2 lost after receiving wounds": return HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds case "ambushed": return HistoricalEventHfSimpleBattleEventSubtype_Ambushed case "attacked": return HistoricalEventHfSimpleBattleEventSubtype_Attacked case "confront": return HistoricalEventHfSimpleBattleEventSubtype_Confront case "corner": return HistoricalEventHfSimpleBattleEventSubtype_Corner case "got into a brawl": return HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl case "happen upon": return HistoricalEventHfSimpleBattleEventSubtype_HappenUpon case "scuffle": return HistoricalEventHfSimpleBattleEventSubtype_Scuffle case "subdued": return HistoricalEventHfSimpleBattleEventSubtype_Subdued case "surprised": return HistoricalEventHfSimpleBattleEventSubtype_Surprised } return HistoricalEventHfSimpleBattleEventSubtype_Unknown } func (s HistoricalEventHfSimpleBattleEventSubtype) String() string { switch s { case HistoricalEventHfSimpleBattleEventSubtype_Ambushed: return "ambushed" case HistoricalEventHfSimpleBattleEventSubtype_Attacked: return "attacked" case HistoricalEventHfSimpleBattleEventSubtype_Confront: return "confront" case HistoricalEventHfSimpleBattleEventSubtype_Corner: return "corner" case HistoricalEventHfSimpleBattleEventSubtype_GotIntoABrawl: return "got into a brawl" case HistoricalEventHfSimpleBattleEventSubtype_HappenUpon: return "happen upon" case HistoricalEventHfSimpleBattleEventSubtype_Scuffle: return "scuffle" case HistoricalEventHfSimpleBattleEventSubtype_Subdued: return "subdued" case HistoricalEventHfSimpleBattleEventSubtype_Surprised: return "surprised" case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterGivingWounds: return "two lost after giving wounds" case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterMutualWounds: return "two lost after mutual wounds" case HistoricalEventHfSimpleBattleEventSubtype_TwoLostAfterReceivingWounds: return "two lost after receiving wounds" } return "unknown" } func (s HistoricalEventHfSimpleBattleEventSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfSimpleBattleEvent struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id Group1Hfid int `json:"group1Hfid" legend:"base"` // group_1_hfid Group2Hfid int `json:"group2Hfid" legend:"base"` // group_2_hfid SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id Subtype HistoricalEventHfSimpleBattleEventSubtype `json:"subtype" legend:"base"` // subtype } func (x *HistoricalEventHfSimpleBattleEvent) Type() string { return "hf simple battle event" } func (x *HistoricalEventHfSimpleBattleEvent) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfSimpleBattleEvent) RelatedToHf(id int) bool { return x.Group1Hfid == id || x.Group2Hfid == id } func (x *HistoricalEventHfSimpleBattleEvent) CheckFields() { } type HistoricalEventHfTravel struct { Coords string `json:"coords" legend:"base"` // coords FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id GroupHfid []int `json:"groupHfid" legend:"base"` // group_hfid Return bool `json:"return" legend:"base"` // return SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfTravel) Type() string { return "hf travel" } func (x *HistoricalEventHfTravel) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfTravel) RelatedToHf(id int) bool { return containsInt(x.GroupHfid, id) } func (x *HistoricalEventHfTravel) CheckFields() { } type HistoricalEventHfViewedArtifact struct { ArtifactId int `json:"artifactId" legend:"base"` // artifact_id HistFigId int `json:"histFigId" legend:"base"` // hist_fig_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventHfViewedArtifact) Type() string { return "hf viewed artifact" } func (x *HistoricalEventHfViewedArtifact) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfViewedArtifact) RelatedToHf(id int) bool { return false } func (x *HistoricalEventHfViewedArtifact) CheckFields() { } type HistoricalEventHfWoundedInjuryType int const ( HistoricalEventHfWoundedInjuryType_Unknown HistoricalEventHfWoundedInjuryType = iota HistoricalEventHfWoundedInjuryType_Rip HistoricalEventHfWoundedInjuryType_Slash HistoricalEventHfWoundedInjuryType_Smash HistoricalEventHfWoundedInjuryType_Stab ) func parseHistoricalEventHfWoundedInjuryType(s string) HistoricalEventHfWoundedInjuryType { switch s { case "rip": return HistoricalEventHfWoundedInjuryType_Rip case "slash": return HistoricalEventHfWoundedInjuryType_Slash case "smash": return HistoricalEventHfWoundedInjuryType_Smash case "stab": return HistoricalEventHfWoundedInjuryType_Stab } return HistoricalEventHfWoundedInjuryType_Unknown } func (s HistoricalEventHfWoundedInjuryType) String() string { switch s { case HistoricalEventHfWoundedInjuryType_Rip: return "rip" case HistoricalEventHfWoundedInjuryType_Slash: return "slash" case HistoricalEventHfWoundedInjuryType_Smash: return "smash" case HistoricalEventHfWoundedInjuryType_Stab: return "stab" } return "unknown" } func (s HistoricalEventHfWoundedInjuryType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfWoundedPartLost int const ( HistoricalEventHfWoundedPartLost_Unknown HistoricalEventHfWoundedPartLost = iota HistoricalEventHfWoundedPartLost_False HistoricalEventHfWoundedPartLost_True ) func parseHistoricalEventHfWoundedPartLost(s string) HistoricalEventHfWoundedPartLost { switch s { case "false": return HistoricalEventHfWoundedPartLost_False case "true": return HistoricalEventHfWoundedPartLost_True } return HistoricalEventHfWoundedPartLost_Unknown } func (s HistoricalEventHfWoundedPartLost) String() string { switch s { case HistoricalEventHfWoundedPartLost_False: return "false" case HistoricalEventHfWoundedPartLost_True: return "true" } return "unknown" } func (s HistoricalEventHfWoundedPartLost) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfWounded struct { BodyPart int `json:"bodyPart" legend:"plus"` // body_part FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id InjuryType HistoricalEventHfWoundedInjuryType `json:"injuryType" legend:"plus"` // injury_type PartLost HistoricalEventHfWoundedPartLost `json:"partLost" legend:"plus"` // part_lost SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id WasTorture bool `json:"wasTorture" legend:"base"` // was_torture WoundeeCaste int `json:"woundeeCaste" legend:"plus"` // woundee_caste WoundeeHfid int `json:"woundeeHfid" legend:"base"` // woundee_hfid WoundeeRace int `json:"woundeeRace" legend:"plus"` // woundee_race WounderHfid int `json:"wounderHfid" legend:"base"` // wounder_hfid } func (x *HistoricalEventHfWounded) Type() string { return "hf wounded" } func (x *HistoricalEventHfWounded) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHfWounded) RelatedToHf(id int) bool { return x.WoundeeHfid == id || x.WounderHfid == id } func (x *HistoricalEventHfWounded) CheckFields() { if x.BodyPart != x.FeatureLayerId && x.BodyPart != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventHfWounded"]["BodyPart"]["FeatureLayerId"] = false } if x.BodyPart != x.SiteId && x.BodyPart != 0 && x.SiteId != 0 { sameFields["HistoricalEventHfWounded"]["BodyPart"]["SiteId"] = false } if x.BodyPart != x.SubregionId && x.BodyPart != 0 && x.SubregionId != 0 { sameFields["HistoricalEventHfWounded"]["BodyPart"]["SubregionId"] = false } if x.BodyPart != x.WoundeeHfid && x.BodyPart != 0 && x.WoundeeHfid != 0 { sameFields["HistoricalEventHfWounded"]["BodyPart"]["WoundeeHfid"] = false } if x.BodyPart != x.WounderHfid && x.BodyPart != 0 && x.WounderHfid != 0 { sameFields["HistoricalEventHfWounded"]["BodyPart"]["WounderHfid"] = false } if x.WoundeeCaste != x.FeatureLayerId && x.WoundeeCaste != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["FeatureLayerId"] = false } if x.WoundeeCaste != x.SiteId && x.WoundeeCaste != 0 && x.SiteId != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["SiteId"] = false } if x.WoundeeCaste != x.SubregionId && x.WoundeeCaste != 0 && x.SubregionId != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["SubregionId"] = false } if x.WoundeeCaste != x.WoundeeHfid && x.WoundeeCaste != 0 && x.WoundeeHfid != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["WoundeeHfid"] = false } if x.WoundeeCaste != x.WounderHfid && x.WoundeeCaste != 0 && x.WounderHfid != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeCaste"]["WounderHfid"] = false } if x.WoundeeRace != x.FeatureLayerId && x.WoundeeRace != 0 && x.FeatureLayerId != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["FeatureLayerId"] = false } if x.WoundeeRace != x.SiteId && x.WoundeeRace != 0 && x.SiteId != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["SiteId"] = false } if x.WoundeeRace != x.SubregionId && x.WoundeeRace != 0 && x.SubregionId != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["SubregionId"] = false } if x.WoundeeRace != x.WoundeeHfid && x.WoundeeRace != 0 && x.WoundeeHfid != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["WoundeeHfid"] = false } if x.WoundeeRace != x.WounderHfid && x.WoundeeRace != 0 && x.WounderHfid != 0 { sameFields["HistoricalEventHfWounded"]["WoundeeRace"]["WounderHfid"] = false } } type HistoricalEventHfsFormedIntrigueRelationshipAction int const ( HistoricalEventHfsFormedIntrigueRelationshipAction_Unknown HistoricalEventHfsFormedIntrigueRelationshipAction = iota HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace ) func parseHistoricalEventHfsFormedIntrigueRelationshipAction(s string) HistoricalEventHfsFormedIntrigueRelationshipAction { switch s { case "bring into network": return HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork case "corrupt in place": return HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace } return HistoricalEventHfsFormedIntrigueRelationshipAction_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipAction) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipAction_BringIntoNetwork: return "bring into network" case HistoricalEventHfsFormedIntrigueRelationshipAction_CorruptInPlace: return "corrupt in place" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipAction) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipCircumstance int const ( HistoricalEventHfsFormedIntrigueRelationshipCircumstance_Unknown HistoricalEventHfsFormedIntrigueRelationshipCircumstance = iota HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate ) func parseHistoricalEventHfsFormedIntrigueRelationshipCircumstance(s string) HistoricalEventHfsFormedIntrigueRelationshipCircumstance { switch s { case "is entity subordinate": return HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate } return HistoricalEventHfsFormedIntrigueRelationshipCircumstance_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipCircumstance) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipCircumstance_IsEntitySubordinate: return "is entity subordinate" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs int const ( HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Unknown HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs = iota HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector ) func parseHistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs(s string) HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs { switch s { case "master": return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master case "possibly unknown director": return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector } return HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_Master: return "master" case HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs_PossiblyUnknownDirector: return "possibly unknown director" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipMethod int const ( HistoricalEventHfsFormedIntrigueRelationshipMethod_Unknown HistoricalEventHfsFormedIntrigueRelationshipMethod = iota HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge ) func parseHistoricalEventHfsFormedIntrigueRelationshipMethod(s string) HistoricalEventHfsFormedIntrigueRelationshipMethod { switch s { case "blackmail over embezzlement": return HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement case "bribe": return HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe case "flatter": return HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter case "intimidate": return HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate case "offer immortality": return HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality case "precedence": return HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence case "religious sympathy": return HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy case "revenge on grudge": return HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge } return HistoricalEventHfsFormedIntrigueRelationshipMethod_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipMethod) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipMethod_BlackmailOverEmbezzlement: return "blackmail over embezzlement" case HistoricalEventHfsFormedIntrigueRelationshipMethod_Bribe: return "bribe" case HistoricalEventHfsFormedIntrigueRelationshipMethod_Flatter: return "flatter" case HistoricalEventHfsFormedIntrigueRelationshipMethod_Intimidate: return "intimidate" case HistoricalEventHfsFormedIntrigueRelationshipMethod_OfferImmortality: return "offer immortality" case HistoricalEventHfsFormedIntrigueRelationshipMethod_Precedence: return "precedence" case HistoricalEventHfsFormedIntrigueRelationshipMethod_ReligiousSympathy: return "religious sympathy" case HistoricalEventHfsFormedIntrigueRelationshipMethod_RevengeOnGrudge: return "revenge on grudge" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipMethod) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs int const ( HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_Unknown HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs = iota HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset ) func parseHistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs(s string) HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs { switch s { case "compromised position holder": return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder case "general purpose asset": return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset } return HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_CompromisedPositionHolder: return "compromised position holder" case HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs_GeneralPurposeAsset: return "general purpose asset" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipTopFacet int const ( HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopFacet = iota HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful ) func parseHistoricalEventHfsFormedIntrigueRelationshipTopFacet(s string) HistoricalEventHfsFormedIntrigueRelationshipTopFacet { switch s { case "ambition": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition case "confidence": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence case "envy propensity": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity case "fearlessness": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness case "greed": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed case "hope": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope case "pride": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride case "stress vulnerability": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability case "swayable": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable case "vanity": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity case "vengeful": return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful } return HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipTopFacet) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Ambition: return "ambition" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Confidence: return "confidence" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_EnvyPropensity: return "envy propensity" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Fearlessness: return "fearlessness" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Greed: return "greed" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Hope: return "hope" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Pride: return "pride" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_StressVulnerability: return "stress vulnerability" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Swayable: return "swayable" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vanity: return "vanity" case HistoricalEventHfsFormedIntrigueRelationshipTopFacet_Vengeful: return "vengeful" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipTopFacet) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor int const ( HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor = iota HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust ) func parseHistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor(s string) HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor { switch s { case "fear": return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear case "love": return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love case "loyalty": return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty case "trust": return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust } return HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Fear: return "fear" case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Love: return "love" case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Loyalty: return "loyalty" case HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor_Trust: return "trust" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationshipTopValue int const ( HistoricalEventHfsFormedIntrigueRelationshipTopValue_Unknown HistoricalEventHfsFormedIntrigueRelationshipTopValue = iota HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power ) func parseHistoricalEventHfsFormedIntrigueRelationshipTopValue(s string) HistoricalEventHfsFormedIntrigueRelationshipTopValue { switch s { case "law": return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law case "power": return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power } return HistoricalEventHfsFormedIntrigueRelationshipTopValue_Unknown } func (s HistoricalEventHfsFormedIntrigueRelationshipTopValue) String() string { switch s { case HistoricalEventHfsFormedIntrigueRelationshipTopValue_Law: return "law" case HistoricalEventHfsFormedIntrigueRelationshipTopValue_Power: return "power" } return "unknown" } func (s HistoricalEventHfsFormedIntrigueRelationshipTopValue) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedIntrigueRelationship struct { Action HistoricalEventHfsFormedIntrigueRelationshipAction `json:"action" legend:"base"` // action AllyDefenseBonus int `json:"allyDefenseBonus" legend:"base"` // ally_defense_bonus Circumstance HistoricalEventHfsFormedIntrigueRelationshipCircumstance `json:"circumstance" legend:"base"` // circumstance CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id CoconspiratorBonus int `json:"coconspiratorBonus" legend:"base"` // coconspirator_bonus CorruptorHfid int `json:"corruptorHfid" legend:"base"` // corruptor_hfid CorruptorIdentity int `json:"corruptorIdentity" legend:"base"` // corruptor_identity CorruptorSeenAs HistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs `json:"corruptorSeenAs" legend:"base"` // corruptor_seen_as FailedJudgmentTest bool `json:"failedJudgmentTest" legend:"base"` // failed_judgment_test FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id LureHfid int `json:"lureHfid" legend:"base"` // lure_hfid Method HistoricalEventHfsFormedIntrigueRelationshipMethod `json:"method" legend:"base"` // method RelevantEntityId int `json:"relevantEntityId" legend:"base"` // relevant_entity_id RelevantIdForMethod int `json:"relevantIdForMethod" legend:"base"` // relevant_id_for_method RelevantPositionProfileId int `json:"relevantPositionProfileId" legend:"base"` // relevant_position_profile_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id Successful bool `json:"successful" legend:"base"` // successful TargetHfid int `json:"targetHfid" legend:"base"` // target_hfid TargetIdentity int `json:"targetIdentity" legend:"base"` // target_identity TargetSeenAs HistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs `json:"targetSeenAs" legend:"base"` // target_seen_as TopFacet HistoricalEventHfsFormedIntrigueRelationshipTopFacet `json:"topFacet" legend:"base"` // top_facet TopFacetModifier int `json:"topFacetModifier" legend:"base"` // top_facet_modifier TopFacetRating int `json:"topFacetRating" legend:"base"` // top_facet_rating TopRelationshipFactor HistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor `json:"topRelationshipFactor" legend:"base"` // top_relationship_factor TopRelationshipModifier int `json:"topRelationshipModifier" legend:"base"` // top_relationship_modifier TopRelationshipRating int `json:"topRelationshipRating" legend:"base"` // top_relationship_rating TopValue HistoricalEventHfsFormedIntrigueRelationshipTopValue `json:"topValue" legend:"base"` // top_value TopValueModifier int `json:"topValueModifier" legend:"base"` // top_value_modifier TopValueRating int `json:"topValueRating" legend:"base"` // top_value_rating } func (x *HistoricalEventHfsFormedIntrigueRelationship) Type() string { return "hfs formed intrigue relationship" } func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToEntity(id int) bool { return x.CorruptorIdentity == id || x.RelevantEntityId == id || x.TargetIdentity == id } func (x *HistoricalEventHfsFormedIntrigueRelationship) RelatedToHf(id int) bool { return x.CorruptorHfid == id || x.LureHfid == id || x.TargetHfid == id } func (x *HistoricalEventHfsFormedIntrigueRelationship) CheckFields() { } type HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 int const ( HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_Unknown HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 = iota HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource ) func parseHistoricalEventHfsFormedReputationRelationshipHfRep1Of2(s string) HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 { switch s { case "information source": return HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource } return HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_Unknown } func (s HistoricalEventHfsFormedReputationRelationshipHfRep1Of2) String() string { switch s { case HistoricalEventHfsFormedReputationRelationshipHfRep1Of2_InformationSource: return "information source" } return "unknown" } func (s HistoricalEventHfsFormedReputationRelationshipHfRep1Of2) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 int const ( HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Unknown HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 = iota HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource ) func parseHistoricalEventHfsFormedReputationRelationshipHfRep2Of1(s string) HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 { switch s { case "friendly": return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly case "information source": return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource } return HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Unknown } func (s HistoricalEventHfsFormedReputationRelationshipHfRep2Of1) String() string { switch s { case HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_Friendly: return "friendly" case HistoricalEventHfsFormedReputationRelationshipHfRep2Of1_InformationSource: return "information source" } return "unknown" } func (s HistoricalEventHfsFormedReputationRelationshipHfRep2Of1) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventHfsFormedReputationRelationship struct { FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id HfRep1Of2 HistoricalEventHfsFormedReputationRelationshipHfRep1Of2 `json:"hfRep1Of2" legend:"base"` // hf_rep_1_of_2 HfRep2Of1 HistoricalEventHfsFormedReputationRelationshipHfRep2Of1 `json:"hfRep2Of1" legend:"base"` // hf_rep_2_of_1 Hfid1 int `json:"hfid1" legend:"base"` // hfid1 Hfid2 int `json:"hfid2" legend:"base"` // hfid2 IdentityId1 int `json:"identityId1" legend:"base"` // identity_id1 IdentityId2 int `json:"identityId2" legend:"base"` // identity_id2 SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventHfsFormedReputationRelationship) Type() string { return "hfs formed reputation relationship" } func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToEntity(id int) bool { return x.IdentityId1 == id || x.IdentityId2 == id } func (x *HistoricalEventHfsFormedReputationRelationship) RelatedToHf(id int) bool { return x.Hfid1 == id || x.Hfid2 == id } func (x *HistoricalEventHfsFormedReputationRelationship) CheckFields() { } type HistoricalEventHolyCityDeclaration struct { ReligionId int `json:"religionId" legend:"base"` // religion_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventHolyCityDeclaration) Type() string { return "holy city declaration" } func (x *HistoricalEventHolyCityDeclaration) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventHolyCityDeclaration) RelatedToHf(id int) bool { return false } func (x *HistoricalEventHolyCityDeclaration) CheckFields() { } type HistoricalEventInsurrectionStartedOutcome int const ( HistoricalEventInsurrectionStartedOutcome_Unknown HistoricalEventInsurrectionStartedOutcome = iota HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown HistoricalEventInsurrectionStartedOutcome_PopulationGone ) func parseHistoricalEventInsurrectionStartedOutcome(s string) HistoricalEventInsurrectionStartedOutcome { switch s { case "leadership overthrown": return HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown case "population gone": return HistoricalEventInsurrectionStartedOutcome_PopulationGone } return HistoricalEventInsurrectionStartedOutcome_Unknown } func (s HistoricalEventInsurrectionStartedOutcome) String() string { switch s { case HistoricalEventInsurrectionStartedOutcome_LeadershipOverthrown: return "leadership overthrown" case HistoricalEventInsurrectionStartedOutcome_PopulationGone: return "population gone" } return "unknown" } func (s HistoricalEventInsurrectionStartedOutcome) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventInsurrectionStarted struct { Outcome HistoricalEventInsurrectionStartedOutcome `json:"outcome" legend:"base"` // outcome SiteId int `json:"siteId" legend:"base"` // site_id TargetCivId int `json:"targetCivId" legend:"base"` // target_civ_id } func (x *HistoricalEventInsurrectionStarted) Type() string { return "insurrection started" } func (x *HistoricalEventInsurrectionStarted) RelatedToEntity(id int) bool { return x.TargetCivId == id } func (x *HistoricalEventInsurrectionStarted) RelatedToHf(id int) bool { return false } func (x *HistoricalEventInsurrectionStarted) CheckFields() { } type HistoricalEventItemStolenTheftMethod int const ( HistoricalEventItemStolenTheftMethod_Unknown HistoricalEventItemStolenTheftMethod = iota HistoricalEventItemStolenTheftMethod_Confiscated HistoricalEventItemStolenTheftMethod_Looted HistoricalEventItemStolenTheftMethod_Recovered HistoricalEventItemStolenTheftMethod_Theft ) func parseHistoricalEventItemStolenTheftMethod(s string) HistoricalEventItemStolenTheftMethod { switch s { case "confiscated": return HistoricalEventItemStolenTheftMethod_Confiscated case "looted": return HistoricalEventItemStolenTheftMethod_Looted case "recovered": return HistoricalEventItemStolenTheftMethod_Recovered case "theft": return HistoricalEventItemStolenTheftMethod_Theft } return HistoricalEventItemStolenTheftMethod_Unknown } func (s HistoricalEventItemStolenTheftMethod) String() string { switch s { case HistoricalEventItemStolenTheftMethod_Confiscated: return "confiscated" case HistoricalEventItemStolenTheftMethod_Looted: return "looted" case HistoricalEventItemStolenTheftMethod_Recovered: return "recovered" case HistoricalEventItemStolenTheftMethod_Theft: return "theft" } return "unknown" } func (s HistoricalEventItemStolenTheftMethod) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventItemStolen struct { Circumstance *HistoricalEventItemStolenCircumstance `json:"circumstance" legend:"both"` // circumstance CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id Entity int `json:"entity" legend:"plus"` // entity Histfig int `json:"histfig" legend:"plus"` // histfig Item int `json:"item" legend:"plus"` // item ItemSubtype string `json:"itemSubtype" legend:"plus"` // item_subtype ItemType string `json:"itemType" legend:"plus"` // item_type Mat string `json:"mat" legend:"plus"` // mat Matindex int `json:"matindex" legend:"plus"` // matindex Mattype int `json:"mattype" legend:"plus"` // mattype Site int `json:"site" legend:"plus"` // site StashSite int `json:"stashSite" legend:"plus"` // stash_site Structure int `json:"structure" legend:"plus"` // structure TheftMethod HistoricalEventItemStolenTheftMethod `json:"theftMethod" legend:"plus"` // theft_method } func (x *HistoricalEventItemStolen) Type() string { return "item stolen" } func (x *HistoricalEventItemStolen) RelatedToEntity(id int) bool { return x.Entity == id } func (x *HistoricalEventItemStolen) RelatedToHf(id int) bool { return x.Histfig == id } func (x *HistoricalEventItemStolen) CheckFields() { if x.Entity != x.CircumstanceId && x.Entity != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Entity"]["CircumstanceId"] = false } if x.Histfig != x.CircumstanceId && x.Histfig != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Histfig"]["CircumstanceId"] = false } if x.Item != x.CircumstanceId && x.Item != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Item"]["CircumstanceId"] = false } if x.Matindex != x.CircumstanceId && x.Matindex != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Matindex"]["CircumstanceId"] = false } if x.Mattype != x.CircumstanceId && x.Mattype != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Mattype"]["CircumstanceId"] = false } if x.Site != x.CircumstanceId && x.Site != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Site"]["CircumstanceId"] = false } if x.StashSite != x.CircumstanceId && x.StashSite != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["StashSite"]["CircumstanceId"] = false } if x.Structure != x.CircumstanceId && x.Structure != 0 && x.CircumstanceId != 0 { sameFields["HistoricalEventItemStolen"]["Structure"]["CircumstanceId"] = false } } type HistoricalEventItemStolenCircumstanceType int const ( HistoricalEventItemStolenCircumstanceType_Unknown HistoricalEventItemStolenCircumstanceType = iota HistoricalEventItemStolenCircumstanceType_Defeated HistoricalEventItemStolenCircumstanceType_Histeventcollection HistoricalEventItemStolenCircumstanceType_Murdered ) func parseHistoricalEventItemStolenCircumstanceType(s string) HistoricalEventItemStolenCircumstanceType { switch s { case "defeated": return HistoricalEventItemStolenCircumstanceType_Defeated case "histeventcollection": return HistoricalEventItemStolenCircumstanceType_Histeventcollection case "murdered": return HistoricalEventItemStolenCircumstanceType_Murdered } return HistoricalEventItemStolenCircumstanceType_Unknown } func (s HistoricalEventItemStolenCircumstanceType) String() string { switch s { case HistoricalEventItemStolenCircumstanceType_Defeated: return "defeated" case HistoricalEventItemStolenCircumstanceType_Histeventcollection: return "histeventcollection" case HistoricalEventItemStolenCircumstanceType_Murdered: return "murdered" } return "unknown" } func (s HistoricalEventItemStolenCircumstanceType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventItemStolenCircumstance struct { Defeated int `json:"defeated" legend:"plus"` // defeated HistEventCollection int `json:"histEventCollection" legend:"plus"` // hist_event_collection Murdered int `json:"murdered" legend:"plus"` // murdered Type HistoricalEventItemStolenCircumstanceType `json:"type" legend:"plus"` // type } func (x *HistoricalEventItemStolenCircumstance) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventItemStolenCircumstance) RelatedToHf(id int) bool { return false } func (x *HistoricalEventItemStolenCircumstance) CheckFields() { } type HistoricalEventKnowledgeDiscovered struct { First bool `json:"first" legend:"base"` // first Hfid int `json:"hfid" legend:"base"` // hfid Knowledge string `json:"knowledge" legend:"base"` // knowledge } func (x *HistoricalEventKnowledgeDiscovered) Type() string { return "knowledge discovered" } func (x *HistoricalEventKnowledgeDiscovered) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventKnowledgeDiscovered) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventKnowledgeDiscovered) CheckFields() { } type HistoricalEventMasterpieceArchConstructedBuildingSubtype int const ( HistoricalEventMasterpieceArchConstructedBuildingSubtype_Unknown HistoricalEventMasterpieceArchConstructedBuildingSubtype = iota HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace ) func parseHistoricalEventMasterpieceArchConstructedBuildingSubtype(s string) HistoricalEventMasterpieceArchConstructedBuildingSubtype { switch s { case "magmasmelter": return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter case "woodfurnace": return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace } return HistoricalEventMasterpieceArchConstructedBuildingSubtype_Unknown } func (s HistoricalEventMasterpieceArchConstructedBuildingSubtype) String() string { switch s { case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Magmasmelter: return "magmasmelter" case HistoricalEventMasterpieceArchConstructedBuildingSubtype_Woodfurnace: return "woodfurnace" } return "unknown" } func (s HistoricalEventMasterpieceArchConstructedBuildingSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceArchConstructedBuildingType int const ( HistoricalEventMasterpieceArchConstructedBuildingType_Unknown HistoricalEventMasterpieceArchConstructedBuildingType = iota HistoricalEventMasterpieceArchConstructedBuildingType_Bridge HistoricalEventMasterpieceArchConstructedBuildingType_Furnace ) func parseHistoricalEventMasterpieceArchConstructedBuildingType(s string) HistoricalEventMasterpieceArchConstructedBuildingType { switch s { case "bridge": return HistoricalEventMasterpieceArchConstructedBuildingType_Bridge case "furnace": return HistoricalEventMasterpieceArchConstructedBuildingType_Furnace } return HistoricalEventMasterpieceArchConstructedBuildingType_Unknown } func (s HistoricalEventMasterpieceArchConstructedBuildingType) String() string { switch s { case HistoricalEventMasterpieceArchConstructedBuildingType_Bridge: return "bridge" case HistoricalEventMasterpieceArchConstructedBuildingType_Furnace: return "furnace" } return "unknown" } func (s HistoricalEventMasterpieceArchConstructedBuildingType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceArchConstructedSkillAtTime int const ( HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown HistoricalEventMasterpieceArchConstructedSkillAtTime = iota HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished HistoricalEventMasterpieceArchConstructedSkillAtTime_Master HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1 ) func parseHistoricalEventMasterpieceArchConstructedSkillAtTime(s string) HistoricalEventMasterpieceArchConstructedSkillAtTime { switch s { case "accomplished": return HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished case "master": return HistoricalEventMasterpieceArchConstructedSkillAtTime_Master case "professional": return HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional case "unknown 21": return HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1 } return HistoricalEventMasterpieceArchConstructedSkillAtTime_Unknown } func (s HistoricalEventMasterpieceArchConstructedSkillAtTime) String() string { switch s { case HistoricalEventMasterpieceArchConstructedSkillAtTime_Accomplished: return "accomplished" case HistoricalEventMasterpieceArchConstructedSkillAtTime_Master: return "master" case HistoricalEventMasterpieceArchConstructedSkillAtTime_Professional: return "professional" case HistoricalEventMasterpieceArchConstructedSkillAtTime_UnknownTwo1: return "unknown two 1" } return "unknown" } func (s HistoricalEventMasterpieceArchConstructedSkillAtTime) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceArchConstructed struct { BuildingCustom int `json:"buildingCustom" legend:"plus"` // building_custom BuildingSubtype HistoricalEventMasterpieceArchConstructedBuildingSubtype `json:"buildingSubtype" legend:"plus"` // building_subtype BuildingType HistoricalEventMasterpieceArchConstructedBuildingType `json:"buildingType" legend:"plus"` // building_type EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid Maker int `json:"maker" legend:"plus"` // maker MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity Site int `json:"site" legend:"plus"` // site SiteId int `json:"siteId" legend:"base"` // site_id SkillAtTime HistoricalEventMasterpieceArchConstructedSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time Unk2 int `json:"unk2" legend:"plus"` // unk_2 } func (x *HistoricalEventMasterpieceArchConstructed) Type() string { return "masterpiece arch constructed" } func (x *HistoricalEventMasterpieceArchConstructed) RelatedToEntity(id int) bool { return x.EntityId == id || x.MakerEntity == id } func (x *HistoricalEventMasterpieceArchConstructed) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventMasterpieceArchConstructed) CheckFields() { if x.BuildingCustom != x.EntityId && x.BuildingCustom != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["EntityId"] = false } if x.BuildingCustom != x.Hfid && x.BuildingCustom != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["Hfid"] = false } if x.BuildingCustom != x.SiteId && x.BuildingCustom != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["BuildingCustom"]["SiteId"] = false } if x.Maker != x.EntityId && x.Maker != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Maker"]["EntityId"] = false } if x.Maker != x.Hfid && x.Maker != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Maker"]["Hfid"] = false } if x.Maker != x.SiteId && x.Maker != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Maker"]["SiteId"] = false } if x.MakerEntity != x.EntityId && x.MakerEntity != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["MakerEntity"]["EntityId"] = false } if x.MakerEntity != x.Hfid && x.MakerEntity != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["MakerEntity"]["Hfid"] = false } if x.MakerEntity != x.SiteId && x.MakerEntity != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["MakerEntity"]["SiteId"] = false } if x.Site != x.EntityId && x.Site != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Site"]["EntityId"] = false } if x.Site != x.Hfid && x.Site != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Site"]["Hfid"] = false } if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Site"]["SiteId"] = false } if x.Unk2 != x.EntityId && x.Unk2 != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["EntityId"] = false } if x.Unk2 != x.Hfid && x.Unk2 != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["Hfid"] = false } if x.Unk2 != x.SiteId && x.Unk2 != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceArchConstructed"]["Unk2"]["SiteId"] = false } } type HistoricalEventMasterpieceEngravingSkillAtTime int const ( HistoricalEventMasterpieceEngravingSkillAtTime_Unknown HistoricalEventMasterpieceEngravingSkillAtTime = iota HistoricalEventMasterpieceEngravingSkillAtTime_Accomplished HistoricalEventMasterpieceEngravingSkillAtTime_Expert HistoricalEventMasterpieceEngravingSkillAtTime_Grandmaster HistoricalEventMasterpieceEngravingSkillAtTime_Great HistoricalEventMasterpieceEngravingSkillAtTime_Highmaster HistoricalEventMasterpieceEngravingSkillAtTime_Legendary HistoricalEventMasterpieceEngravingSkillAtTime_Legendary4 HistoricalEventMasterpieceEngravingSkillAtTime_Master HistoricalEventMasterpieceEngravingSkillAtTime_Professional HistoricalEventMasterpieceEngravingSkillAtTime_Proficient ) func parseHistoricalEventMasterpieceEngravingSkillAtTime(s string) HistoricalEventMasterpieceEngravingSkillAtTime { switch s { case "accomplished": return HistoricalEventMasterpieceEngravingSkillAtTime_Accomplished case "expert": return HistoricalEventMasterpieceEngravingSkillAtTime_Expert case "grandmaster": return HistoricalEventMasterpieceEngravingSkillAtTime_Grandmaster case "great": return HistoricalEventMasterpieceEngravingSkillAtTime_Great case "highmaster": return HistoricalEventMasterpieceEngravingSkillAtTime_Highmaster case "legendary": return HistoricalEventMasterpieceEngravingSkillAtTime_Legendary case "legendary4": return HistoricalEventMasterpieceEngravingSkillAtTime_Legendary4 case "master": return HistoricalEventMasterpieceEngravingSkillAtTime_Master case "professional": return HistoricalEventMasterpieceEngravingSkillAtTime_Professional case "proficient": return HistoricalEventMasterpieceEngravingSkillAtTime_Proficient } return HistoricalEventMasterpieceEngravingSkillAtTime_Unknown } func (s HistoricalEventMasterpieceEngravingSkillAtTime) String() string { switch s { case HistoricalEventMasterpieceEngravingSkillAtTime_Accomplished: return "accomplished" case HistoricalEventMasterpieceEngravingSkillAtTime_Expert: return "expert" case HistoricalEventMasterpieceEngravingSkillAtTime_Grandmaster: return "grandmaster" case HistoricalEventMasterpieceEngravingSkillAtTime_Great: return "great" case HistoricalEventMasterpieceEngravingSkillAtTime_Highmaster: return "highmaster" case HistoricalEventMasterpieceEngravingSkillAtTime_Legendary: return "legendary" case HistoricalEventMasterpieceEngravingSkillAtTime_Legendary4: return "legendary 4" case HistoricalEventMasterpieceEngravingSkillAtTime_Master: return "master" case HistoricalEventMasterpieceEngravingSkillAtTime_Professional: return "professional" case HistoricalEventMasterpieceEngravingSkillAtTime_Proficient: return "proficient" } return "unknown" } func (s HistoricalEventMasterpieceEngravingSkillAtTime) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceEngraving struct { ArtId int `json:"artId" legend:"plus"` // art_id ArtSubid int `json:"artSubid" legend:"plus"` // art_subid EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid Maker int `json:"maker" legend:"plus"` // maker MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity Site int `json:"site" legend:"plus"` // site SiteId int `json:"siteId" legend:"base"` // site_id SkillAtTime HistoricalEventMasterpieceEngravingSkillAtTime `json:"skillAtTime" legend:"both"` // skill_at_time } func (x *HistoricalEventMasterpieceEngraving) Type() string { return "masterpiece engraving" } func (x *HistoricalEventMasterpieceEngraving) RelatedToEntity(id int) bool { return x.EntityId == id || x.MakerEntity == id } func (x *HistoricalEventMasterpieceEngraving) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventMasterpieceEngraving) CheckFields() { if x.ArtId != x.EntityId && x.ArtId != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["EntityId"] = false } if x.ArtId != x.Hfid && x.ArtId != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["Hfid"] = false } if x.ArtId != x.SiteId && x.ArtId != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["ArtId"]["SiteId"] = false } if x.ArtSubid != x.EntityId && x.ArtSubid != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["EntityId"] = false } if x.ArtSubid != x.Hfid && x.ArtSubid != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["Hfid"] = false } if x.ArtSubid != x.SiteId && x.ArtSubid != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["ArtSubid"]["SiteId"] = false } if x.Maker != x.EntityId && x.Maker != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["Maker"]["EntityId"] = false } if x.Maker != x.Hfid && x.Maker != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["Maker"]["Hfid"] = false } if x.Maker != x.SiteId && x.Maker != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["Maker"]["SiteId"] = false } if x.MakerEntity != x.EntityId && x.MakerEntity != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["MakerEntity"]["EntityId"] = false } if x.MakerEntity != x.Hfid && x.MakerEntity != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["MakerEntity"]["Hfid"] = false } if x.MakerEntity != x.SiteId && x.MakerEntity != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["MakerEntity"]["SiteId"] = false } if x.Site != x.EntityId && x.Site != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["Site"]["EntityId"] = false } if x.Site != x.Hfid && x.Site != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["Site"]["Hfid"] = false } if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceEngraving"]["Site"]["SiteId"] = false } } type HistoricalEventMasterpieceFood struct { EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid SiteId int `json:"siteId" legend:"base"` // site_id SkillAtTime int `json:"skillAtTime" legend:"base"` // skill_at_time } func (x *HistoricalEventMasterpieceFood) Type() string { return "masterpiece food" } func (x *HistoricalEventMasterpieceFood) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventMasterpieceFood) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventMasterpieceFood) CheckFields() { } type HistoricalEventMasterpieceItemItemSubtype int const ( HistoricalEventMasterpieceItemItemSubtype_Unknown HistoricalEventMasterpieceItemItemSubtype = iota HistoricalEventMasterpieceItemItemSubtype_Bookcase HistoricalEventMasterpieceItemItemSubtype_Breastplate HistoricalEventMasterpieceItemItemSubtype_Cap HistoricalEventMasterpieceItemItemSubtype_Cloak HistoricalEventMasterpieceItemItemSubtype_Coat HistoricalEventMasterpieceItemItemSubtype_Corkscrew HistoricalEventMasterpieceItemItemSubtype_Gauntlet HistoricalEventMasterpieceItemItemSubtype_Glove HistoricalEventMasterpieceItemItemSubtype_Greaves HistoricalEventMasterpieceItemItemSubtype_Helm HistoricalEventMasterpieceItemItemSubtype_HighBoot HistoricalEventMasterpieceItemItemSubtype_Hood HistoricalEventMasterpieceItemItemSubtype_Leggings HistoricalEventMasterpieceItemItemSubtype_MailShirt HistoricalEventMasterpieceItemItemSubtype_Mitten HistoricalEventMasterpieceItemItemSubtype_Robe HistoricalEventMasterpieceItemItemSubtype_ScrollRollers HistoricalEventMasterpieceItemItemSubtype_Shield HistoricalEventMasterpieceItemItemSubtype_Shirt HistoricalEventMasterpieceItemItemSubtype_Shoe HistoricalEventMasterpieceItemItemSubtype_Sock HistoricalEventMasterpieceItemItemSubtype_Trousers ) func parseHistoricalEventMasterpieceItemItemSubtype(s string) HistoricalEventMasterpieceItemItemSubtype { switch s { case "bookcase": return HistoricalEventMasterpieceItemItemSubtype_Bookcase case "breastplate": return HistoricalEventMasterpieceItemItemSubtype_Breastplate case "cap": return HistoricalEventMasterpieceItemItemSubtype_Cap case "cloak": return HistoricalEventMasterpieceItemItemSubtype_Cloak case "coat": return HistoricalEventMasterpieceItemItemSubtype_Coat case "corkscrew": return HistoricalEventMasterpieceItemItemSubtype_Corkscrew case "gauntlet": return HistoricalEventMasterpieceItemItemSubtype_Gauntlet case "glove": return HistoricalEventMasterpieceItemItemSubtype_Glove case "greaves": return HistoricalEventMasterpieceItemItemSubtype_Greaves case "helm": return HistoricalEventMasterpieceItemItemSubtype_Helm case "high boot": return HistoricalEventMasterpieceItemItemSubtype_HighBoot case "hood": return HistoricalEventMasterpieceItemItemSubtype_Hood case "leggings": return HistoricalEventMasterpieceItemItemSubtype_Leggings case "mail shirt": return HistoricalEventMasterpieceItemItemSubtype_MailShirt case "mitten": return HistoricalEventMasterpieceItemItemSubtype_Mitten case "robe": return HistoricalEventMasterpieceItemItemSubtype_Robe case "scroll rollers": return HistoricalEventMasterpieceItemItemSubtype_ScrollRollers case "shield": return HistoricalEventMasterpieceItemItemSubtype_Shield case "shirt": return HistoricalEventMasterpieceItemItemSubtype_Shirt case "shoe": return HistoricalEventMasterpieceItemItemSubtype_Shoe case "sock": return HistoricalEventMasterpieceItemItemSubtype_Sock case "trousers": return HistoricalEventMasterpieceItemItemSubtype_Trousers } return HistoricalEventMasterpieceItemItemSubtype_Unknown } func (s HistoricalEventMasterpieceItemItemSubtype) String() string { switch s { case HistoricalEventMasterpieceItemItemSubtype_Bookcase: return "bookcase" case HistoricalEventMasterpieceItemItemSubtype_Breastplate: return "breastplate" case HistoricalEventMasterpieceItemItemSubtype_Cap: return "cap" case HistoricalEventMasterpieceItemItemSubtype_Cloak: return "cloak" case HistoricalEventMasterpieceItemItemSubtype_Coat: return "coat" case HistoricalEventMasterpieceItemItemSubtype_Corkscrew: return "corkscrew" case HistoricalEventMasterpieceItemItemSubtype_Gauntlet: return "gauntlet" case HistoricalEventMasterpieceItemItemSubtype_Glove: return "glove" case HistoricalEventMasterpieceItemItemSubtype_Greaves: return "greaves" case HistoricalEventMasterpieceItemItemSubtype_Helm: return "helm" case HistoricalEventMasterpieceItemItemSubtype_HighBoot: return "high boot" case HistoricalEventMasterpieceItemItemSubtype_Hood: return "hood" case HistoricalEventMasterpieceItemItemSubtype_Leggings: return "leggings" case HistoricalEventMasterpieceItemItemSubtype_MailShirt: return "mail shirt" case HistoricalEventMasterpieceItemItemSubtype_Mitten: return "mitten" case HistoricalEventMasterpieceItemItemSubtype_Robe: return "robe" case HistoricalEventMasterpieceItemItemSubtype_ScrollRollers: return "scroll rollers" case HistoricalEventMasterpieceItemItemSubtype_Shield: return "shield" case HistoricalEventMasterpieceItemItemSubtype_Shirt: return "shirt" case HistoricalEventMasterpieceItemItemSubtype_Shoe: return "shoe" case HistoricalEventMasterpieceItemItemSubtype_Sock: return "sock" case HistoricalEventMasterpieceItemItemSubtype_Trousers: return "trousers" } return "unknown" } func (s HistoricalEventMasterpieceItemItemSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceItemItemType int const ( HistoricalEventMasterpieceItemItemType_Unknown HistoricalEventMasterpieceItemItemType = iota HistoricalEventMasterpieceItemItemType_Armor HistoricalEventMasterpieceItemItemType_Armorstand HistoricalEventMasterpieceItemItemType_Backpack HistoricalEventMasterpieceItemItemType_Barrel HistoricalEventMasterpieceItemItemType_Bed HistoricalEventMasterpieceItemItemType_Box HistoricalEventMasterpieceItemItemType_Bucket HistoricalEventMasterpieceItemItemType_Cabinet HistoricalEventMasterpieceItemItemType_Chair HistoricalEventMasterpieceItemItemType_Cloth HistoricalEventMasterpieceItemItemType_Coffin HistoricalEventMasterpieceItemItemType_Crown HistoricalEventMasterpieceItemItemType_Door HistoricalEventMasterpieceItemItemType_Figurine HistoricalEventMasterpieceItemItemType_Flask HistoricalEventMasterpieceItemItemType_Floodgate HistoricalEventMasterpieceItemItemType_Gloves HistoricalEventMasterpieceItemItemType_Helm HistoricalEventMasterpieceItemItemType_Pants HistoricalEventMasterpieceItemItemType_Shield HistoricalEventMasterpieceItemItemType_Shoes HistoricalEventMasterpieceItemItemType_Slab HistoricalEventMasterpieceItemItemType_Table HistoricalEventMasterpieceItemItemType_Tool HistoricalEventMasterpieceItemItemType_Totem HistoricalEventMasterpieceItemItemType_Trapcomp ) func parseHistoricalEventMasterpieceItemItemType(s string) HistoricalEventMasterpieceItemItemType { switch s { case "armor": return HistoricalEventMasterpieceItemItemType_Armor case "armorstand": return HistoricalEventMasterpieceItemItemType_Armorstand case "backpack": return HistoricalEventMasterpieceItemItemType_Backpack case "barrel": return HistoricalEventMasterpieceItemItemType_Barrel case "bed": return HistoricalEventMasterpieceItemItemType_Bed case "box": return HistoricalEventMasterpieceItemItemType_Box case "bucket": return HistoricalEventMasterpieceItemItemType_Bucket case "cabinet": return HistoricalEventMasterpieceItemItemType_Cabinet case "chair": return HistoricalEventMasterpieceItemItemType_Chair case "cloth": return HistoricalEventMasterpieceItemItemType_Cloth case "coffin": return HistoricalEventMasterpieceItemItemType_Coffin case "crown": return HistoricalEventMasterpieceItemItemType_Crown case "door": return HistoricalEventMasterpieceItemItemType_Door case "figurine": return HistoricalEventMasterpieceItemItemType_Figurine case "flask": return HistoricalEventMasterpieceItemItemType_Flask case "floodgate": return HistoricalEventMasterpieceItemItemType_Floodgate case "gloves": return HistoricalEventMasterpieceItemItemType_Gloves case "helm": return HistoricalEventMasterpieceItemItemType_Helm case "pants": return HistoricalEventMasterpieceItemItemType_Pants case "shield": return HistoricalEventMasterpieceItemItemType_Shield case "shoes": return HistoricalEventMasterpieceItemItemType_Shoes case "slab": return HistoricalEventMasterpieceItemItemType_Slab case "table": return HistoricalEventMasterpieceItemItemType_Table case "tool": return HistoricalEventMasterpieceItemItemType_Tool case "totem": return HistoricalEventMasterpieceItemItemType_Totem case "trapcomp": return HistoricalEventMasterpieceItemItemType_Trapcomp } return HistoricalEventMasterpieceItemItemType_Unknown } func (s HistoricalEventMasterpieceItemItemType) String() string { switch s { case HistoricalEventMasterpieceItemItemType_Armor: return "armor" case HistoricalEventMasterpieceItemItemType_Armorstand: return "armorstand" case HistoricalEventMasterpieceItemItemType_Backpack: return "backpack" case HistoricalEventMasterpieceItemItemType_Barrel: return "barrel" case HistoricalEventMasterpieceItemItemType_Bed: return "bed" case HistoricalEventMasterpieceItemItemType_Box: return "box" case HistoricalEventMasterpieceItemItemType_Bucket: return "bucket" case HistoricalEventMasterpieceItemItemType_Cabinet: return "cabinet" case HistoricalEventMasterpieceItemItemType_Chair: return "chair" case HistoricalEventMasterpieceItemItemType_Cloth: return "cloth" case HistoricalEventMasterpieceItemItemType_Coffin: return "coffin" case HistoricalEventMasterpieceItemItemType_Crown: return "crown" case HistoricalEventMasterpieceItemItemType_Door: return "door" case HistoricalEventMasterpieceItemItemType_Figurine: return "figurine" case HistoricalEventMasterpieceItemItemType_Flask: return "flask" case HistoricalEventMasterpieceItemItemType_Floodgate: return "floodgate" case HistoricalEventMasterpieceItemItemType_Gloves: return "gloves" case HistoricalEventMasterpieceItemItemType_Helm: return "helm" case HistoricalEventMasterpieceItemItemType_Pants: return "pants" case HistoricalEventMasterpieceItemItemType_Shield: return "shield" case HistoricalEventMasterpieceItemItemType_Shoes: return "shoes" case HistoricalEventMasterpieceItemItemType_Slab: return "slab" case HistoricalEventMasterpieceItemItemType_Table: return "table" case HistoricalEventMasterpieceItemItemType_Tool: return "tool" case HistoricalEventMasterpieceItemItemType_Totem: return "totem" case HistoricalEventMasterpieceItemItemType_Trapcomp: return "trapcomp" } return "unknown" } func (s HistoricalEventMasterpieceItemItemType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceItem struct { EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid ItemId int `json:"itemId" legend:"plus"` // item_id ItemSubtype HistoricalEventMasterpieceItemItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype ItemType HistoricalEventMasterpieceItemItemType `json:"itemType" legend:"plus"` // item_type Maker int `json:"maker" legend:"plus"` // maker MakerEntity int `json:"makerEntity" legend:"plus"` // maker_entity Mat string `json:"mat" legend:"plus"` // mat Site int `json:"site" legend:"plus"` // site SiteId int `json:"siteId" legend:"base"` // site_id SkillAtTime string `json:"skillAtTime" legend:"both"` // skill_at_time } func (x *HistoricalEventMasterpieceItem) Type() string { return "masterpiece item" } func (x *HistoricalEventMasterpieceItem) RelatedToEntity(id int) bool { return x.EntityId == id || x.MakerEntity == id } func (x *HistoricalEventMasterpieceItem) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventMasterpieceItem) CheckFields() { if x.ItemId != x.EntityId && x.ItemId != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["EntityId"] = false } if x.ItemId != x.Hfid && x.ItemId != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["Hfid"] = false } if x.ItemId != x.SiteId && x.ItemId != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceItem"]["ItemId"]["SiteId"] = false } if x.Maker != x.EntityId && x.Maker != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceItem"]["Maker"]["EntityId"] = false } if x.Maker != x.Hfid && x.Maker != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceItem"]["Maker"]["Hfid"] = false } if x.Maker != x.SiteId && x.Maker != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceItem"]["Maker"]["SiteId"] = false } if x.MakerEntity != x.EntityId && x.MakerEntity != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceItem"]["MakerEntity"]["EntityId"] = false } if x.MakerEntity != x.Hfid && x.MakerEntity != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceItem"]["MakerEntity"]["Hfid"] = false } if x.MakerEntity != x.SiteId && x.MakerEntity != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceItem"]["MakerEntity"]["SiteId"] = false } if x.Site != x.EntityId && x.Site != 0 && x.EntityId != 0 { sameFields["HistoricalEventMasterpieceItem"]["Site"]["EntityId"] = false } if x.Site != x.Hfid && x.Site != 0 && x.Hfid != 0 { sameFields["HistoricalEventMasterpieceItem"]["Site"]["Hfid"] = false } if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 { sameFields["HistoricalEventMasterpieceItem"]["Site"]["SiteId"] = false } } type HistoricalEventMasterpieceItemImprovement struct { EntityId int `json:"entityId" legend:"base"` // entity_id Hfid int `json:"hfid" legend:"base"` // hfid SiteId int `json:"siteId" legend:"base"` // site_id SkillAtTime int `json:"skillAtTime" legend:"base"` // skill_at_time } func (x *HistoricalEventMasterpieceItemImprovement) Type() string { return "masterpiece item improvement" } func (x *HistoricalEventMasterpieceItemImprovement) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalEventMasterpieceItemImprovement) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventMasterpieceItemImprovement) CheckFields() { } type HistoricalEventMasterpieceLostMethod int const ( HistoricalEventMasterpieceLostMethod_Unknown HistoricalEventMasterpieceLostMethod = iota HistoricalEventMasterpieceLostMethod_Melt ) func parseHistoricalEventMasterpieceLostMethod(s string) HistoricalEventMasterpieceLostMethod { switch s { case "melt": return HistoricalEventMasterpieceLostMethod_Melt } return HistoricalEventMasterpieceLostMethod_Unknown } func (s HistoricalEventMasterpieceLostMethod) String() string { switch s { case HistoricalEventMasterpieceLostMethod_Melt: return "melt" } return "unknown" } func (s HistoricalEventMasterpieceLostMethod) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMasterpieceLost struct { CreationEvent int `json:"creationEvent" legend:"plus"` // creation_event Histfig int `json:"histfig" legend:"plus"` // histfig Method HistoricalEventMasterpieceLostMethod `json:"method" legend:"plus"` // method Site int `json:"site" legend:"plus"` // site } func (x *HistoricalEventMasterpieceLost) Type() string { return "masterpiece lost" } func (x *HistoricalEventMasterpieceLost) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventMasterpieceLost) RelatedToHf(id int) bool { return x.Histfig == id } func (x *HistoricalEventMasterpieceLost) CheckFields() { } type HistoricalEventMerchant struct { DepotEntityId int `json:"depotEntityId" legend:"base"` // depot_entity_id Destination int `json:"destination" legend:"plus"` // destination Hardship bool `json:"hardship" legend:"base"` // hardship LostValue bool `json:"lostValue" legend:"base"` // lost_value Site int `json:"site" legend:"plus"` // site SiteId int `json:"siteId" legend:"base"` // site_id Source int `json:"source" legend:"plus"` // source TraderEntityId int `json:"traderEntityId" legend:"base"` // trader_entity_id } func (x *HistoricalEventMerchant) Type() string { return "merchant" } func (x *HistoricalEventMerchant) RelatedToEntity(id int) bool { return x.DepotEntityId == id || x.TraderEntityId == id } func (x *HistoricalEventMerchant) RelatedToHf(id int) bool { return false } func (x *HistoricalEventMerchant) CheckFields() { if x.Destination != x.DepotEntityId && x.Destination != 0 && x.DepotEntityId != 0 { sameFields["HistoricalEventMerchant"]["Destination"]["DepotEntityId"] = false } if x.Destination != x.SiteId && x.Destination != 0 && x.SiteId != 0 { sameFields["HistoricalEventMerchant"]["Destination"]["SiteId"] = false } if x.Destination != x.TraderEntityId && x.Destination != 0 && x.TraderEntityId != 0 { sameFields["HistoricalEventMerchant"]["Destination"]["TraderEntityId"] = false } if x.Site != x.DepotEntityId && x.Site != 0 && x.DepotEntityId != 0 { sameFields["HistoricalEventMerchant"]["Site"]["DepotEntityId"] = false } if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 { sameFields["HistoricalEventMerchant"]["Site"]["SiteId"] = false } if x.Site != x.TraderEntityId && x.Site != 0 && x.TraderEntityId != 0 { sameFields["HistoricalEventMerchant"]["Site"]["TraderEntityId"] = false } if x.Source != x.DepotEntityId && x.Source != 0 && x.DepotEntityId != 0 { sameFields["HistoricalEventMerchant"]["Source"]["DepotEntityId"] = false } if x.Source != x.SiteId && x.Source != 0 && x.SiteId != 0 { sameFields["HistoricalEventMerchant"]["Source"]["SiteId"] = false } if x.Source != x.TraderEntityId && x.Source != 0 && x.TraderEntityId != 0 { sameFields["HistoricalEventMerchant"]["Source"]["TraderEntityId"] = false } } type HistoricalEventModifiedBuildingModification int const ( HistoricalEventModifiedBuildingModification_Unknown HistoricalEventModifiedBuildingModification = iota HistoricalEventModifiedBuildingModification_Dungeon HistoricalEventModifiedBuildingModification_FeastHall HistoricalEventModifiedBuildingModification_GatedCourtyard HistoricalEventModifiedBuildingModification_ImprovedFortifications ) func parseHistoricalEventModifiedBuildingModification(s string) HistoricalEventModifiedBuildingModification { switch s { case "dungeon": return HistoricalEventModifiedBuildingModification_Dungeon case "feast hall": return HistoricalEventModifiedBuildingModification_FeastHall case "gated courtyard": return HistoricalEventModifiedBuildingModification_GatedCourtyard case "improved fortifications": return HistoricalEventModifiedBuildingModification_ImprovedFortifications } return HistoricalEventModifiedBuildingModification_Unknown } func (s HistoricalEventModifiedBuildingModification) String() string { switch s { case HistoricalEventModifiedBuildingModification_Dungeon: return "dungeon" case HistoricalEventModifiedBuildingModification_FeastHall: return "feast hall" case HistoricalEventModifiedBuildingModification_GatedCourtyard: return "gated courtyard" case HistoricalEventModifiedBuildingModification_ImprovedFortifications: return "improved fortifications" } return "unknown" } func (s HistoricalEventModifiedBuildingModification) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventModifiedBuilding struct { Modification HistoricalEventModifiedBuildingModification `json:"modification" legend:"base"` // modification ModifierHfid int `json:"modifierHfid" legend:"base"` // modifier_hfid SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventModifiedBuilding) Type() string { return "modified building" } func (x *HistoricalEventModifiedBuilding) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventModifiedBuilding) RelatedToHf(id int) bool { return x.ModifierHfid == id } func (x *HistoricalEventModifiedBuilding) CheckFields() { } type HistoricalEventMusicalFormCreatedCircumstance int const ( HistoricalEventMusicalFormCreatedCircumstance_Unknown HistoricalEventMusicalFormCreatedCircumstance = iota HistoricalEventMusicalFormCreatedCircumstance_Dream HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf HistoricalEventMusicalFormCreatedCircumstance_Nightmare HistoricalEventMusicalFormCreatedCircumstance_PrayToHf ) func parseHistoricalEventMusicalFormCreatedCircumstance(s string) HistoricalEventMusicalFormCreatedCircumstance { switch s { case "dream": return HistoricalEventMusicalFormCreatedCircumstance_Dream case "dream about hf": return HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf case "nightmare": return HistoricalEventMusicalFormCreatedCircumstance_Nightmare case "pray to hf": return HistoricalEventMusicalFormCreatedCircumstance_PrayToHf } return HistoricalEventMusicalFormCreatedCircumstance_Unknown } func (s HistoricalEventMusicalFormCreatedCircumstance) String() string { switch s { case HistoricalEventMusicalFormCreatedCircumstance_Dream: return "dream" case HistoricalEventMusicalFormCreatedCircumstance_DreamAboutHf: return "dream about hf" case HistoricalEventMusicalFormCreatedCircumstance_Nightmare: return "nightmare" case HistoricalEventMusicalFormCreatedCircumstance_PrayToHf: return "pray to hf" } return "unknown" } func (s HistoricalEventMusicalFormCreatedCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMusicalFormCreatedReason int const ( HistoricalEventMusicalFormCreatedReason_Unknown HistoricalEventMusicalFormCreatedReason = iota HistoricalEventMusicalFormCreatedReason_GlorifyHf ) func parseHistoricalEventMusicalFormCreatedReason(s string) HistoricalEventMusicalFormCreatedReason { switch s { case "glorify hf": return HistoricalEventMusicalFormCreatedReason_GlorifyHf } return HistoricalEventMusicalFormCreatedReason_Unknown } func (s HistoricalEventMusicalFormCreatedReason) String() string { switch s { case HistoricalEventMusicalFormCreatedReason_GlorifyHf: return "glorify hf" } return "unknown" } func (s HistoricalEventMusicalFormCreatedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventMusicalFormCreated struct { Circumstance HistoricalEventMusicalFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id FormId int `json:"formId" legend:"base"` // form_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id Reason HistoricalEventMusicalFormCreatedReason `json:"reason" legend:"base"` // reason ReasonId int `json:"reasonId" legend:"base"` // reason_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventMusicalFormCreated) Type() string { return "musical form created" } func (x *HistoricalEventMusicalFormCreated) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventMusicalFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventMusicalFormCreated) CheckFields() { } type HistoricalEventNewSiteLeader struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id NewLeaderHfid int `json:"newLeaderHfid" legend:"base"` // new_leader_hfid NewSiteCivId int `json:"newSiteCivId" legend:"base"` // new_site_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventNewSiteLeader) Type() string { return "new site leader" } func (x *HistoricalEventNewSiteLeader) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.NewSiteCivId == id || x.SiteCivId == id } func (x *HistoricalEventNewSiteLeader) RelatedToHf(id int) bool { return x.NewLeaderHfid == id } func (x *HistoricalEventNewSiteLeader) CheckFields() { } type HistoricalEventPeaceAcceptedTopic int const ( HistoricalEventPeaceAcceptedTopic_Unknown HistoricalEventPeaceAcceptedTopic = iota HistoricalEventPeaceAcceptedTopic_Requestpeace ) func parseHistoricalEventPeaceAcceptedTopic(s string) HistoricalEventPeaceAcceptedTopic { switch s { case "requestpeace": return HistoricalEventPeaceAcceptedTopic_Requestpeace } return HistoricalEventPeaceAcceptedTopic_Unknown } func (s HistoricalEventPeaceAcceptedTopic) String() string { switch s { case HistoricalEventPeaceAcceptedTopic_Requestpeace: return "requestpeace" } return "unknown" } func (s HistoricalEventPeaceAcceptedTopic) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventPeaceAccepted struct { Destination int `json:"destination" legend:"plus"` // destination SiteId int `json:"siteId" legend:"base"` // site_id Source int `json:"source" legend:"plus"` // source Topic HistoricalEventPeaceAcceptedTopic `json:"topic" legend:"plus"` // topic } func (x *HistoricalEventPeaceAccepted) Type() string { return "peace accepted" } func (x *HistoricalEventPeaceAccepted) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventPeaceAccepted) RelatedToHf(id int) bool { return false } func (x *HistoricalEventPeaceAccepted) CheckFields() { if x.Destination != x.SiteId && x.Destination != 0 && x.SiteId != 0 { sameFields["HistoricalEventPeaceAccepted"]["Destination"]["SiteId"] = false } if x.Source != x.SiteId && x.Source != 0 && x.SiteId != 0 { sameFields["HistoricalEventPeaceAccepted"]["Source"]["SiteId"] = false } } type HistoricalEventPeaceRejectedTopic int const ( HistoricalEventPeaceRejectedTopic_Unknown HistoricalEventPeaceRejectedTopic = iota HistoricalEventPeaceRejectedTopic_Requestpeace ) func parseHistoricalEventPeaceRejectedTopic(s string) HistoricalEventPeaceRejectedTopic { switch s { case "requestpeace": return HistoricalEventPeaceRejectedTopic_Requestpeace } return HistoricalEventPeaceRejectedTopic_Unknown } func (s HistoricalEventPeaceRejectedTopic) String() string { switch s { case HistoricalEventPeaceRejectedTopic_Requestpeace: return "requestpeace" } return "unknown" } func (s HistoricalEventPeaceRejectedTopic) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventPeaceRejected struct { Destination int `json:"destination" legend:"plus"` // destination SiteId int `json:"siteId" legend:"base"` // site_id Source int `json:"source" legend:"plus"` // source Topic HistoricalEventPeaceRejectedTopic `json:"topic" legend:"plus"` // topic } func (x *HistoricalEventPeaceRejected) Type() string { return "peace rejected" } func (x *HistoricalEventPeaceRejected) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventPeaceRejected) RelatedToHf(id int) bool { return false } func (x *HistoricalEventPeaceRejected) CheckFields() { if x.Destination != x.SiteId && x.Destination != 0 && x.SiteId != 0 { sameFields["HistoricalEventPeaceRejected"]["Destination"]["SiteId"] = false } if x.Source != x.SiteId && x.Source != 0 && x.SiteId != 0 { sameFields["HistoricalEventPeaceRejected"]["Source"]["SiteId"] = false } } type HistoricalEventPerformance struct { CivId int `json:"civId" legend:"base"` // civ_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id OccasionId int `json:"occasionId" legend:"base"` // occasion_id ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventPerformance) Type() string { return "performance" } func (x *HistoricalEventPerformance) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventPerformance) RelatedToHf(id int) bool { return false } func (x *HistoricalEventPerformance) CheckFields() { } type HistoricalEventPlunderedSite struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id Detected bool `json:"detected" legend:"base"` // detected NoDefeatMention bool `json:"noDefeatMention" legend:"base"` // no_defeat_mention SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id TookItems bool `json:"tookItems" legend:"base"` // took_items TookLivestock bool `json:"tookLivestock" legend:"base"` // took_livestock WasRaid bool `json:"wasRaid" legend:"base"` // was_raid } func (x *HistoricalEventPlunderedSite) Type() string { return "plundered site" } func (x *HistoricalEventPlunderedSite) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventPlunderedSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventPlunderedSite) CheckFields() { } type HistoricalEventPoeticFormCreatedCircumstance int const ( HistoricalEventPoeticFormCreatedCircumstance_Unknown HistoricalEventPoeticFormCreatedCircumstance = iota HistoricalEventPoeticFormCreatedCircumstance_Dream HistoricalEventPoeticFormCreatedCircumstance_Nightmare ) func parseHistoricalEventPoeticFormCreatedCircumstance(s string) HistoricalEventPoeticFormCreatedCircumstance { switch s { case "dream": return HistoricalEventPoeticFormCreatedCircumstance_Dream case "nightmare": return HistoricalEventPoeticFormCreatedCircumstance_Nightmare } return HistoricalEventPoeticFormCreatedCircumstance_Unknown } func (s HistoricalEventPoeticFormCreatedCircumstance) String() string { switch s { case HistoricalEventPoeticFormCreatedCircumstance_Dream: return "dream" case HistoricalEventPoeticFormCreatedCircumstance_Nightmare: return "nightmare" } return "unknown" } func (s HistoricalEventPoeticFormCreatedCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventPoeticFormCreated struct { Circumstance HistoricalEventPoeticFormCreatedCircumstance `json:"circumstance" legend:"base"` // circumstance FormId int `json:"formId" legend:"base"` // form_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventPoeticFormCreated) Type() string { return "poetic form created" } func (x *HistoricalEventPoeticFormCreated) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventPoeticFormCreated) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventPoeticFormCreated) CheckFields() { } type HistoricalEventProcession struct { CivId int `json:"civId" legend:"base"` // civ_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id OccasionId int `json:"occasionId" legend:"base"` // occasion_id ScheduleId int `json:"scheduleId" legend:"base"` // schedule_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventProcession) Type() string { return "procession" } func (x *HistoricalEventProcession) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventProcession) RelatedToHf(id int) bool { return false } func (x *HistoricalEventProcession) CheckFields() { } type HistoricalEventRazedStructure struct { CivId int `json:"civId" legend:"base"` // civ_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id } func (x *HistoricalEventRazedStructure) Type() string { return "razed structure" } func (x *HistoricalEventRazedStructure) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventRazedStructure) RelatedToHf(id int) bool { return false } func (x *HistoricalEventRazedStructure) CheckFields() { } type HistoricalEventReclaimSite struct { CivId int `json:"civId" legend:"base"` // civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id Unretire bool `json:"unretire" legend:"base"` // unretire } func (x *HistoricalEventReclaimSite) Type() string { return "reclaim site" } func (x *HistoricalEventReclaimSite) RelatedToEntity(id int) bool { return x.CivId == id || x.SiteCivId == id } func (x *HistoricalEventReclaimSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventReclaimSite) CheckFields() { } type HistoricalEventRegionpopIncorporatedIntoEntity struct { JoinEntityId int `json:"joinEntityId" legend:"base"` // join_entity_id PopFlid int `json:"popFlid" legend:"base"` // pop_flid PopNumberMoved int `json:"popNumberMoved" legend:"base"` // pop_number_moved PopRace int `json:"popRace" legend:"base"` // pop_race PopSrid int `json:"popSrid" legend:"base"` // pop_srid SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventRegionpopIncorporatedIntoEntity) Type() string { return "regionpop incorporated into entity" } func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToEntity(id int) bool { return x.JoinEntityId == id } func (x *HistoricalEventRegionpopIncorporatedIntoEntity) RelatedToHf(id int) bool { return false } func (x *HistoricalEventRegionpopIncorporatedIntoEntity) CheckFields() { } type HistoricalEventRelationshipRelationship int const ( HistoricalEventRelationshipRelationship_Unknown HistoricalEventRelationshipRelationship = iota HistoricalEventRelationshipRelationship_ArtisticBuddy HistoricalEventRelationshipRelationship_AtheleticRival HistoricalEventRelationshipRelationship_AthleteBuddy HistoricalEventRelationshipRelationship_BusinessRival HistoricalEventRelationshipRelationship_ChildhoodFriend HistoricalEventRelationshipRelationship_FormerLover HistoricalEventRelationshipRelationship_Grudge HistoricalEventRelationshipRelationship_JealousObsession HistoricalEventRelationshipRelationship_JealousRelationshipGrudge HistoricalEventRelationshipRelationship_Lieutenant HistoricalEventRelationshipRelationship_Lover HistoricalEventRelationshipRelationship_PersecutionGrudge HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge HistoricalEventRelationshipRelationship_ScholarBuddy HistoricalEventRelationshipRelationship_SupernaturalGrudge HistoricalEventRelationshipRelationship_WarBuddy ) func parseHistoricalEventRelationshipRelationship(s string) HistoricalEventRelationshipRelationship { switch s { case "artistic_buddy": return HistoricalEventRelationshipRelationship_ArtisticBuddy case "atheletic_rival": return HistoricalEventRelationshipRelationship_AtheleticRival case "athlete_buddy": return HistoricalEventRelationshipRelationship_AthleteBuddy case "business_rival": return HistoricalEventRelationshipRelationship_BusinessRival case "childhood_friend": return HistoricalEventRelationshipRelationship_ChildhoodFriend case "former_lover": return HistoricalEventRelationshipRelationship_FormerLover case "grudge": return HistoricalEventRelationshipRelationship_Grudge case "jealous_obsession": return HistoricalEventRelationshipRelationship_JealousObsession case "jealous_relationship_grudge": return HistoricalEventRelationshipRelationship_JealousRelationshipGrudge case "lieutenant": return HistoricalEventRelationshipRelationship_Lieutenant case "lover": return HistoricalEventRelationshipRelationship_Lover case "persecution_grudge": return HistoricalEventRelationshipRelationship_PersecutionGrudge case "religious_persecution_grudge": return HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge case "scholar_buddy": return HistoricalEventRelationshipRelationship_ScholarBuddy case "supernatural_grudge": return HistoricalEventRelationshipRelationship_SupernaturalGrudge case "war_buddy": return HistoricalEventRelationshipRelationship_WarBuddy } return HistoricalEventRelationshipRelationship_Unknown } func (s HistoricalEventRelationshipRelationship) String() string { switch s { case HistoricalEventRelationshipRelationship_ArtisticBuddy: return "artistic buddy" case HistoricalEventRelationshipRelationship_AtheleticRival: return "atheletic rival" case HistoricalEventRelationshipRelationship_AthleteBuddy: return "athlete buddy" case HistoricalEventRelationshipRelationship_BusinessRival: return "business rival" case HistoricalEventRelationshipRelationship_ChildhoodFriend: return "childhood friend" case HistoricalEventRelationshipRelationship_FormerLover: return "former lover" case HistoricalEventRelationshipRelationship_Grudge: return "grudge" case HistoricalEventRelationshipRelationship_JealousObsession: return "jealous obsession" case HistoricalEventRelationshipRelationship_JealousRelationshipGrudge: return "jealous relationship grudge" case HistoricalEventRelationshipRelationship_Lieutenant: return "lieutenant" case HistoricalEventRelationshipRelationship_Lover: return "lover" case HistoricalEventRelationshipRelationship_PersecutionGrudge: return "persecution grudge" case HistoricalEventRelationshipRelationship_ReligiousPersecutionGrudge: return "religious persecution grudge" case HistoricalEventRelationshipRelationship_ScholarBuddy: return "scholar buddy" case HistoricalEventRelationshipRelationship_SupernaturalGrudge: return "supernatural grudge" case HistoricalEventRelationshipRelationship_WarBuddy: return "war buddy" } return "unknown" } func (s HistoricalEventRelationshipRelationship) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventRelationship struct { Event int `json:"event" legend:"plus"` // event Relationship HistoricalEventRelationshipRelationship `json:"relationship" legend:"plus"` // relationship SourceHf int `json:"sourceHf" legend:"plus"` // source_hf TargetHf int `json:"targetHf" legend:"plus"` // target_hf Year int `json:"year" legend:"plus"` // year } func (x *HistoricalEventRelationship) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventRelationship) RelatedToHf(id int) bool { return x.SourceHf == id || x.TargetHf == id } func (x *HistoricalEventRelationship) CheckFields() { } type HistoricalEventRelationshipSupplement struct { Event int `json:"event" legend:"plus"` // event OccasionType int `json:"occasionType" legend:"plus"` // occasion_type Site int `json:"site" legend:"plus"` // site Unk1 int `json:"unk1" legend:"plus"` // unk_1 } func (x *HistoricalEventRelationshipSupplement) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventRelationshipSupplement) RelatedToHf(id int) bool { return false } func (x *HistoricalEventRelationshipSupplement) CheckFields() { } type HistoricalEventRemoveHfEntityLinkLink int const ( HistoricalEventRemoveHfEntityLinkLink_Unknown HistoricalEventRemoveHfEntityLinkLink = iota HistoricalEventRemoveHfEntityLinkLink_Member HistoricalEventRemoveHfEntityLinkLink_Position HistoricalEventRemoveHfEntityLinkLink_Prisoner HistoricalEventRemoveHfEntityLinkLink_Slave ) func parseHistoricalEventRemoveHfEntityLinkLink(s string) HistoricalEventRemoveHfEntityLinkLink { switch s { case "member": return HistoricalEventRemoveHfEntityLinkLink_Member case "position": return HistoricalEventRemoveHfEntityLinkLink_Position case "prisoner": return HistoricalEventRemoveHfEntityLinkLink_Prisoner case "slave": return HistoricalEventRemoveHfEntityLinkLink_Slave } return HistoricalEventRemoveHfEntityLinkLink_Unknown } func (s HistoricalEventRemoveHfEntityLinkLink) String() string { switch s { case HistoricalEventRemoveHfEntityLinkLink_Member: return "member" case HistoricalEventRemoveHfEntityLinkLink_Position: return "position" case HistoricalEventRemoveHfEntityLinkLink_Prisoner: return "prisoner" case HistoricalEventRemoveHfEntityLinkLink_Slave: return "slave" } return "unknown" } func (s HistoricalEventRemoveHfEntityLinkLink) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventRemoveHfEntityLinkLinkType int const ( HistoricalEventRemoveHfEntityLinkLinkType_Unknown HistoricalEventRemoveHfEntityLinkLinkType = iota HistoricalEventRemoveHfEntityLinkLinkType_Member HistoricalEventRemoveHfEntityLinkLinkType_Position HistoricalEventRemoveHfEntityLinkLinkType_Prisoner HistoricalEventRemoveHfEntityLinkLinkType_Slave ) func parseHistoricalEventRemoveHfEntityLinkLinkType(s string) HistoricalEventRemoveHfEntityLinkLinkType { switch s { case "member": return HistoricalEventRemoveHfEntityLinkLinkType_Member case "position": return HistoricalEventRemoveHfEntityLinkLinkType_Position case "prisoner": return HistoricalEventRemoveHfEntityLinkLinkType_Prisoner case "slave": return HistoricalEventRemoveHfEntityLinkLinkType_Slave } return HistoricalEventRemoveHfEntityLinkLinkType_Unknown } func (s HistoricalEventRemoveHfEntityLinkLinkType) String() string { switch s { case HistoricalEventRemoveHfEntityLinkLinkType_Member: return "member" case HistoricalEventRemoveHfEntityLinkLinkType_Position: return "position" case HistoricalEventRemoveHfEntityLinkLinkType_Prisoner: return "prisoner" case HistoricalEventRemoveHfEntityLinkLinkType_Slave: return "slave" } return "unknown" } func (s HistoricalEventRemoveHfEntityLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventRemoveHfEntityLink struct { CivId int `json:"civId" legend:"base"` // civ_id Hfid int `json:"hfid" legend:"base"` // hfid Link HistoricalEventRemoveHfEntityLinkLink `json:"link" legend:"base"` // link Position string `json:"position" legend:"plus"` // position PositionId int `json:"positionId" legend:"base"` // position_id } func (x *HistoricalEventRemoveHfEntityLink) Type() string { return "remove hf entity link" } func (x *HistoricalEventRemoveHfEntityLink) RelatedToEntity(id int) bool { return x.CivId == id } func (x *HistoricalEventRemoveHfEntityLink) RelatedToHf(id int) bool { return x.Hfid == id } func (x *HistoricalEventRemoveHfEntityLink) CheckFields() { } type HistoricalEventRemoveHfHfLink struct { Hfid int `json:"hfid" legend:"base"` // hfid HfidTarget int `json:"hfidTarget" legend:"base"` // hfid_target } func (x *HistoricalEventRemoveHfHfLink) Type() string { return "remove hf hf link" } func (x *HistoricalEventRemoveHfHfLink) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventRemoveHfHfLink) RelatedToHf(id int) bool { return x.Hfid == id || x.HfidTarget == id } func (x *HistoricalEventRemoveHfHfLink) CheckFields() { } type HistoricalEventRemoveHfSiteLinkLinkType int const ( HistoricalEventRemoveHfSiteLinkLinkType_Unknown HistoricalEventRemoveHfSiteLinkLinkType = iota HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding HistoricalEventRemoveHfSiteLinkLinkType_Occupation HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower ) func parseHistoricalEventRemoveHfSiteLinkLinkType(s string) HistoricalEventRemoveHfSiteLinkLinkType { switch s { case "home_site_abstract_building": return HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding case "occupation": return HistoricalEventRemoveHfSiteLinkLinkType_Occupation case "seat_of_power": return HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower } return HistoricalEventRemoveHfSiteLinkLinkType_Unknown } func (s HistoricalEventRemoveHfSiteLinkLinkType) String() string { switch s { case HistoricalEventRemoveHfSiteLinkLinkType_HomeSiteAbstractBuilding: return "home site abstract building" case HistoricalEventRemoveHfSiteLinkLinkType_Occupation: return "occupation" case HistoricalEventRemoveHfSiteLinkLinkType_SeatOfPower: return "seat of power" } return "unknown" } func (s HistoricalEventRemoveHfSiteLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventRemoveHfSiteLink struct { Civ int `json:"civ" legend:"plus"` // civ Histfig int `json:"histfig" legend:"plus"` // histfig LinkType HistoricalEventRemoveHfSiteLinkLinkType `json:"linkType" legend:"plus"` // link_type SiteId int `json:"siteId" legend:"base"` // site_id Structure int `json:"structure" legend:"plus"` // structure } func (x *HistoricalEventRemoveHfSiteLink) Type() string { return "remove hf site link" } func (x *HistoricalEventRemoveHfSiteLink) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventRemoveHfSiteLink) RelatedToHf(id int) bool { return x.Histfig == id } func (x *HistoricalEventRemoveHfSiteLink) CheckFields() { if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 { sameFields["HistoricalEventRemoveHfSiteLink"]["Civ"]["SiteId"] = false } if x.Histfig != x.SiteId && x.Histfig != 0 && x.SiteId != 0 { sameFields["HistoricalEventRemoveHfSiteLink"]["Histfig"]["SiteId"] = false } if x.Structure != x.SiteId && x.Structure != 0 && x.SiteId != 0 { sameFields["HistoricalEventRemoveHfSiteLink"]["Structure"]["SiteId"] = false } } type HistoricalEventReplacedStructure struct { Civ int `json:"civ" legend:"plus"` // civ CivId int `json:"civId" legend:"base"` // civ_id NewAbId int `json:"newAbId" legend:"base"` // new_ab_id NewStructure int `json:"newStructure" legend:"plus"` // new_structure OldAbId int `json:"oldAbId" legend:"base"` // old_ab_id OldStructure int `json:"oldStructure" legend:"plus"` // old_structure Site int `json:"site" legend:"plus"` // site SiteCiv int `json:"siteCiv" legend:"plus"` // site_civ SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventReplacedStructure) Type() string { return "replaced structure" } func (x *HistoricalEventReplacedStructure) RelatedToEntity(id int) bool { return x.CivId == id || x.SiteCivId == id } func (x *HistoricalEventReplacedStructure) RelatedToHf(id int) bool { return false } func (x *HistoricalEventReplacedStructure) CheckFields() { if x.Civ != x.CivId && x.Civ != 0 && x.CivId != 0 { sameFields["HistoricalEventReplacedStructure"]["Civ"]["CivId"] = false } if x.Civ != x.NewAbId && x.Civ != 0 && x.NewAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["Civ"]["NewAbId"] = false } if x.Civ != x.OldAbId && x.Civ != 0 && x.OldAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["Civ"]["OldAbId"] = false } if x.Civ != x.SiteCivId && x.Civ != 0 && x.SiteCivId != 0 { sameFields["HistoricalEventReplacedStructure"]["Civ"]["SiteCivId"] = false } if x.Civ != x.SiteId && x.Civ != 0 && x.SiteId != 0 { sameFields["HistoricalEventReplacedStructure"]["Civ"]["SiteId"] = false } if x.NewStructure != x.CivId && x.NewStructure != 0 && x.CivId != 0 { sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["CivId"] = false } if x.NewStructure != x.NewAbId && x.NewStructure != 0 && x.NewAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["NewAbId"] = false } if x.NewStructure != x.OldAbId && x.NewStructure != 0 && x.OldAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["OldAbId"] = false } if x.NewStructure != x.SiteCivId && x.NewStructure != 0 && x.SiteCivId != 0 { sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["SiteCivId"] = false } if x.NewStructure != x.SiteId && x.NewStructure != 0 && x.SiteId != 0 { sameFields["HistoricalEventReplacedStructure"]["NewStructure"]["SiteId"] = false } if x.OldStructure != x.CivId && x.OldStructure != 0 && x.CivId != 0 { sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["CivId"] = false } if x.OldStructure != x.NewAbId && x.OldStructure != 0 && x.NewAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["NewAbId"] = false } if x.OldStructure != x.OldAbId && x.OldStructure != 0 && x.OldAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["OldAbId"] = false } if x.OldStructure != x.SiteCivId && x.OldStructure != 0 && x.SiteCivId != 0 { sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["SiteCivId"] = false } if x.OldStructure != x.SiteId && x.OldStructure != 0 && x.SiteId != 0 { sameFields["HistoricalEventReplacedStructure"]["OldStructure"]["SiteId"] = false } if x.Site != x.CivId && x.Site != 0 && x.CivId != 0 { sameFields["HistoricalEventReplacedStructure"]["Site"]["CivId"] = false } if x.Site != x.NewAbId && x.Site != 0 && x.NewAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["Site"]["NewAbId"] = false } if x.Site != x.OldAbId && x.Site != 0 && x.OldAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["Site"]["OldAbId"] = false } if x.Site != x.SiteCivId && x.Site != 0 && x.SiteCivId != 0 { sameFields["HistoricalEventReplacedStructure"]["Site"]["SiteCivId"] = false } if x.Site != x.SiteId && x.Site != 0 && x.SiteId != 0 { sameFields["HistoricalEventReplacedStructure"]["Site"]["SiteId"] = false } if x.SiteCiv != x.CivId && x.SiteCiv != 0 && x.CivId != 0 { sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["CivId"] = false } if x.SiteCiv != x.NewAbId && x.SiteCiv != 0 && x.NewAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["NewAbId"] = false } if x.SiteCiv != x.OldAbId && x.SiteCiv != 0 && x.OldAbId != 0 { sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["OldAbId"] = false } if x.SiteCiv != x.SiteCivId && x.SiteCiv != 0 && x.SiteCivId != 0 { sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["SiteCivId"] = false } if x.SiteCiv != x.SiteId && x.SiteCiv != 0 && x.SiteId != 0 { sameFields["HistoricalEventReplacedStructure"]["SiteCiv"]["SiteId"] = false } } type HistoricalEventSiteDied struct { Abandoned bool `json:"abandoned" legend:"base"` // abandoned CivId int `json:"civId" legend:"base"` // civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventSiteDied) Type() string { return "site died" } func (x *HistoricalEventSiteDied) RelatedToEntity(id int) bool { return x.CivId == id || x.SiteCivId == id } func (x *HistoricalEventSiteDied) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSiteDied) CheckFields() { } type HistoricalEventSiteDisputeDispute int const ( HistoricalEventSiteDisputeDispute_Unknown HistoricalEventSiteDisputeDispute = iota HistoricalEventSiteDisputeDispute_FishingRights HistoricalEventSiteDisputeDispute_GrazingRights HistoricalEventSiteDisputeDispute_LivestockOwnership HistoricalEventSiteDisputeDispute_RightsOfWay HistoricalEventSiteDisputeDispute_Territory HistoricalEventSiteDisputeDispute_WaterRights ) func parseHistoricalEventSiteDisputeDispute(s string) HistoricalEventSiteDisputeDispute { switch s { case "fishing rights": return HistoricalEventSiteDisputeDispute_FishingRights case "grazing rights": return HistoricalEventSiteDisputeDispute_GrazingRights case "livestock ownership": return HistoricalEventSiteDisputeDispute_LivestockOwnership case "rights-of-way": return HistoricalEventSiteDisputeDispute_RightsOfWay case "territory": return HistoricalEventSiteDisputeDispute_Territory case "water rights": return HistoricalEventSiteDisputeDispute_WaterRights } return HistoricalEventSiteDisputeDispute_Unknown } func (s HistoricalEventSiteDisputeDispute) String() string { switch s { case HistoricalEventSiteDisputeDispute_FishingRights: return "fishing rights" case HistoricalEventSiteDisputeDispute_GrazingRights: return "grazing rights" case HistoricalEventSiteDisputeDispute_LivestockOwnership: return "livestock ownership" case HistoricalEventSiteDisputeDispute_RightsOfWay: return "rights of way" case HistoricalEventSiteDisputeDispute_Territory: return "territory" case HistoricalEventSiteDisputeDispute_WaterRights: return "water rights" } return "unknown" } func (s HistoricalEventSiteDisputeDispute) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventSiteDispute struct { Dispute HistoricalEventSiteDisputeDispute `json:"dispute" legend:"base"` // dispute EntityId1 int `json:"entityId1" legend:"base"` // entity_id_1 EntityId2 int `json:"entityId2" legend:"base"` // entity_id_2 SiteId1 int `json:"siteId1" legend:"base"` // site_id_1 SiteId2 int `json:"siteId2" legend:"base"` // site_id_2 } func (x *HistoricalEventSiteDispute) Type() string { return "site dispute" } func (x *HistoricalEventSiteDispute) RelatedToEntity(id int) bool { return x.EntityId1 == id || x.EntityId2 == id } func (x *HistoricalEventSiteDispute) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSiteDispute) CheckFields() { } type HistoricalEventSiteRetired struct { CivId int `json:"civId" legend:"base"` // civ_id First bool `json:"first" legend:"base"` // first SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventSiteRetired) Type() string { return "site retired" } func (x *HistoricalEventSiteRetired) RelatedToEntity(id int) bool { return x.CivId == id || x.SiteCivId == id } func (x *HistoricalEventSiteRetired) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSiteRetired) CheckFields() { } type HistoricalEventSiteSurrendered struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventSiteSurrendered) Type() string { return "site surrendered" } func (x *HistoricalEventSiteSurrendered) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventSiteSurrendered) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSiteSurrendered) CheckFields() { } type HistoricalEventSiteTakenOver struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id NewSiteCivId int `json:"newSiteCivId" legend:"base"` // new_site_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventSiteTakenOver) Type() string { return "site taken over" } func (x *HistoricalEventSiteTakenOver) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.NewSiteCivId == id || x.SiteCivId == id } func (x *HistoricalEventSiteTakenOver) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSiteTakenOver) CheckFields() { } type HistoricalEventSiteTributeForcedSeason int const ( HistoricalEventSiteTributeForcedSeason_Unknown HistoricalEventSiteTributeForcedSeason = iota HistoricalEventSiteTributeForcedSeason_Autumn HistoricalEventSiteTributeForcedSeason_Summer ) func parseHistoricalEventSiteTributeForcedSeason(s string) HistoricalEventSiteTributeForcedSeason { switch s { case "Autumn": return HistoricalEventSiteTributeForcedSeason_Autumn case "Summer": return HistoricalEventSiteTributeForcedSeason_Summer } return HistoricalEventSiteTributeForcedSeason_Unknown } func (s HistoricalEventSiteTributeForcedSeason) String() string { switch s { case HistoricalEventSiteTributeForcedSeason_Autumn: return "autumn" case HistoricalEventSiteTributeForcedSeason_Summer: return "summer" } return "unknown" } func (s HistoricalEventSiteTributeForcedSeason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventSiteTributeForced struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id Season HistoricalEventSiteTributeForcedSeason `json:"season" legend:"base"` // season SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventSiteTributeForced) Type() string { return "site tribute forced" } func (x *HistoricalEventSiteTributeForced) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventSiteTributeForced) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSiteTributeForced) CheckFields() { } type HistoricalEventSneakIntoSite struct { AttackerCivId int `json:"attackerCivId" legend:"base"` // attacker_civ_id DefenderCivId int `json:"defenderCivId" legend:"base"` // defender_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalEventSneakIntoSite) Type() string { return "sneak into site" } func (x *HistoricalEventSneakIntoSite) RelatedToEntity(id int) bool { return x.AttackerCivId == id || x.DefenderCivId == id || x.SiteCivId == id } func (x *HistoricalEventSneakIntoSite) RelatedToHf(id int) bool { return false } func (x *HistoricalEventSneakIntoSite) CheckFields() { } type HistoricalEventSpottedLeavingSite struct { LeaverCivId int `json:"leaverCivId" legend:"base"` // leaver_civ_id SiteCivId int `json:"siteCivId" legend:"base"` // site_civ_id SiteId int `json:"siteId" legend:"base"` // site_id SpotterHfid int `json:"spotterHfid" legend:"base"` // spotter_hfid } func (x *HistoricalEventSpottedLeavingSite) Type() string { return "spotted leaving site" } func (x *HistoricalEventSpottedLeavingSite) RelatedToEntity(id int) bool { return x.LeaverCivId == id || x.SiteCivId == id } func (x *HistoricalEventSpottedLeavingSite) RelatedToHf(id int) bool { return x.SpotterHfid == id } func (x *HistoricalEventSpottedLeavingSite) CheckFields() { } type HistoricalEventSquadVsSquad struct { AHfid []int `json:"aHfid" legend:"base"` // a_hfid ALeaderHfid int `json:"aLeaderHfid" legend:"base"` // a_leader_hfid ALeadershipRoll int `json:"aLeadershipRoll" legend:"base"` // a_leadership_roll ASquadId int `json:"aSquadId" legend:"base"` // a_squad_id DEffect int `json:"dEffect" legend:"base"` // d_effect DHfid []int `json:"dHfid" legend:"base"` // d_hfid DInteraction int `json:"dInteraction" legend:"base"` // d_interaction DLeaderHfid int `json:"dLeaderHfid" legend:"base"` // d_leader_hfid DLeadershipRoll int `json:"dLeadershipRoll" legend:"base"` // d_leadership_roll DNumber int `json:"dNumber" legend:"base"` // d_number DRace int `json:"dRace" legend:"base"` // d_race DSlain int `json:"dSlain" legend:"base"` // d_slain DSquadId int `json:"dSquadId" legend:"base"` // d_squad_id FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id SiteId int `json:"siteId" legend:"base"` // site_id StructureId int `json:"structureId" legend:"base"` // structure_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventSquadVsSquad) Type() string { return "squad vs squad" } func (x *HistoricalEventSquadVsSquad) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventSquadVsSquad) RelatedToHf(id int) bool { return containsInt(x.AHfid, id) || containsInt(x.DHfid, id) || x.ALeaderHfid == id || x.DLeaderHfid == id } func (x *HistoricalEventSquadVsSquad) CheckFields() { } type HistoricalEventTacticalSituationSituation int const ( HistoricalEventTacticalSituationSituation_Unknown HistoricalEventTacticalSituationSituation = iota HistoricalEventTacticalSituationSituation_AFavored HistoricalEventTacticalSituationSituation_ASlightlyFavored HistoricalEventTacticalSituationSituation_AStronglyFavored HistoricalEventTacticalSituationSituation_DSlightlyFavored HistoricalEventTacticalSituationSituation_DStronglyFavored HistoricalEventTacticalSituationSituation_NeitherFavored ) func parseHistoricalEventTacticalSituationSituation(s string) HistoricalEventTacticalSituationSituation { switch s { case "a favored": return HistoricalEventTacticalSituationSituation_AFavored case "a slightly favored": return HistoricalEventTacticalSituationSituation_ASlightlyFavored case "a strongly favored": return HistoricalEventTacticalSituationSituation_AStronglyFavored case "d slightly favored": return HistoricalEventTacticalSituationSituation_DSlightlyFavored case "d strongly favored": return HistoricalEventTacticalSituationSituation_DStronglyFavored case "neither favored": return HistoricalEventTacticalSituationSituation_NeitherFavored } return HistoricalEventTacticalSituationSituation_Unknown } func (s HistoricalEventTacticalSituationSituation) String() string { switch s { case HistoricalEventTacticalSituationSituation_AFavored: return "a favored" case HistoricalEventTacticalSituationSituation_ASlightlyFavored: return "a slightly favored" case HistoricalEventTacticalSituationSituation_AStronglyFavored: return "a strongly favored" case HistoricalEventTacticalSituationSituation_DSlightlyFavored: return "d slightly favored" case HistoricalEventTacticalSituationSituation_DStronglyFavored: return "d strongly favored" case HistoricalEventTacticalSituationSituation_NeitherFavored: return "neither favored" } return "unknown" } func (s HistoricalEventTacticalSituationSituation) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventTacticalSituation struct { ATacticianHfid int `json:"aTacticianHfid" legend:"base"` // a_tactician_hfid ATacticsRoll int `json:"aTacticsRoll" legend:"base"` // a_tactics_roll DTacticianHfid int `json:"dTacticianHfid" legend:"base"` // d_tactician_hfid DTacticsRoll int `json:"dTacticsRoll" legend:"base"` // d_tactics_roll FeatureLayerId int `json:"featureLayerId" legend:"base"` // feature_layer_id SiteId int `json:"siteId" legend:"base"` // site_id Situation HistoricalEventTacticalSituationSituation `json:"situation" legend:"base"` // situation Start bool `json:"start" legend:"base"` // start StructureId int `json:"structureId" legend:"base"` // structure_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id } func (x *HistoricalEventTacticalSituation) Type() string { return "tactical situation" } func (x *HistoricalEventTacticalSituation) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventTacticalSituation) RelatedToHf(id int) bool { return x.ATacticianHfid == id || x.DTacticianHfid == id } func (x *HistoricalEventTacticalSituation) CheckFields() { } type HistoricalEventTrade struct { AccountShift int `json:"accountShift" legend:"base"` // account_shift Allotment int `json:"allotment" legend:"base"` // allotment AllotmentIndex int `json:"allotmentIndex" legend:"base"` // allotment_index DestSiteId int `json:"destSiteId" legend:"base"` // dest_site_id ProductionZoneId int `json:"productionZoneId" legend:"base"` // production_zone_id SourceSiteId int `json:"sourceSiteId" legend:"base"` // source_site_id TraderEntityId int `json:"traderEntityId" legend:"base"` // trader_entity_id TraderHfid int `json:"traderHfid" legend:"base"` // trader_hfid } func (x *HistoricalEventTrade) Type() string { return "trade" } func (x *HistoricalEventTrade) RelatedToEntity(id int) bool { return x.TraderEntityId == id } func (x *HistoricalEventTrade) RelatedToHf(id int) bool { return x.TraderHfid == id } func (x *HistoricalEventTrade) CheckFields() { } type HistoricalEventWrittenContentComposedCircumstance int const ( HistoricalEventWrittenContentComposedCircumstance_Unknown HistoricalEventWrittenContentComposedCircumstance = iota HistoricalEventWrittenContentComposedCircumstance_Dream HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf HistoricalEventWrittenContentComposedCircumstance_Nightmare HistoricalEventWrittenContentComposedCircumstance_PrayToHf ) func parseHistoricalEventWrittenContentComposedCircumstance(s string) HistoricalEventWrittenContentComposedCircumstance { switch s { case "dream": return HistoricalEventWrittenContentComposedCircumstance_Dream case "dream about hf": return HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf case "nightmare": return HistoricalEventWrittenContentComposedCircumstance_Nightmare case "pray to hf": return HistoricalEventWrittenContentComposedCircumstance_PrayToHf } return HistoricalEventWrittenContentComposedCircumstance_Unknown } func (s HistoricalEventWrittenContentComposedCircumstance) String() string { switch s { case HistoricalEventWrittenContentComposedCircumstance_Dream: return "dream" case HistoricalEventWrittenContentComposedCircumstance_DreamAboutHf: return "dream about hf" case HistoricalEventWrittenContentComposedCircumstance_Nightmare: return "nightmare" case HistoricalEventWrittenContentComposedCircumstance_PrayToHf: return "pray to hf" } return "unknown" } func (s HistoricalEventWrittenContentComposedCircumstance) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventWrittenContentComposedReason int const ( HistoricalEventWrittenContentComposedReason_Unknown HistoricalEventWrittenContentComposedReason = iota HistoricalEventWrittenContentComposedReason_GlorifyHf ) func parseHistoricalEventWrittenContentComposedReason(s string) HistoricalEventWrittenContentComposedReason { switch s { case "glorify hf": return HistoricalEventWrittenContentComposedReason_GlorifyHf } return HistoricalEventWrittenContentComposedReason_Unknown } func (s HistoricalEventWrittenContentComposedReason) String() string { switch s { case HistoricalEventWrittenContentComposedReason_GlorifyHf: return "glorify hf" } return "unknown" } func (s HistoricalEventWrittenContentComposedReason) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalEventWrittenContentComposed struct { Circumstance HistoricalEventWrittenContentComposedCircumstance `json:"circumstance" legend:"base"` // circumstance CircumstanceId int `json:"circumstanceId" legend:"base"` // circumstance_id HistFigureId int `json:"histFigureId" legend:"base"` // hist_figure_id Reason HistoricalEventWrittenContentComposedReason `json:"reason" legend:"base"` // reason ReasonId int `json:"reasonId" legend:"base"` // reason_id SiteId int `json:"siteId" legend:"base"` // site_id SubregionId int `json:"subregionId" legend:"base"` // subregion_id WcId int `json:"wcId" legend:"base"` // wc_id } func (x *HistoricalEventWrittenContentComposed) Type() string { return "written content composed" } func (x *HistoricalEventWrittenContentComposed) RelatedToEntity(id int) bool { return false } func (x *HistoricalEventWrittenContentComposed) RelatedToHf(id int) bool { return x.HistFigureId == id } func (x *HistoricalEventWrittenContentComposed) CheckFields() { } type HistoricalFigureGoal int const ( HistoricalFigureGoal_Unknown HistoricalFigureGoal = iota HistoricalFigureGoal_AttainRankInSociety HistoricalFigureGoal_BatheWorldInChaos HistoricalFigureGoal_BecomeALegendaryWarrior HistoricalFigureGoal_BringPeaceToTheWorld HistoricalFigureGoal_CraftAMasterwork HistoricalFigureGoal_CreateAGreatWorkOfArt HistoricalFigureGoal_FallInLove HistoricalFigureGoal_Immortality HistoricalFigureGoal_MaintainEntityStatus HistoricalFigureGoal_MakeAGreatDiscovery HistoricalFigureGoal_MasterASkill HistoricalFigureGoal_RuleTheWorld HistoricalFigureGoal_SeeTheGreatNaturalSites HistoricalFigureGoal_StartAFamily ) func parseHistoricalFigureGoal(s string) HistoricalFigureGoal { switch s { case "attain rank in society": return HistoricalFigureGoal_AttainRankInSociety case "bathe world in chaos": return HistoricalFigureGoal_BatheWorldInChaos case "become a legendary warrior": return HistoricalFigureGoal_BecomeALegendaryWarrior case "bring peace to the world": return HistoricalFigureGoal_BringPeaceToTheWorld case "craft a masterwork": return HistoricalFigureGoal_CraftAMasterwork case "create a great work of art": return HistoricalFigureGoal_CreateAGreatWorkOfArt case "fall in love": return HistoricalFigureGoal_FallInLove case "immortality": return HistoricalFigureGoal_Immortality case "maintain entity status": return HistoricalFigureGoal_MaintainEntityStatus case "make a great discovery": return HistoricalFigureGoal_MakeAGreatDiscovery case "master a skill": return HistoricalFigureGoal_MasterASkill case "rule the world": return HistoricalFigureGoal_RuleTheWorld case "see the great natural sites": return HistoricalFigureGoal_SeeTheGreatNaturalSites case "start a family": return HistoricalFigureGoal_StartAFamily } return HistoricalFigureGoal_Unknown } func (s HistoricalFigureGoal) String() string { switch s { case HistoricalFigureGoal_AttainRankInSociety: return "attain rank in society" case HistoricalFigureGoal_BatheWorldInChaos: return "bathe world in chaos" case HistoricalFigureGoal_BecomeALegendaryWarrior: return "become a legendary warrior" case HistoricalFigureGoal_BringPeaceToTheWorld: return "bring peace to the world" case HistoricalFigureGoal_CraftAMasterwork: return "craft a masterwork" case HistoricalFigureGoal_CreateAGreatWorkOfArt: return "create a great work of art" case HistoricalFigureGoal_FallInLove: return "fall in love" case HistoricalFigureGoal_Immortality: return "immortality" case HistoricalFigureGoal_MaintainEntityStatus: return "maintain entity status" case HistoricalFigureGoal_MakeAGreatDiscovery: return "make a great discovery" case HistoricalFigureGoal_MasterASkill: return "master a skill" case HistoricalFigureGoal_RuleTheWorld: return "rule the world" case HistoricalFigureGoal_SeeTheGreatNaturalSites: return "see the great natural sites" case HistoricalFigureGoal_StartAFamily: return "start a family" } return "unknown" } func (s HistoricalFigureGoal) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalFigure struct { ActiveInteraction []string `json:"activeInteraction" legend:"base"` // active_interaction Adventurer bool `json:"adventurer" legend:"base"` // adventurer Animated bool `json:"animated" legend:"base"` // animated AnimatedString string `json:"animatedString" legend:"base"` // animated_string Appeared int `json:"appeared" legend:"base"` // appeared AssociatedType string `json:"associatedType" legend:"base"` // associated_type BirthSeconds72 int `json:"birthSeconds72" legend:"base"` // birth_seconds72 BirthYear int `json:"birthYear" legend:"base"` // birth_year BreedId int `json:"breedId" legend:"base"` // breed_id Caste string `json:"caste" legend:"base"` // caste CurrentIdentityId int `json:"currentIdentityId" legend:"base"` // current_identity_id DeathSeconds72 int `json:"deathSeconds72" legend:"base"` // death_seconds72 DeathYear int `json:"deathYear" legend:"base"` // death_year Deity bool `json:"deity" legend:"base"` // deity EntPopId int `json:"entPopId" legend:"base"` // ent_pop_id EntityFormerPositionLink []*EntityFormerPositionLink `json:"entityFormerPositionLink" legend:"base"` // entity_former_position_link EntityFormerSquadLink []*EntityFormerSquadLink `json:"entityFormerSquadLink" legend:"base"` // entity_former_squad_link EntityLink []*HistoricalFigureEntityLink `json:"entityLink" legend:"base"` // entity_link EntityPositionLink []*EntityPositionLink `json:"entityPositionLink" legend:"base"` // entity_position_link EntityReputation []*EntityReputation `json:"entityReputation" legend:"base"` // entity_reputation EntitySquadLink *EntitySquadLink `json:"entitySquadLink" legend:"base"` // entity_squad_link Force bool `json:"force" legend:"base"` // force Ghost bool `json:"ghost" legend:"base"` // ghost Goal []HistoricalFigureGoal `json:"goal" legend:"base"` // goal HfLink []*HfLink `json:"hfLink" legend:"base"` // hf_link HfSkill []*HfSkill `json:"hfSkill" legend:"base"` // hf_skill HoldsArtifact []int `json:"holdsArtifact" legend:"base"` // holds_artifact HonorEntity []*HonorEntity `json:"honorEntity" legend:"base"` // honor_entity Id_ int `json:"id" legend:"both"` // id InteractionKnowledge []string `json:"interactionKnowledge" legend:"base"` // interaction_knowledge IntrigueActor []*IntrigueActor `json:"intrigueActor" legend:"base"` // intrigue_actor IntriguePlot []*IntriguePlot `json:"intriguePlot" legend:"base"` // intrigue_plot JourneyPet []string `json:"journeyPet" legend:"base"` // journey_pet Name_ string `json:"name" legend:"base"` // name Race string `json:"race" legend:"both"` // race RelationshipProfileHfHistorical []*RelationshipProfileHfHistorical `json:"relationshipProfileHfHistorical" legend:"base"` // relationship_profile_hf_historical RelationshipProfileHfIdentity []*RelationshipProfileHfIdentity `json:"relationshipProfileHfIdentity" legend:"base"` // relationship_profile_hf_identity RelationshipProfileHfVisual []*RelationshipProfileHfVisual `json:"relationshipProfileHfVisual" legend:"base"` // relationship_profile_hf_visual Sex int `json:"sex" legend:"plus"` // sex SiteLink []*SiteLink `json:"siteLink" legend:"base"` // site_link SiteProperty []*HistoricalFigureSiteProperty `json:"siteProperty" legend:"base"` // site_property Sphere []string `json:"sphere" legend:"base"` // sphere UsedIdentityId []int `json:"usedIdentityId" legend:"base"` // used_identity_id VagueRelationship []*VagueRelationship `json:"vagueRelationship" legend:"base"` // vague_relationship } func (x *HistoricalFigure) Id() int { return x.Id_ } func (x *HistoricalFigure) Name() string { return x.Name_ } func (x *HistoricalFigure) RelatedToEntity(id int) bool { return containsInt(x.UsedIdentityId, id) || x.CurrentIdentityId == id } func (x *HistoricalFigure) RelatedToHf(id int) bool { return false } func (x *HistoricalFigure) CheckFields() { if x.Sex != x.Appeared && x.Sex != 0 && x.Appeared != 0 { sameFields["HistoricalFigure"]["Sex"]["Appeared"] = false } if x.Sex != x.BirthSeconds72 && x.Sex != 0 && x.BirthSeconds72 != 0 { sameFields["HistoricalFigure"]["Sex"]["BirthSeconds72"] = false } if x.Sex != x.BirthYear && x.Sex != 0 && x.BirthYear != 0 { sameFields["HistoricalFigure"]["Sex"]["BirthYear"] = false } if x.Sex != x.BreedId && x.Sex != 0 && x.BreedId != 0 { sameFields["HistoricalFigure"]["Sex"]["BreedId"] = false } if x.Sex != x.CurrentIdentityId && x.Sex != 0 && x.CurrentIdentityId != 0 { sameFields["HistoricalFigure"]["Sex"]["CurrentIdentityId"] = false } if x.Sex != x.DeathSeconds72 && x.Sex != 0 && x.DeathSeconds72 != 0 { sameFields["HistoricalFigure"]["Sex"]["DeathSeconds72"] = false } if x.Sex != x.DeathYear && x.Sex != 0 && x.DeathYear != 0 { sameFields["HistoricalFigure"]["Sex"]["DeathYear"] = false } if x.Sex != x.EntPopId && x.Sex != 0 && x.EntPopId != 0 { sameFields["HistoricalFigure"]["Sex"]["EntPopId"] = false } } type HistoricalFigureEntityLinkLinkType int const ( HistoricalFigureEntityLinkLinkType_Unknown HistoricalFigureEntityLinkLinkType = iota HistoricalFigureEntityLinkLinkType_Criminal HistoricalFigureEntityLinkLinkType_Enemy HistoricalFigureEntityLinkLinkType_FormerMember HistoricalFigureEntityLinkLinkType_FormerPrisoner HistoricalFigureEntityLinkLinkType_FormerSlave HistoricalFigureEntityLinkLinkType_Member HistoricalFigureEntityLinkLinkType_Prisoner HistoricalFigureEntityLinkLinkType_Slave ) func parseHistoricalFigureEntityLinkLinkType(s string) HistoricalFigureEntityLinkLinkType { switch s { case "criminal": return HistoricalFigureEntityLinkLinkType_Criminal case "enemy": return HistoricalFigureEntityLinkLinkType_Enemy case "former member": return HistoricalFigureEntityLinkLinkType_FormerMember case "former prisoner": return HistoricalFigureEntityLinkLinkType_FormerPrisoner case "former slave": return HistoricalFigureEntityLinkLinkType_FormerSlave case "member": return HistoricalFigureEntityLinkLinkType_Member case "prisoner": return HistoricalFigureEntityLinkLinkType_Prisoner case "slave": return HistoricalFigureEntityLinkLinkType_Slave } return HistoricalFigureEntityLinkLinkType_Unknown } func (s HistoricalFigureEntityLinkLinkType) String() string { switch s { case HistoricalFigureEntityLinkLinkType_Criminal: return "criminal" case HistoricalFigureEntityLinkLinkType_Enemy: return "enemy" case HistoricalFigureEntityLinkLinkType_FormerMember: return "former member" case HistoricalFigureEntityLinkLinkType_FormerPrisoner: return "former prisoner" case HistoricalFigureEntityLinkLinkType_FormerSlave: return "former slave" case HistoricalFigureEntityLinkLinkType_Member: return "member" case HistoricalFigureEntityLinkLinkType_Prisoner: return "prisoner" case HistoricalFigureEntityLinkLinkType_Slave: return "slave" } return "unknown" } func (s HistoricalFigureEntityLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type HistoricalFigureEntityLink struct { EntityId int `json:"entityId" legend:"base"` // entity_id LinkStrength int `json:"linkStrength" legend:"base"` // link_strength LinkType HistoricalFigureEntityLinkLinkType `json:"linkType" legend:"base"` // link_type } func (x *HistoricalFigureEntityLink) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *HistoricalFigureEntityLink) RelatedToHf(id int) bool { return false } func (x *HistoricalFigureEntityLink) CheckFields() { } type HistoricalFigureSiteProperty struct { PropertyId int `json:"propertyId" legend:"base"` // property_id SiteId int `json:"siteId" legend:"base"` // site_id } func (x *HistoricalFigureSiteProperty) RelatedToEntity(id int) bool { return false } func (x *HistoricalFigureSiteProperty) RelatedToHf(id int) bool { return false } func (x *HistoricalFigureSiteProperty) CheckFields() { } type HonorRequiredSkill int const ( HonorRequiredSkill_Unknown HonorRequiredSkill = iota HonorRequiredSkill_AXE HonorRequiredSkill_CROSSBOW HonorRequiredSkill_HAMMER HonorRequiredSkill_MACE HonorRequiredSkill_SPEAR HonorRequiredSkill_SWORD ) func parseHonorRequiredSkill(s string) HonorRequiredSkill { switch s { case "AXE": return HonorRequiredSkill_AXE case "CROSSBOW": return HonorRequiredSkill_CROSSBOW case "HAMMER": return HonorRequiredSkill_HAMMER case "MACE": return HonorRequiredSkill_MACE case "SPEAR": return HonorRequiredSkill_SPEAR case "SWORD": return HonorRequiredSkill_SWORD } return HonorRequiredSkill_Unknown } func (s HonorRequiredSkill) String() string { switch s { case HonorRequiredSkill_AXE: return "axe" case HonorRequiredSkill_CROSSBOW: return "crossbow" case HonorRequiredSkill_HAMMER: return "hammer" case HonorRequiredSkill_MACE: return "mace" case HonorRequiredSkill_SPEAR: return "spear" case HonorRequiredSkill_SWORD: return "sword" } return "unknown" } func (s HonorRequiredSkill) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Honor struct { ExemptEpid int `json:"exemptEpid" legend:"base"` // exempt_epid ExemptFormerEpid int `json:"exemptFormerEpid" legend:"base"` // exempt_former_epid GivesPrecedence int `json:"givesPrecedence" legend:"base"` // gives_precedence GrantedToEverybody bool `json:"grantedToEverybody" legend:"base"` // granted_to_everybody Id_ int `json:"id" legend:"base"` // id Name_ string `json:"name" legend:"base"` // name RequiredBattles int `json:"requiredBattles" legend:"base"` // required_battles RequiredKills int `json:"requiredKills" legend:"base"` // required_kills RequiredSkill HonorRequiredSkill `json:"requiredSkill" legend:"base"` // required_skill RequiredSkillIpTotal int `json:"requiredSkillIpTotal" legend:"base"` // required_skill_ip_total RequiredYears int `json:"requiredYears" legend:"base"` // required_years RequiresAnyMeleeOrRangedSkill bool `json:"requiresAnyMeleeOrRangedSkill" legend:"base"` // requires_any_melee_or_ranged_skill } func (x *Honor) Id() int { return x.Id_ } func (x *Honor) Name() string { return x.Name_ } func (x *Honor) RelatedToEntity(id int) bool { return false } func (x *Honor) RelatedToHf(id int) bool { return false } func (x *Honor) CheckFields() { } type HonorEntity struct { Battles int `json:"battles" legend:"base"` // battles Entity int `json:"entity" legend:"base"` // entity HonorId []int `json:"honorId" legend:"base"` // honor_id Kills int `json:"kills" legend:"base"` // kills } func (x *HonorEntity) RelatedToEntity(id int) bool { return x.Entity == id } func (x *HonorEntity) RelatedToHf(id int) bool { return false } func (x *HonorEntity) CheckFields() { } type IdentityProfession int const ( IdentityProfession_Unknown IdentityProfession = iota IdentityProfession_Bard IdentityProfession_BeastHunter IdentityProfession_Criminal IdentityProfession_Dancer IdentityProfession_Mercenary IdentityProfession_Merchant IdentityProfession_Monk IdentityProfession_MonsterSlayer IdentityProfession_Peddler IdentityProfession_Pilgrim IdentityProfession_Poet IdentityProfession_Prophet IdentityProfession_Scholar IdentityProfession_Snatcher ) func parseIdentityProfession(s string) IdentityProfession { switch s { case "bard": return IdentityProfession_Bard case "beast_hunter": return IdentityProfession_BeastHunter case "criminal": return IdentityProfession_Criminal case "dancer": return IdentityProfession_Dancer case "mercenary": return IdentityProfession_Mercenary case "merchant": return IdentityProfession_Merchant case "monk": return IdentityProfession_Monk case "monster_slayer": return IdentityProfession_MonsterSlayer case "peddler": return IdentityProfession_Peddler case "pilgrim": return IdentityProfession_Pilgrim case "poet": return IdentityProfession_Poet case "prophet": return IdentityProfession_Prophet case "scholar": return IdentityProfession_Scholar case "snatcher": return IdentityProfession_Snatcher } return IdentityProfession_Unknown } func (s IdentityProfession) String() string { switch s { case IdentityProfession_Bard: return "bard" case IdentityProfession_BeastHunter: return "beast hunter" case IdentityProfession_Criminal: return "criminal" case IdentityProfession_Dancer: return "dancer" case IdentityProfession_Mercenary: return "mercenary" case IdentityProfession_Merchant: return "merchant" case IdentityProfession_Monk: return "monk" case IdentityProfession_MonsterSlayer: return "monster slayer" case IdentityProfession_Peddler: return "peddler" case IdentityProfession_Pilgrim: return "pilgrim" case IdentityProfession_Poet: return "poet" case IdentityProfession_Prophet: return "prophet" case IdentityProfession_Scholar: return "scholar" case IdentityProfession_Snatcher: return "snatcher" } return "unknown" } func (s IdentityProfession) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Identity struct { BirthSecond int `json:"birthSecond" legend:"plus"` // birth_second BirthYear int `json:"birthYear" legend:"plus"` // birth_year Caste string `json:"caste" legend:"plus"` // caste EntityId int `json:"entityId" legend:"plus"` // entity_id HistfigId int `json:"histfigId" legend:"plus"` // histfig_id Id_ int `json:"id" legend:"plus"` // id Name_ string `json:"name" legend:"plus"` // name NemesisId int `json:"nemesisId" legend:"plus"` // nemesis_id Profession IdentityProfession `json:"profession" legend:"plus"` // profession Race string `json:"race" legend:"plus"` // race } func (x *Identity) Id() int { return x.Id_ } func (x *Identity) Name() string { return x.Name_ } func (x *Identity) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *Identity) RelatedToHf(id int) bool { return x.HistfigId == id } func (x *Identity) CheckFields() { } type IntrigueActorRole int const ( IntrigueActorRole_Unknown IntrigueActorRole = iota IntrigueActorRole_Asset IntrigueActorRole_CorruptPositionHolder IntrigueActorRole_DeliveryTarget IntrigueActorRole_Enemy IntrigueActorRole_Handler IntrigueActorRole_Lieutenant IntrigueActorRole_Master IntrigueActorRole_PossibleThreat IntrigueActorRole_PossiblyUnknownDirector IntrigueActorRole_PotentialEmployer IntrigueActorRole_Rebuffed IntrigueActorRole_SourceOfFunds IntrigueActorRole_SourceOfFundsForMaster IntrigueActorRole_SuspectedCriminal IntrigueActorRole_UnderworldContact IntrigueActorRole_UsableAssassin IntrigueActorRole_UsableSnatcher IntrigueActorRole_UsableThief ) func parseIntrigueActorRole(s string) IntrigueActorRole { switch s { case "asset": return IntrigueActorRole_Asset case "corrupt position holder": return IntrigueActorRole_CorruptPositionHolder case "delivery target": return IntrigueActorRole_DeliveryTarget case "enemy": return IntrigueActorRole_Enemy case "handler": return IntrigueActorRole_Handler case "lieutenant": return IntrigueActorRole_Lieutenant case "master": return IntrigueActorRole_Master case "possible threat": return IntrigueActorRole_PossibleThreat case "possibly unknown director": return IntrigueActorRole_PossiblyUnknownDirector case "potential employer": return IntrigueActorRole_PotentialEmployer case "rebuffed": return IntrigueActorRole_Rebuffed case "source of funds": return IntrigueActorRole_SourceOfFunds case "source of funds for master": return IntrigueActorRole_SourceOfFundsForMaster case "suspected criminal": return IntrigueActorRole_SuspectedCriminal case "underworld contact": return IntrigueActorRole_UnderworldContact case "usable assassin": return IntrigueActorRole_UsableAssassin case "usable snatcher": return IntrigueActorRole_UsableSnatcher case "usable thief": return IntrigueActorRole_UsableThief } return IntrigueActorRole_Unknown } func (s IntrigueActorRole) String() string { switch s { case IntrigueActorRole_Asset: return "asset" case IntrigueActorRole_CorruptPositionHolder: return "corrupt position holder" case IntrigueActorRole_DeliveryTarget: return "delivery target" case IntrigueActorRole_Enemy: return "enemy" case IntrigueActorRole_Handler: return "handler" case IntrigueActorRole_Lieutenant: return "lieutenant" case IntrigueActorRole_Master: return "master" case IntrigueActorRole_PossibleThreat: return "possible threat" case IntrigueActorRole_PossiblyUnknownDirector: return "possibly unknown director" case IntrigueActorRole_PotentialEmployer: return "potential employer" case IntrigueActorRole_Rebuffed: return "rebuffed" case IntrigueActorRole_SourceOfFunds: return "source of funds" case IntrigueActorRole_SourceOfFundsForMaster: return "source of funds for master" case IntrigueActorRole_SuspectedCriminal: return "suspected criminal" case IntrigueActorRole_UnderworldContact: return "underworld contact" case IntrigueActorRole_UsableAssassin: return "usable assassin" case IntrigueActorRole_UsableSnatcher: return "usable snatcher" case IntrigueActorRole_UsableThief: return "usable thief" } return "unknown" } func (s IntrigueActorRole) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type IntrigueActorStrategy int const ( IntrigueActorStrategy_Unknown IntrigueActorStrategy = iota IntrigueActorStrategy_Avoid IntrigueActorStrategy_CorruptAndPacify IntrigueActorStrategy_Monitor IntrigueActorStrategy_Neutralize IntrigueActorStrategy_Obey IntrigueActorStrategy_Tax IntrigueActorStrategy_Torment IntrigueActorStrategy_Use IntrigueActorStrategy_WorkIfSuited ) func parseIntrigueActorStrategy(s string) IntrigueActorStrategy { switch s { case "avoid": return IntrigueActorStrategy_Avoid case "corrupt and pacify": return IntrigueActorStrategy_CorruptAndPacify case "monitor": return IntrigueActorStrategy_Monitor case "neutralize": return IntrigueActorStrategy_Neutralize case "obey": return IntrigueActorStrategy_Obey case "tax": return IntrigueActorStrategy_Tax case "torment": return IntrigueActorStrategy_Torment case "use": return IntrigueActorStrategy_Use case "work if suited": return IntrigueActorStrategy_WorkIfSuited } return IntrigueActorStrategy_Unknown } func (s IntrigueActorStrategy) String() string { switch s { case IntrigueActorStrategy_Avoid: return "avoid" case IntrigueActorStrategy_CorruptAndPacify: return "corrupt and pacify" case IntrigueActorStrategy_Monitor: return "monitor" case IntrigueActorStrategy_Neutralize: return "neutralize" case IntrigueActorStrategy_Obey: return "obey" case IntrigueActorStrategy_Tax: return "tax" case IntrigueActorStrategy_Torment: return "torment" case IntrigueActorStrategy_Use: return "use" case IntrigueActorStrategy_WorkIfSuited: return "work if suited" } return "unknown" } func (s IntrigueActorStrategy) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type IntrigueActor struct { EntityId int `json:"entityId" legend:"base"` // entity_id HandleActorId int `json:"handleActorId" legend:"base"` // handle_actor_id Hfid int `json:"hfid" legend:"base"` // hfid LocalId int `json:"localId" legend:"base"` // local_id PromisedActorImmortality bool `json:"promisedActorImmortality" legend:"base"` // promised_actor_immortality PromisedMeImmortality bool `json:"promisedMeImmortality" legend:"base"` // promised_me_immortality Role IntrigueActorRole `json:"role" legend:"base"` // role Strategy IntrigueActorStrategy `json:"strategy" legend:"base"` // strategy StrategyEnid int `json:"strategyEnid" legend:"base"` // strategy_enid StrategyEppid int `json:"strategyEppid" legend:"base"` // strategy_eppid } func (x *IntrigueActor) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *IntrigueActor) RelatedToHf(id int) bool { return x.Hfid == id } func (x *IntrigueActor) CheckFields() { } type IntriguePlotType int const ( IntriguePlotType_Unknown IntriguePlotType = iota IntriguePlotType_AcquireArtifact IntriguePlotType_AssassinateActor IntriguePlotType_AttainRank IntriguePlotType_BecomeImmortal IntriguePlotType_CorruptActorsGovernment IntriguePlotType_Counterintelligence IntriguePlotType_DirectWarToActor IntriguePlotType_FrameActor IntriguePlotType_GrowAssetNetwork IntriguePlotType_GrowCorruptionNetwork IntriguePlotType_GrowFundingNetwork IntriguePlotType_InfiltrateSociety IntriguePlotType_KidnapActor IntriguePlotType_SabotageActor IntriguePlotType_UndeadWorldConquest ) func parseIntriguePlotType(s string) IntriguePlotType { switch s { case "acquire artifact": return IntriguePlotType_AcquireArtifact case "assassinate actor": return IntriguePlotType_AssassinateActor case "attain rank": return IntriguePlotType_AttainRank case "become immortal": return IntriguePlotType_BecomeImmortal case "corrupt actor's government": return IntriguePlotType_CorruptActorsGovernment case "counterintelligence": return IntriguePlotType_Counterintelligence case "direct war to actor": return IntriguePlotType_DirectWarToActor case "frame actor": return IntriguePlotType_FrameActor case "grow asset network": return IntriguePlotType_GrowAssetNetwork case "grow corruption network": return IntriguePlotType_GrowCorruptionNetwork case "grow funding network": return IntriguePlotType_GrowFundingNetwork case "infiltrate society": return IntriguePlotType_InfiltrateSociety case "kidnap actor": return IntriguePlotType_KidnapActor case "sabotage actor": return IntriguePlotType_SabotageActor case "undead world conquest": return IntriguePlotType_UndeadWorldConquest } return IntriguePlotType_Unknown } func (s IntriguePlotType) String() string { switch s { case IntriguePlotType_AcquireArtifact: return "acquire artifact" case IntriguePlotType_AssassinateActor: return "assassinate actor" case IntriguePlotType_AttainRank: return "attain rank" case IntriguePlotType_BecomeImmortal: return "become immortal" case IntriguePlotType_CorruptActorsGovernment: return "corrupt actors government" case IntriguePlotType_Counterintelligence: return "counterintelligence" case IntriguePlotType_DirectWarToActor: return "direct war to actor" case IntriguePlotType_FrameActor: return "frame actor" case IntriguePlotType_GrowAssetNetwork: return "grow asset network" case IntriguePlotType_GrowCorruptionNetwork: return "grow corruption network" case IntriguePlotType_GrowFundingNetwork: return "grow funding network" case IntriguePlotType_InfiltrateSociety: return "infiltrate society" case IntriguePlotType_KidnapActor: return "kidnap actor" case IntriguePlotType_SabotageActor: return "sabotage actor" case IntriguePlotType_UndeadWorldConquest: return "undead world conquest" } return "unknown" } func (s IntriguePlotType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type IntriguePlot struct { ActorId int `json:"actorId" legend:"base"` // actor_id ArtifactId int `json:"artifactId" legend:"base"` // artifact_id DelegatedPlotHfid int `json:"delegatedPlotHfid" legend:"base"` // delegated_plot_hfid DelegatedPlotId int `json:"delegatedPlotId" legend:"base"` // delegated_plot_id EntityId int `json:"entityId" legend:"base"` // entity_id LocalId int `json:"localId" legend:"base"` // local_id OnHold bool `json:"onHold" legend:"base"` // on_hold ParentPlotHfid int `json:"parentPlotHfid" legend:"base"` // parent_plot_hfid ParentPlotId int `json:"parentPlotId" legend:"base"` // parent_plot_id PlotActor []*PlotActor `json:"plotActor" legend:"base"` // plot_actor Type IntriguePlotType `json:"type" legend:"base"` // type } func (x *IntriguePlot) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *IntriguePlot) RelatedToHf(id int) bool { return x.DelegatedPlotHfid == id || x.ParentPlotHfid == id } func (x *IntriguePlot) CheckFields() { } type Item struct { NameString string `json:"nameString" legend:"base"` // name_string PageNumber int `json:"pageNumber" legend:"base"` // page_number PageWrittenContentId int `json:"pageWrittenContentId" legend:"base"` // page_written_content_id WritingWrittenContentId int `json:"writingWrittenContentId" legend:"base"` // writing_written_content_id } func (x *Item) RelatedToEntity(id int) bool { return false } func (x *Item) RelatedToHf(id int) bool { return false } func (x *Item) CheckFields() { } type Landmass struct { Coord1 string `json:"coord1" legend:"plus"` // coord_1 Coord2 string `json:"coord2" legend:"plus"` // coord_2 Id_ int `json:"id" legend:"plus"` // id Name_ string `json:"name" legend:"plus"` // name } func (x *Landmass) Id() int { return x.Id_ } func (x *Landmass) Name() string { return x.Name_ } func (x *Landmass) RelatedToEntity(id int) bool { return false } func (x *Landmass) RelatedToHf(id int) bool { return false } func (x *Landmass) CheckFields() { } type MountainPeak struct { Coords string `json:"coords" legend:"plus"` // coords Height int `json:"height" legend:"plus"` // height Id_ int `json:"id" legend:"plus"` // id IsVolcano bool `json:"isVolcano" legend:"plus"` // is_volcano Name_ string `json:"name" legend:"plus"` // name } func (x *MountainPeak) Id() int { return x.Id_ } func (x *MountainPeak) Name() string { return x.Name_ } func (x *MountainPeak) RelatedToEntity(id int) bool { return false } func (x *MountainPeak) RelatedToHf(id int) bool { return false } func (x *MountainPeak) CheckFields() { } type MusicalForm struct { Description string `json:"description" legend:"base"` // description Id_ int `json:"id" legend:"both"` // id Name_ string `json:"name" legend:"plus"` // name } func (x *MusicalForm) Id() int { return x.Id_ } func (x *MusicalForm) Name() string { return x.Name_ } func (x *MusicalForm) RelatedToEntity(id int) bool { return false } func (x *MusicalForm) RelatedToHf(id int) bool { return false } func (x *MusicalForm) CheckFields() { } type Occasion struct { Event int `json:"event" legend:"plus"` // event Id_ int `json:"id" legend:"plus"` // id Name_ string `json:"name" legend:"plus"` // name Schedule []*Schedule `json:"schedule" legend:"plus"` // schedule } func (x *Occasion) Id() int { return x.Id_ } func (x *Occasion) Name() string { return x.Name_ } func (x *Occasion) RelatedToEntity(id int) bool { return false } func (x *Occasion) RelatedToHf(id int) bool { return false } func (x *Occasion) CheckFields() { } type PlotActorPlotRole int const ( PlotActorPlotRole_Unknown PlotActorPlotRole = iota PlotActorPlotRole_Assassin PlotActorPlotRole_SourceOfFunds PlotActorPlotRole_Thief ) func parsePlotActorPlotRole(s string) PlotActorPlotRole { switch s { case "assassin": return PlotActorPlotRole_Assassin case "source of funds": return PlotActorPlotRole_SourceOfFunds case "thief": return PlotActorPlotRole_Thief } return PlotActorPlotRole_Unknown } func (s PlotActorPlotRole) String() string { switch s { case PlotActorPlotRole_Assassin: return "assassin" case PlotActorPlotRole_SourceOfFunds: return "source of funds" case PlotActorPlotRole_Thief: return "thief" } return "unknown" } func (s PlotActorPlotRole) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type PlotActor struct { ActorId int `json:"actorId" legend:"base"` // actor_id AgreementHasMessenger bool `json:"agreementHasMessenger" legend:"base"` // agreement_has_messenger AgreementId int `json:"agreementId" legend:"base"` // agreement_id PlotRole PlotActorPlotRole `json:"plotRole" legend:"base"` // plot_role } func (x *PlotActor) RelatedToEntity(id int) bool { return false } func (x *PlotActor) RelatedToHf(id int) bool { return false } func (x *PlotActor) CheckFields() { } type PoeticForm struct { Description string `json:"description" legend:"base"` // description Id_ int `json:"id" legend:"both"` // id Name_ string `json:"name" legend:"plus"` // name } func (x *PoeticForm) Id() int { return x.Id_ } func (x *PoeticForm) Name() string { return x.Name_ } func (x *PoeticForm) RelatedToEntity(id int) bool { return false } func (x *PoeticForm) RelatedToHf(id int) bool { return false } func (x *PoeticForm) CheckFields() { } type ReferenceType int const ( ReferenceType_Unknown ReferenceType = iota ReferenceType_ABSTRACTBUILDING ReferenceType_ARTIFACT ReferenceType_DANCEFORM ReferenceType_ENTITY ReferenceType_HISTORICALEVENT ReferenceType_HISTORICALFIGURE ReferenceType_INTERACTION ReferenceType_KNOWLEDGESCHOLARFLAG ReferenceType_LANGUAGE ReferenceType_MUSICALFORM ReferenceType_POETICFORM ReferenceType_SITE ReferenceType_SUBREGION ReferenceType_VALUELEVEL ReferenceType_WRITTENCONTENT ) func parseReferenceType(s string) ReferenceType { switch s { case "ABSTRACT_BUILDING": return ReferenceType_ABSTRACTBUILDING case "ARTIFACT": return ReferenceType_ARTIFACT case "DANCE_FORM": return ReferenceType_DANCEFORM case "ENTITY": return ReferenceType_ENTITY case "HISTORICAL_EVENT": return ReferenceType_HISTORICALEVENT case "HISTORICAL_FIGURE": return ReferenceType_HISTORICALFIGURE case "INTERACTION": return ReferenceType_INTERACTION case "KNOWLEDGE_SCHOLAR_FLAG": return ReferenceType_KNOWLEDGESCHOLARFLAG case "LANGUAGE": return ReferenceType_LANGUAGE case "MUSICAL_FORM": return ReferenceType_MUSICALFORM case "POETIC_FORM": return ReferenceType_POETICFORM case "SITE": return ReferenceType_SITE case "SUBREGION": return ReferenceType_SUBREGION case "VALUE_LEVEL": return ReferenceType_VALUELEVEL case "WRITTEN_CONTENT": return ReferenceType_WRITTENCONTENT } return ReferenceType_Unknown } func (s ReferenceType) String() string { switch s { case ReferenceType_ABSTRACTBUILDING: return "abstractbuilding" case ReferenceType_ARTIFACT: return "artifact" case ReferenceType_DANCEFORM: return "danceform" case ReferenceType_ENTITY: return "entity" case ReferenceType_HISTORICALEVENT: return "historicalevent" case ReferenceType_HISTORICALFIGURE: return "historicalfigure" case ReferenceType_INTERACTION: return "interaction" case ReferenceType_KNOWLEDGESCHOLARFLAG: return "knowledgescholarflag" case ReferenceType_LANGUAGE: return "language" case ReferenceType_MUSICALFORM: return "musicalform" case ReferenceType_POETICFORM: return "poeticform" case ReferenceType_SITE: return "site" case ReferenceType_SUBREGION: return "subregion" case ReferenceType_VALUELEVEL: return "valuelevel" case ReferenceType_WRITTENCONTENT: return "writtencontent" } return "unknown" } func (s ReferenceType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Reference struct { Id_ int `json:"id" legend:"plus"` // id Type ReferenceType `json:"type" legend:"plus"` // type } func (x *Reference) Id() int { return x.Id_ } func (x *Reference) RelatedToEntity(id int) bool { return false } func (x *Reference) RelatedToHf(id int) bool { return false } func (x *Reference) CheckFields() { } type RegionEvilness int const ( RegionEvilness_Unknown RegionEvilness = iota RegionEvilness_Evil RegionEvilness_Good RegionEvilness_Neutral ) func parseRegionEvilness(s string) RegionEvilness { switch s { case "evil": return RegionEvilness_Evil case "good": return RegionEvilness_Good case "neutral": return RegionEvilness_Neutral } return RegionEvilness_Unknown } func (s RegionEvilness) String() string { switch s { case RegionEvilness_Evil: return "evil" case RegionEvilness_Good: return "good" case RegionEvilness_Neutral: return "neutral" } return "unknown" } func (s RegionEvilness) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type RegionType int const ( RegionType_Unknown RegionType = iota RegionType_Desert RegionType_Forest RegionType_Glacier RegionType_Grassland RegionType_Hills RegionType_Lake RegionType_Mountains RegionType_Ocean RegionType_Tundra RegionType_Wetland ) func parseRegionType(s string) RegionType { switch s { case "Desert": return RegionType_Desert case "Forest": return RegionType_Forest case "Glacier": return RegionType_Glacier case "Grassland": return RegionType_Grassland case "Hills": return RegionType_Hills case "Lake": return RegionType_Lake case "Mountains": return RegionType_Mountains case "Ocean": return RegionType_Ocean case "Tundra": return RegionType_Tundra case "Wetland": return RegionType_Wetland } return RegionType_Unknown } func (s RegionType) String() string { switch s { case RegionType_Desert: return "desert" case RegionType_Forest: return "forest" case RegionType_Glacier: return "glacier" case RegionType_Grassland: return "grassland" case RegionType_Hills: return "hills" case RegionType_Lake: return "lake" case RegionType_Mountains: return "mountains" case RegionType_Ocean: return "ocean" case RegionType_Tundra: return "tundra" case RegionType_Wetland: return "wetland" } return "unknown" } func (s RegionType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Region struct { Coords string `json:"coords" legend:"plus"` // coords Evilness RegionEvilness `json:"evilness" legend:"plus"` // evilness ForceId int `json:"forceId" legend:"plus"` // force_id Id_ int `json:"id" legend:"both"` // id Name_ string `json:"name" legend:"base"` // name Type RegionType `json:"type" legend:"base"` // type } func (x *Region) Id() int { return x.Id_ } func (x *Region) Name() string { return x.Name_ } func (x *Region) RelatedToEntity(id int) bool { return false } func (x *Region) RelatedToHf(id int) bool { return false } func (x *Region) CheckFields() { } type RelationshipProfileHfHistorical struct { Fear int `json:"fear" legend:"base"` // fear HfId int `json:"hfId" legend:"base"` // hf_id Love int `json:"love" legend:"base"` // love Loyalty int `json:"loyalty" legend:"base"` // loyalty RepEnemyFighter int `json:"repEnemyFighter" legend:"base"` // rep_enemy_fighter RepHero int `json:"repHero" legend:"base"` // rep_hero RepHunter int `json:"repHunter" legend:"base"` // rep_hunter RepKiller int `json:"repKiller" legend:"base"` // rep_killer RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath RepStoryteller int `json:"repStoryteller" legend:"base"` // rep_storyteller RepViolent int `json:"repViolent" legend:"base"` // rep_violent Respect int `json:"respect" legend:"base"` // respect Trust int `json:"trust" legend:"base"` // trust } func (x *RelationshipProfileHfHistorical) RelatedToEntity(id int) bool { return false } func (x *RelationshipProfileHfHistorical) RelatedToHf(id int) bool { return x.HfId == id } func (x *RelationshipProfileHfHistorical) CheckFields() { } type RelationshipProfileHfIdentity struct { Fear int `json:"fear" legend:"base"` // fear Id_ int `json:"id" legend:"base"` // id Love int `json:"love" legend:"base"` // love Loyalty int `json:"loyalty" legend:"base"` // loyalty RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath Respect int `json:"respect" legend:"base"` // respect Trust int `json:"trust" legend:"base"` // trust } func (x *RelationshipProfileHfIdentity) Id() int { return x.Id_ } func (x *RelationshipProfileHfIdentity) RelatedToEntity(id int) bool { return false } func (x *RelationshipProfileHfIdentity) RelatedToHf(id int) bool { return false } func (x *RelationshipProfileHfIdentity) CheckFields() { } type RelationshipProfileHfVisual struct { Fear int `json:"fear" legend:"base"` // fear HfId int `json:"hfId" legend:"base"` // hf_id KnownIdentityId int `json:"knownIdentityId" legend:"base"` // known_identity_id LastMeetSeconds72 int `json:"lastMeetSeconds72" legend:"base"` // last_meet_seconds72 LastMeetYear int `json:"lastMeetYear" legend:"base"` // last_meet_year Love int `json:"love" legend:"base"` // love Loyalty int `json:"loyalty" legend:"base"` // loyalty MeetCount int `json:"meetCount" legend:"base"` // meet_count RepBonded int `json:"repBonded" legend:"base"` // rep_bonded RepComrade int `json:"repComrade" legend:"base"` // rep_comrade RepFlatterer int `json:"repFlatterer" legend:"base"` // rep_flatterer RepFriendly int `json:"repFriendly" legend:"base"` // rep_friendly RepHero int `json:"repHero" legend:"base"` // rep_hero RepHunter int `json:"repHunter" legend:"base"` // rep_hunter RepInformationSource int `json:"repInformationSource" legend:"base"` // rep_information_source RepKiller int `json:"repKiller" legend:"base"` // rep_killer RepPsychopath int `json:"repPsychopath" legend:"base"` // rep_psychopath RepQuarreler int `json:"repQuarreler" legend:"base"` // rep_quarreler RepTradePartner int `json:"repTradePartner" legend:"base"` // rep_trade_partner Respect int `json:"respect" legend:"base"` // respect Trust int `json:"trust" legend:"base"` // trust } func (x *RelationshipProfileHfVisual) RelatedToEntity(id int) bool { return x.KnownIdentityId == id } func (x *RelationshipProfileHfVisual) RelatedToHf(id int) bool { return x.HfId == id } func (x *RelationshipProfileHfVisual) CheckFields() { } type River struct { EndPos string `json:"endPos" legend:"plus"` // end_pos Name_ string `json:"name" legend:"plus"` // name Path string `json:"path" legend:"plus"` // path } func (x *River) Name() string { return x.Name_ } func (x *River) RelatedToEntity(id int) bool { return false } func (x *River) RelatedToHf(id int) bool { return false } func (x *River) CheckFields() { } type ScheduleItemSubtype int const ( ScheduleItemSubtype_Unknown ScheduleItemSubtype = iota ScheduleItemSubtype_AstodStand ScheduleItemSubtype_BattleAxe ScheduleItemSubtype_Bow ScheduleItemSubtype_Crossbow ScheduleItemSubtype_Flail ScheduleItemSubtype_GreatAxe ScheduleItemSubtype_LongSword ScheduleItemSubtype_Mace ScheduleItemSubtype_Maul ScheduleItemSubtype_RohirBody ScheduleItemSubtype_Scimitar ScheduleItemSubtype_ShortSword ScheduleItemSubtype_Spear ScheduleItemSubtype_TwoHandedSword ScheduleItemSubtype_WarHammer ScheduleItemSubtype_Whip ) func parseScheduleItemSubtype(s string) ScheduleItemSubtype { switch s { case "astod stand": return ScheduleItemSubtype_AstodStand case "battle axe": return ScheduleItemSubtype_BattleAxe case "bow": return ScheduleItemSubtype_Bow case "crossbow": return ScheduleItemSubtype_Crossbow case "flail": return ScheduleItemSubtype_Flail case "great axe": return ScheduleItemSubtype_GreatAxe case "long sword": return ScheduleItemSubtype_LongSword case "mace": return ScheduleItemSubtype_Mace case "maul": return ScheduleItemSubtype_Maul case "rohir body": return ScheduleItemSubtype_RohirBody case "scimitar": return ScheduleItemSubtype_Scimitar case "short sword": return ScheduleItemSubtype_ShortSword case "spear": return ScheduleItemSubtype_Spear case "two-handed sword": return ScheduleItemSubtype_TwoHandedSword case "war hammer": return ScheduleItemSubtype_WarHammer case "whip": return ScheduleItemSubtype_Whip } return ScheduleItemSubtype_Unknown } func (s ScheduleItemSubtype) String() string { switch s { case ScheduleItemSubtype_AstodStand: return "astod stand" case ScheduleItemSubtype_BattleAxe: return "battle axe" case ScheduleItemSubtype_Bow: return "bow" case ScheduleItemSubtype_Crossbow: return "crossbow" case ScheduleItemSubtype_Flail: return "flail" case ScheduleItemSubtype_GreatAxe: return "great axe" case ScheduleItemSubtype_LongSword: return "long sword" case ScheduleItemSubtype_Mace: return "mace" case ScheduleItemSubtype_Maul: return "maul" case ScheduleItemSubtype_RohirBody: return "rohir body" case ScheduleItemSubtype_Scimitar: return "scimitar" case ScheduleItemSubtype_ShortSword: return "short sword" case ScheduleItemSubtype_Spear: return "spear" case ScheduleItemSubtype_TwoHandedSword: return "two handed sword" case ScheduleItemSubtype_WarHammer: return "war hammer" case ScheduleItemSubtype_Whip: return "whip" } return "unknown" } func (s ScheduleItemSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type ScheduleItemType int const ( ScheduleItemType_Unknown ScheduleItemType = iota ScheduleItemType_Tool ScheduleItemType_Weapon ) func parseScheduleItemType(s string) ScheduleItemType { switch s { case "tool": return ScheduleItemType_Tool case "weapon": return ScheduleItemType_Weapon } return ScheduleItemType_Unknown } func (s ScheduleItemType) String() string { switch s { case ScheduleItemType_Tool: return "tool" case ScheduleItemType_Weapon: return "weapon" } return "unknown" } func (s ScheduleItemType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type ScheduleType int const ( ScheduleType_Unknown ScheduleType = iota ScheduleType_Ceremony ScheduleType_DanceCompetition ScheduleType_DancePerformance ScheduleType_FootRace ScheduleType_GladiatoryCompetition ScheduleType_MusicalCompetition ScheduleType_MusicalPerformance ScheduleType_PoetryCompetition ScheduleType_PoetryRecital ScheduleType_Procession ScheduleType_Storytelling ScheduleType_ThrowingCompetition ScheduleType_WrestlingCompetition ) func parseScheduleType(s string) ScheduleType { switch s { case "ceremony": return ScheduleType_Ceremony case "dance_competition": return ScheduleType_DanceCompetition case "dance_performance": return ScheduleType_DancePerformance case "foot_race": return ScheduleType_FootRace case "gladiatory_competition": return ScheduleType_GladiatoryCompetition case "musical_competition": return ScheduleType_MusicalCompetition case "musical_performance": return ScheduleType_MusicalPerformance case "poetry_competition": return ScheduleType_PoetryCompetition case "poetry_recital": return ScheduleType_PoetryRecital case "procession": return ScheduleType_Procession case "storytelling": return ScheduleType_Storytelling case "throwing_competition": return ScheduleType_ThrowingCompetition case "wrestling_competition": return ScheduleType_WrestlingCompetition } return ScheduleType_Unknown } func (s ScheduleType) String() string { switch s { case ScheduleType_Ceremony: return "ceremony" case ScheduleType_DanceCompetition: return "dance competition" case ScheduleType_DancePerformance: return "dance performance" case ScheduleType_FootRace: return "foot race" case ScheduleType_GladiatoryCompetition: return "gladiatory competition" case ScheduleType_MusicalCompetition: return "musical competition" case ScheduleType_MusicalPerformance: return "musical performance" case ScheduleType_PoetryCompetition: return "poetry competition" case ScheduleType_PoetryRecital: return "poetry recital" case ScheduleType_Procession: return "procession" case ScheduleType_Storytelling: return "storytelling" case ScheduleType_ThrowingCompetition: return "throwing competition" case ScheduleType_WrestlingCompetition: return "wrestling competition" } return "unknown" } func (s ScheduleType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Schedule struct { Feature []*Feature `json:"feature" legend:"plus"` // feature Id_ int `json:"id" legend:"plus"` // id ItemSubtype ScheduleItemSubtype `json:"itemSubtype" legend:"plus"` // item_subtype ItemType ScheduleItemType `json:"itemType" legend:"plus"` // item_type Reference int `json:"reference" legend:"plus"` // reference Reference2 int `json:"reference2" legend:"plus"` // reference2 Type ScheduleType `json:"type" legend:"plus"` // type } func (x *Schedule) Id() int { return x.Id_ } func (x *Schedule) RelatedToEntity(id int) bool { return false } func (x *Schedule) RelatedToHf(id int) bool { return false } func (x *Schedule) CheckFields() { } type SiteType int const ( SiteType_Unknown SiteType = iota SiteType_Camp SiteType_Castle SiteType_Cave SiteType_DarkFortress SiteType_DarkPits SiteType_ForestRetreat SiteType_Fort SiteType_Fortress SiteType_Hamlet SiteType_Hillocks SiteType_ImportantLocation SiteType_Labyrinth SiteType_Lair SiteType_Monastery SiteType_MountainHalls SiteType_Shrine SiteType_Tomb SiteType_Tower SiteType_Town SiteType_Vault ) func parseSiteType(s string) SiteType { switch s { case "camp": return SiteType_Camp case "castle": return SiteType_Castle case "cave": return SiteType_Cave case "dark fortress": return SiteType_DarkFortress case "dark pits": return SiteType_DarkPits case "forest retreat": return SiteType_ForestRetreat case "fort": return SiteType_Fort case "fortress": return SiteType_Fortress case "hamlet": return SiteType_Hamlet case "hillocks": return SiteType_Hillocks case "important location": return SiteType_ImportantLocation case "labyrinth": return SiteType_Labyrinth case "lair": return SiteType_Lair case "monastery": return SiteType_Monastery case "mountain halls": return SiteType_MountainHalls case "shrine": return SiteType_Shrine case "tomb": return SiteType_Tomb case "tower": return SiteType_Tower case "town": return SiteType_Town case "vault": return SiteType_Vault } return SiteType_Unknown } func (s SiteType) String() string { switch s { case SiteType_Camp: return "camp" case SiteType_Castle: return "castle" case SiteType_Cave: return "cave" case SiteType_DarkFortress: return "dark fortress" case SiteType_DarkPits: return "dark pits" case SiteType_ForestRetreat: return "forest retreat" case SiteType_Fort: return "fort" case SiteType_Fortress: return "fortress" case SiteType_Hamlet: return "hamlet" case SiteType_Hillocks: return "hillocks" case SiteType_ImportantLocation: return "important location" case SiteType_Labyrinth: return "labyrinth" case SiteType_Lair: return "lair" case SiteType_Monastery: return "monastery" case SiteType_MountainHalls: return "mountain halls" case SiteType_Shrine: return "shrine" case SiteType_Tomb: return "tomb" case SiteType_Tower: return "tower" case SiteType_Town: return "town" case SiteType_Vault: return "vault" } return "unknown" } func (s SiteType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Site struct { CivId int `json:"civId" legend:"plus"` // civ_id Coords string `json:"coords" legend:"base"` // coords CurOwnerId int `json:"curOwnerId" legend:"plus"` // cur_owner_id Id_ int `json:"id" legend:"both"` // id Name_ string `json:"name" legend:"base"` // name Rectangle string `json:"rectangle" legend:"base"` // rectangle SiteProperties map[int]*SiteSiteProperty `json:"siteProperties" legend:"base"` // site_properties Structures map[int]*Structure `json:"structures" legend:"both"` // structures Type SiteType `json:"type" legend:"base"` // type } func (x *Site) Id() int { return x.Id_ } func (x *Site) Name() string { return x.Name_ } func (x *Site) RelatedToEntity(id int) bool { return x.CivId == id } func (x *Site) RelatedToHf(id int) bool { return false } func (x *Site) CheckFields() { } type SiteLinkLinkType int const ( SiteLinkLinkType_Unknown SiteLinkLinkType = iota SiteLinkLinkType_Hangout SiteLinkLinkType_HomeSavedZone SiteLinkLinkType_HomeSiteBuilding SiteLinkLinkType_HomeSiteUnderground SiteLinkLinkType_HomeStructure SiteLinkLinkType_Lair SiteLinkLinkType_Occupation SiteLinkLinkType_SeatOfPower ) func parseSiteLinkLinkType(s string) SiteLinkLinkType { switch s { case "hangout": return SiteLinkLinkType_Hangout case "home saved zone": return SiteLinkLinkType_HomeSavedZone case "home site building": return SiteLinkLinkType_HomeSiteBuilding case "home site underground": return SiteLinkLinkType_HomeSiteUnderground case "home structure": return SiteLinkLinkType_HomeStructure case "lair": return SiteLinkLinkType_Lair case "occupation": return SiteLinkLinkType_Occupation case "seat of power": return SiteLinkLinkType_SeatOfPower } return SiteLinkLinkType_Unknown } func (s SiteLinkLinkType) String() string { switch s { case SiteLinkLinkType_Hangout: return "hangout" case SiteLinkLinkType_HomeSavedZone: return "home saved zone" case SiteLinkLinkType_HomeSiteBuilding: return "home site building" case SiteLinkLinkType_HomeSiteUnderground: return "home site underground" case SiteLinkLinkType_HomeStructure: return "home structure" case SiteLinkLinkType_Lair: return "lair" case SiteLinkLinkType_Occupation: return "occupation" case SiteLinkLinkType_SeatOfPower: return "seat of power" } return "unknown" } func (s SiteLinkLinkType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type SiteLink struct { EntityId int `json:"entityId" legend:"base"` // entity_id LinkType SiteLinkLinkType `json:"linkType" legend:"base"` // link_type OccupationId int `json:"occupationId" legend:"base"` // occupation_id SiteId int `json:"siteId" legend:"base"` // site_id SubId int `json:"subId" legend:"base"` // sub_id } func (x *SiteLink) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *SiteLink) RelatedToHf(id int) bool { return false } func (x *SiteLink) CheckFields() { } type SiteSitePropertyType int const ( SiteSitePropertyType_Unknown SiteSitePropertyType = iota SiteSitePropertyType_House ) func parseSiteSitePropertyType(s string) SiteSitePropertyType { switch s { case "house": return SiteSitePropertyType_House } return SiteSitePropertyType_Unknown } func (s SiteSitePropertyType) String() string { switch s { case SiteSitePropertyType_House: return "house" } return "unknown" } func (s SiteSitePropertyType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type SiteSiteProperty struct { Id_ int `json:"id" legend:"base"` // id OwnerHfid int `json:"ownerHfid" legend:"base"` // owner_hfid StructureId int `json:"structureId" legend:"base"` // structure_id Type SiteSitePropertyType `json:"type" legend:"base"` // type } func (x *SiteSiteProperty) Id() int { return x.Id_ } func (x *SiteSiteProperty) RelatedToEntity(id int) bool { return false } func (x *SiteSiteProperty) RelatedToHf(id int) bool { return x.OwnerHfid == id } func (x *SiteSiteProperty) CheckFields() { } type StructureSubtype int const ( StructureSubtype_Unknown StructureSubtype = iota StructureSubtype_Catacombs StructureSubtype_Sewers ) func parseStructureSubtype(s string) StructureSubtype { switch s { case "catacombs": return StructureSubtype_Catacombs case "sewers": return StructureSubtype_Sewers } return StructureSubtype_Unknown } func (s StructureSubtype) String() string { switch s { case StructureSubtype_Catacombs: return "catacombs" case StructureSubtype_Sewers: return "sewers" } return "unknown" } func (s StructureSubtype) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type StructureType int const ( StructureType_Unknown StructureType = iota StructureType_CountingHouse StructureType_Dungeon StructureType_Guildhall StructureType_InnTavern StructureType_Keep StructureType_Library StructureType_Market StructureType_MeadHall StructureType_Temple StructureType_Tomb StructureType_Tower StructureType_UnderworldSpire ) func parseStructureType(s string) StructureType { switch s { case "counting house": return StructureType_CountingHouse case "counting_house": return StructureType_CountingHouse case "dungeon": return StructureType_Dungeon case "guildhall": return StructureType_Guildhall case "inn tavern": return StructureType_InnTavern case "inn_tavern": return StructureType_InnTavern case "keep": return StructureType_Keep case "library": return StructureType_Library case "market": return StructureType_Market case "mead hall": return StructureType_MeadHall case "mead_hall": return StructureType_MeadHall case "temple": return StructureType_Temple case "tomb": return StructureType_Tomb case "tower": return StructureType_Tower case "underworld spire": return StructureType_UnderworldSpire case "underworld_spire": return StructureType_UnderworldSpire } return StructureType_Unknown } func (s StructureType) String() string { switch s { case StructureType_CountingHouse: return "counting house" case StructureType_Dungeon: return "dungeon" case StructureType_Guildhall: return "guildhall" case StructureType_InnTavern: return "inn tavern" case StructureType_Keep: return "keep" case StructureType_Library: return "library" case StructureType_Market: return "market" case StructureType_MeadHall: return "mead hall" case StructureType_Temple: return "temple" case StructureType_Tomb: return "tomb" case StructureType_Tower: return "tower" case StructureType_UnderworldSpire: return "underworld spire" } return "unknown" } func (s StructureType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type Structure struct { CopiedArtifactId []int `json:"copiedArtifactId" legend:"base"` // copied_artifact_id Deity int `json:"deity" legend:"plus"` // deity DeityType int `json:"deityType" legend:"plus"` // deity_type DungeonType int `json:"dungeonType" legend:"plus"` // dungeon_type EntityId int `json:"entityId" legend:"base"` // entity_id Id_ int `json:"id" legend:"plus"` // id Inhabitant []int `json:"inhabitant" legend:"plus"` // inhabitant LocalId int `json:"localId" legend:"base"` // local_id Name_ string `json:"name" legend:"both"` // name Name2 string `json:"name2" legend:"plus"` // name2 Religion int `json:"religion" legend:"plus"` // religion Subtype StructureSubtype `json:"subtype" legend:"base"` // subtype Type StructureType `json:"type" legend:"both"` // type WorshipHfid int `json:"worshipHfid" legend:"base"` // worship_hfid } func (x *Structure) Id() int { return x.Id_ } func (x *Structure) Name() string { return x.Name_ } func (x *Structure) RelatedToEntity(id int) bool { return x.EntityId == id } func (x *Structure) RelatedToHf(id int) bool { return x.WorshipHfid == id } func (x *Structure) CheckFields() { if x.Deity != x.EntityId && x.Deity != 0 && x.EntityId != 0 { sameFields["Structure"]["Deity"]["EntityId"] = false } if x.Deity != x.LocalId && x.Deity != 0 && x.LocalId != 0 { sameFields["Structure"]["Deity"]["LocalId"] = false } if x.Deity != x.WorshipHfid && x.Deity != 0 && x.WorshipHfid != 0 { sameFields["Structure"]["Deity"]["WorshipHfid"] = false } if x.DeityType != x.EntityId && x.DeityType != 0 && x.EntityId != 0 { sameFields["Structure"]["DeityType"]["EntityId"] = false } if x.DeityType != x.LocalId && x.DeityType != 0 && x.LocalId != 0 { sameFields["Structure"]["DeityType"]["LocalId"] = false } if x.DeityType != x.WorshipHfid && x.DeityType != 0 && x.WorshipHfid != 0 { sameFields["Structure"]["DeityType"]["WorshipHfid"] = false } if x.DungeonType != x.EntityId && x.DungeonType != 0 && x.EntityId != 0 { sameFields["Structure"]["DungeonType"]["EntityId"] = false } if x.DungeonType != x.LocalId && x.DungeonType != 0 && x.LocalId != 0 { sameFields["Structure"]["DungeonType"]["LocalId"] = false } if x.DungeonType != x.WorshipHfid && x.DungeonType != 0 && x.WorshipHfid != 0 { sameFields["Structure"]["DungeonType"]["WorshipHfid"] = false } if x.Religion != x.EntityId && x.Religion != 0 && x.EntityId != 0 { sameFields["Structure"]["Religion"]["EntityId"] = false } if x.Religion != x.LocalId && x.Religion != 0 && x.LocalId != 0 { sameFields["Structure"]["Religion"]["LocalId"] = false } if x.Religion != x.WorshipHfid && x.Religion != 0 && x.WorshipHfid != 0 { sameFields["Structure"]["Religion"]["WorshipHfid"] = false } } type UndergroundRegionType int const ( UndergroundRegionType_Unknown UndergroundRegionType = iota UndergroundRegionType_Cavern UndergroundRegionType_Magma UndergroundRegionType_Underworld ) func parseUndergroundRegionType(s string) UndergroundRegionType { switch s { case "cavern": return UndergroundRegionType_Cavern case "magma": return UndergroundRegionType_Magma case "underworld": return UndergroundRegionType_Underworld } return UndergroundRegionType_Unknown } func (s UndergroundRegionType) String() string { switch s { case UndergroundRegionType_Cavern: return "cavern" case UndergroundRegionType_Magma: return "magma" case UndergroundRegionType_Underworld: return "underworld" } return "unknown" } func (s UndergroundRegionType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type UndergroundRegion struct { Coords string `json:"coords" legend:"plus"` // coords Depth int `json:"depth" legend:"base"` // depth Id_ int `json:"id" legend:"both"` // id Type UndergroundRegionType `json:"type" legend:"base"` // type } func (x *UndergroundRegion) Id() int { return x.Id_ } func (x *UndergroundRegion) RelatedToEntity(id int) bool { return false } func (x *UndergroundRegion) RelatedToHf(id int) bool { return false } func (x *UndergroundRegion) CheckFields() { } type VagueRelationship struct { ArtisticBuddy bool `json:"artisticBuddy" legend:"base"` // artistic_buddy AtheleticRival bool `json:"atheleticRival" legend:"base"` // atheletic_rival AthleteBuddy bool `json:"athleteBuddy" legend:"base"` // athlete_buddy BusinessRival bool `json:"businessRival" legend:"base"` // business_rival ChildhoodFriend bool `json:"childhoodFriend" legend:"base"` // childhood_friend Grudge bool `json:"grudge" legend:"base"` // grudge Hfid int `json:"hfid" legend:"base"` // hfid JealousObsession bool `json:"jealousObsession" legend:"base"` // jealous_obsession JealousRelationshipGrudge bool `json:"jealousRelationshipGrudge" legend:"base"` // jealous_relationship_grudge PersecutionGrudge bool `json:"persecutionGrudge" legend:"base"` // persecution_grudge ReligiousPersecutionGrudge bool `json:"religiousPersecutionGrudge" legend:"base"` // religious_persecution_grudge ScholarBuddy bool `json:"scholarBuddy" legend:"base"` // scholar_buddy SupernaturalGrudge bool `json:"supernaturalGrudge" legend:"base"` // supernatural_grudge WarBuddy bool `json:"warBuddy" legend:"base"` // war_buddy } func (x *VagueRelationship) RelatedToEntity(id int) bool { return false } func (x *VagueRelationship) RelatedToHf(id int) bool { return x.Hfid == id } func (x *VagueRelationship) CheckFields() { } type WorldConstructionType int const ( WorldConstructionType_Unknown WorldConstructionType = iota WorldConstructionType_Bridge WorldConstructionType_Road WorldConstructionType_Tunnel ) func parseWorldConstructionType(s string) WorldConstructionType { switch s { case "bridge": return WorldConstructionType_Bridge case "road": return WorldConstructionType_Road case "tunnel": return WorldConstructionType_Tunnel } return WorldConstructionType_Unknown } func (s WorldConstructionType) String() string { switch s { case WorldConstructionType_Bridge: return "bridge" case WorldConstructionType_Road: return "road" case WorldConstructionType_Tunnel: return "tunnel" } return "unknown" } func (s WorldConstructionType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type WorldConstruction struct { Coords string `json:"coords" legend:"plus"` // coords Id_ int `json:"id" legend:"plus"` // id Name_ string `json:"name" legend:"plus"` // name Type WorldConstructionType `json:"type" legend:"plus"` // type } func (x *WorldConstruction) Id() int { return x.Id_ } func (x *WorldConstruction) Name() string { return x.Name_ } func (x *WorldConstruction) RelatedToEntity(id int) bool { return false } func (x *WorldConstruction) RelatedToHf(id int) bool { return false } func (x *WorldConstruction) CheckFields() { } type WrittenContentForm int const ( WrittenContentForm_Unknown WrittenContentForm = iota WrittenContentForm_AlternateHistory WrittenContentForm_Atlas WrittenContentForm_Autobiography WrittenContentForm_Biography WrittenContentForm_Choreography WrittenContentForm_Chronicle WrittenContentForm_ComparativeBiography WrittenContentForm_CulturalComparison WrittenContentForm_CulturalHistory WrittenContentForm_Dialog WrittenContentForm_Dictionary WrittenContentForm_Encyclopedia WrittenContentForm_Essay WrittenContentForm_Genealogy WrittenContentForm_Guide WrittenContentForm_Letter WrittenContentForm_Manual WrittenContentForm_MusicalComposition WrittenContentForm_Novel WrittenContentForm_Play WrittenContentForm_Poem WrittenContentForm_ShortStory WrittenContentForm_StarCatalogue WrittenContentForm_StarChart WrittenContentForm_TreatiseOnTechnologicalEvolution ) func parseWrittenContentForm(s string) WrittenContentForm { switch s { case "alternate history": return WrittenContentForm_AlternateHistory case "atlas": return WrittenContentForm_Atlas case "autobiography": return WrittenContentForm_Autobiography case "biography": return WrittenContentForm_Biography case "choreography": return WrittenContentForm_Choreography case "chronicle": return WrittenContentForm_Chronicle case "comparative biography": return WrittenContentForm_ComparativeBiography case "cultural comparison": return WrittenContentForm_CulturalComparison case "cultural history": return WrittenContentForm_CulturalHistory case "dialog": return WrittenContentForm_Dialog case "dictionary": return WrittenContentForm_Dictionary case "encyclopedia": return WrittenContentForm_Encyclopedia case "essay": return WrittenContentForm_Essay case "genealogy": return WrittenContentForm_Genealogy case "guide": return WrittenContentForm_Guide case "letter": return WrittenContentForm_Letter case "manual": return WrittenContentForm_Manual case "musical composition": return WrittenContentForm_MusicalComposition case "novel": return WrittenContentForm_Novel case "play": return WrittenContentForm_Play case "poem": return WrittenContentForm_Poem case "short story": return WrittenContentForm_ShortStory case "star catalogue": return WrittenContentForm_StarCatalogue case "star chart": return WrittenContentForm_StarChart case "treatise on technological evolution": return WrittenContentForm_TreatiseOnTechnologicalEvolution } return WrittenContentForm_Unknown } func (s WrittenContentForm) String() string { switch s { case WrittenContentForm_AlternateHistory: return "alternate history" case WrittenContentForm_Atlas: return "atlas" case WrittenContentForm_Autobiography: return "autobiography" case WrittenContentForm_Biography: return "biography" case WrittenContentForm_Choreography: return "choreography" case WrittenContentForm_Chronicle: return "chronicle" case WrittenContentForm_ComparativeBiography: return "comparative biography" case WrittenContentForm_CulturalComparison: return "cultural comparison" case WrittenContentForm_CulturalHistory: return "cultural history" case WrittenContentForm_Dialog: return "dialog" case WrittenContentForm_Dictionary: return "dictionary" case WrittenContentForm_Encyclopedia: return "encyclopedia" case WrittenContentForm_Essay: return "essay" case WrittenContentForm_Genealogy: return "genealogy" case WrittenContentForm_Guide: return "guide" case WrittenContentForm_Letter: return "letter" case WrittenContentForm_Manual: return "manual" case WrittenContentForm_MusicalComposition: return "musical composition" case WrittenContentForm_Novel: return "novel" case WrittenContentForm_Play: return "play" case WrittenContentForm_Poem: return "poem" case WrittenContentForm_ShortStory: return "short story" case WrittenContentForm_StarCatalogue: return "star catalogue" case WrittenContentForm_StarChart: return "star chart" case WrittenContentForm_TreatiseOnTechnologicalEvolution: return "treatise on technological evolution" } return "unknown" } func (s WrittenContentForm) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type WrittenContentType int const ( WrittenContentType_Unknown WrittenContentType = iota WrittenContentType_AlternateHistory WrittenContentType_Atlas WrittenContentType_Autobiography WrittenContentType_Biography WrittenContentType_Choreography WrittenContentType_Chronicle WrittenContentType_ComparativeBiography WrittenContentType_CulturalComparison WrittenContentType_CulturalHistory WrittenContentType_Dialog WrittenContentType_Dictionary WrittenContentType_Encyclopedia WrittenContentType_Essay WrittenContentType_Genealogy WrittenContentType_Guide WrittenContentType_Letter WrittenContentType_Manual WrittenContentType_MusicalComposition WrittenContentType_Novel WrittenContentType_Play WrittenContentType_Poem WrittenContentType_ShortStory WrittenContentType_StarCatalogue WrittenContentType_StarChart WrittenContentType_TreatiseOnTechnologicalEvolution ) func parseWrittenContentType(s string) WrittenContentType { switch s { case "AlternateHistory": return WrittenContentType_AlternateHistory case "Atlas": return WrittenContentType_Atlas case "Autobiography": return WrittenContentType_Autobiography case "Biography": return WrittenContentType_Biography case "Choreography": return WrittenContentType_Choreography case "Chronicle": return WrittenContentType_Chronicle case "ComparativeBiography": return WrittenContentType_ComparativeBiography case "CulturalComparison": return WrittenContentType_CulturalComparison case "CulturalHistory": return WrittenContentType_CulturalHistory case "Dialog": return WrittenContentType_Dialog case "Dictionary": return WrittenContentType_Dictionary case "Encyclopedia": return WrittenContentType_Encyclopedia case "Essay": return WrittenContentType_Essay case "Genealogy": return WrittenContentType_Genealogy case "Guide": return WrittenContentType_Guide case "Letter": return WrittenContentType_Letter case "Manual": return WrittenContentType_Manual case "MusicalComposition": return WrittenContentType_MusicalComposition case "Novel": return WrittenContentType_Novel case "Play": return WrittenContentType_Play case "Poem": return WrittenContentType_Poem case "ShortStory": return WrittenContentType_ShortStory case "StarCatalogue": return WrittenContentType_StarCatalogue case "StarChart": return WrittenContentType_StarChart case "TreatiseOnTechnologicalEvolution": return WrittenContentType_TreatiseOnTechnologicalEvolution } return WrittenContentType_Unknown } func (s WrittenContentType) String() string { switch s { case WrittenContentType_AlternateHistory: return "alternate history" case WrittenContentType_Atlas: return "atlas" case WrittenContentType_Autobiography: return "autobiography" case WrittenContentType_Biography: return "biography" case WrittenContentType_Choreography: return "choreography" case WrittenContentType_Chronicle: return "chronicle" case WrittenContentType_ComparativeBiography: return "comparative biography" case WrittenContentType_CulturalComparison: return "cultural comparison" case WrittenContentType_CulturalHistory: return "cultural history" case WrittenContentType_Dialog: return "dialog" case WrittenContentType_Dictionary: return "dictionary" case WrittenContentType_Encyclopedia: return "encyclopedia" case WrittenContentType_Essay: return "essay" case WrittenContentType_Genealogy: return "genealogy" case WrittenContentType_Guide: return "guide" case WrittenContentType_Letter: return "letter" case WrittenContentType_Manual: return "manual" case WrittenContentType_MusicalComposition: return "musical composition" case WrittenContentType_Novel: return "novel" case WrittenContentType_Play: return "play" case WrittenContentType_Poem: return "poem" case WrittenContentType_ShortStory: return "short story" case WrittenContentType_StarCatalogue: return "star catalogue" case WrittenContentType_StarChart: return "star chart" case WrittenContentType_TreatiseOnTechnologicalEvolution: return "treatise on technological evolution" } return "unknown" } func (s WrittenContentType) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } type WrittenContent struct { AuthorHfid int `json:"authorHfid" legend:"base"` // author_hfid AuthorRoll int `json:"authorRoll" legend:"base"` // author_roll Form WrittenContentForm `json:"form" legend:"base"` // form FormId int `json:"formId" legend:"base"` // form_id Id_ int `json:"id" legend:"both"` // id PageEnd int `json:"pageEnd" legend:"plus"` // page_end PageStart int `json:"pageStart" legend:"plus"` // page_start Reference []*Reference `json:"reference" legend:"plus"` // reference Style []string `json:"style" legend:"both"` // style Title string `json:"title" legend:"both"` // title Type WrittenContentType `json:"type" legend:"plus"` // type } func (x *WrittenContent) Id() int { return x.Id_ } func (x *WrittenContent) RelatedToEntity(id int) bool { return false } func (x *WrittenContent) RelatedToHf(id int) bool { return x.AuthorHfid == id } func (x *WrittenContent) CheckFields() { if x.PageEnd != x.AuthorHfid && x.PageEnd != 0 && x.AuthorHfid != 0 { sameFields["WrittenContent"]["PageEnd"]["AuthorHfid"] = false } if x.PageEnd != x.AuthorRoll && x.PageEnd != 0 && x.AuthorRoll != 0 { sameFields["WrittenContent"]["PageEnd"]["AuthorRoll"] = false } if x.PageEnd != x.FormId && x.PageEnd != 0 && x.FormId != 0 { sameFields["WrittenContent"]["PageEnd"]["FormId"] = false } if x.PageStart != x.AuthorHfid && x.PageStart != 0 && x.AuthorHfid != 0 { sameFields["WrittenContent"]["PageStart"]["AuthorHfid"] = false } if x.PageStart != x.AuthorRoll && x.PageStart != 0 && x.AuthorRoll != 0 { sameFields["WrittenContent"]["PageStart"]["AuthorRoll"] = false } if x.PageStart != x.FormId && x.PageStart != 0 && x.FormId != 0 { sameFields["WrittenContent"]["PageStart"]["FormId"] = false } } // Parser func n(d []byte) int { v, _ := strconv.Atoi(string(d)) return v } func parseArtifact(d *xml.Decoder, start *xml.StartElement) (*Artifact, error) { var ( obj = &Artifact{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "abs_tile_x": data = nil case "abs_tile_y": data = nil case "abs_tile_z": data = nil case "holder_hfid": data = nil case "id": data = nil case "item": v, _ := parseItem(d, &t) obj.Item = v case "name": data = nil case "site_id": data = nil case "structure_local_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "abs_tile_x": obj.AbsTileX = n(data) case "abs_tile_y": obj.AbsTileY = n(data) case "abs_tile_z": obj.AbsTileZ = n(data) case "holder_hfid": obj.HolderHfid = n(data) case "id": obj.Id_ = n(data) case "item": case "name": obj.Name_ = string(data) case "site_id": obj.SiteId = n(data) case "structure_local_id": obj.StructureLocalId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseArtifactPlus(d *xml.Decoder, start *xml.StartElement, obj *Artifact) (*Artifact, error) { var ( data []byte ) if obj == nil { obj = &Artifact{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "item_description": data = nil case "item_subtype": data = nil case "item_type": data = nil case "mat": data = nil case "page_count": data = nil case "writing": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "item_description": obj.ItemDescription = string(data) case "item_subtype": obj.ItemSubtype = string(data) case "item_type": obj.ItemType = string(data) case "mat": obj.Mat = string(data) case "page_count": obj.PageCount = n(data) case "writing": obj.Writing = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseCreature(d *xml.Decoder, start *xml.StartElement) (*Creature, error) { var ( obj = &Creature{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseCreaturePlus(d *xml.Decoder, start *xml.StartElement, obj *Creature) (*Creature, error) { var ( data []byte ) if obj == nil { obj = &Creature{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "all_castes_alive": data = nil case "artificial_hiveable": data = nil case "biome_desert_badland": data = nil case "biome_desert_rock": data = nil case "biome_desert_sand": data = nil case "biome_forest_taiga": data = nil case "biome_forest_temperate_broadleaf": data = nil case "biome_forest_temperate_conifer": data = nil case "biome_forest_tropical_conifer": data = nil case "biome_forest_tropical_dry_broadleaf": data = nil case "biome_forest_tropical_moist_broadleaf": data = nil case "biome_glacier": data = nil case "biome_grassland_temperate": data = nil case "biome_grassland_tropical": data = nil case "biome_lake_temperate_brackishwater": data = nil case "biome_lake_temperate_freshwater": data = nil case "biome_lake_temperate_saltwater": data = nil case "biome_lake_tropical_brackishwater": data = nil case "biome_lake_tropical_freshwater": data = nil case "biome_lake_tropical_saltwater": data = nil case "biome_marsh_temperate_freshwater": data = nil case "biome_marsh_temperate_saltwater": data = nil case "biome_marsh_tropical_freshwater": data = nil case "biome_marsh_tropical_saltwater": data = nil case "biome_mountain": data = nil case "biome_ocean_arctic": data = nil case "biome_ocean_temperate": data = nil case "biome_ocean_tropical": data = nil case "biome_pool_temperate_brackishwater": data = nil case "biome_pool_temperate_freshwater": data = nil case "biome_pool_temperate_saltwater": data = nil case "biome_pool_tropical_brackishwater": data = nil case "biome_pool_tropical_freshwater": data = nil case "biome_pool_tropical_saltwater": data = nil case "biome_river_temperate_brackishwater": data = nil case "biome_river_temperate_freshwater": data = nil case "biome_river_temperate_saltwater": data = nil case "biome_river_tropical_brackishwater": data = nil case "biome_river_tropical_freshwater": data = nil case "biome_river_tropical_saltwater": data = nil case "biome_savanna_temperate": data = nil case "biome_savanna_tropical": data = nil case "biome_shrubland_temperate": data = nil case "biome_shrubland_tropical": data = nil case "biome_subterranean_chasm": data = nil case "biome_subterranean_lava": data = nil case "biome_subterranean_water": data = nil case "biome_swamp_mangrove": data = nil case "biome_swamp_temperate_freshwater": data = nil case "biome_swamp_temperate_saltwater": data = nil case "biome_swamp_tropical_freshwater": data = nil case "biome_swamp_tropical_saltwater": data = nil case "biome_tundra": data = nil case "creature_id": data = nil case "does_not_exist": data = nil case "equipment": data = nil case "equipment_wagon": data = nil case "evil": data = nil case "fanciful": data = nil case "generated": data = nil case "good": data = nil case "has_any_benign": data = nil case "has_any_can_swim": data = nil case "has_any_cannot_breathe_air": data = nil case "has_any_cannot_breathe_water": data = nil case "has_any_carnivore": data = nil case "has_any_common_domestic": data = nil case "has_any_curious_beast": data = nil case "has_any_demon": data = nil case "has_any_feature_beast": data = nil case "has_any_flier": data = nil case "has_any_fly_race_gait": data = nil case "has_any_grasp": data = nil case "has_any_grazer": data = nil case "has_any_has_blood": data = nil case "has_any_immobile": data = nil case "has_any_intelligent_learns": data = nil case "has_any_intelligent_speaks": data = nil case "has_any_large_predator": data = nil case "has_any_local_pops_controllable": data = nil case "has_any_local_pops_produce_heroes": data = nil case "has_any_megabeast": data = nil case "has_any_mischievous": data = nil case "has_any_natural_animal": data = nil case "has_any_night_creature": data = nil case "has_any_night_creature_bogeyman": data = nil case "has_any_night_creature_hunter": data = nil case "has_any_night_creature_nightmare": data = nil case "has_any_not_fireimmune": data = nil case "has_any_not_living": data = nil case "has_any_outsider_controllable": data = nil case "has_any_race_gait": data = nil case "has_any_semimegabeast": data = nil case "has_any_slow_learner": data = nil case "has_any_supernatural": data = nil case "has_any_titan": data = nil case "has_any_unique_demon": data = nil case "has_any_utterances": data = nil case "has_any_vermin_hateable": data = nil case "has_any_vermin_micro": data = nil case "has_female": data = nil case "has_male": data = nil case "large_roaming": data = nil case "loose_clusters": data = nil case "mates_to_breed": data = nil case "mundane": data = nil case "name_plural": data = nil case "name_singular": data = nil case "occurs_as_entity_race": data = nil case "savage": data = nil case "small_race": data = nil case "two_genders": data = nil case "ubiquitous": data = nil case "vermin_eater": data = nil case "vermin_fish": data = nil case "vermin_grounder": data = nil case "vermin_rotter": data = nil case "vermin_soil": data = nil case "vermin_soil_colony": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "all_castes_alive": obj.AllCastesAlive = true case "artificial_hiveable": obj.ArtificialHiveable = true case "biome_desert_badland": obj.BiomeDesertBadland = true case "biome_desert_rock": obj.BiomeDesertRock = true case "biome_desert_sand": obj.BiomeDesertSand = true case "biome_forest_taiga": obj.BiomeForestTaiga = true case "biome_forest_temperate_broadleaf": obj.BiomeForestTemperateBroadleaf = true case "biome_forest_temperate_conifer": obj.BiomeForestTemperateConifer = true case "biome_forest_tropical_conifer": obj.BiomeForestTropicalConifer = true case "biome_forest_tropical_dry_broadleaf": obj.BiomeForestTropicalDryBroadleaf = true case "biome_forest_tropical_moist_broadleaf": obj.BiomeForestTropicalMoistBroadleaf = true case "biome_glacier": obj.BiomeGlacier = true case "biome_grassland_temperate": obj.BiomeGrasslandTemperate = true case "biome_grassland_tropical": obj.BiomeGrasslandTropical = true case "biome_lake_temperate_brackishwater": obj.BiomeLakeTemperateBrackishwater = true case "biome_lake_temperate_freshwater": obj.BiomeLakeTemperateFreshwater = true case "biome_lake_temperate_saltwater": obj.BiomeLakeTemperateSaltwater = true case "biome_lake_tropical_brackishwater": obj.BiomeLakeTropicalBrackishwater = true case "biome_lake_tropical_freshwater": obj.BiomeLakeTropicalFreshwater = true case "biome_lake_tropical_saltwater": obj.BiomeLakeTropicalSaltwater = true case "biome_marsh_temperate_freshwater": obj.BiomeMarshTemperateFreshwater = true case "biome_marsh_temperate_saltwater": obj.BiomeMarshTemperateSaltwater = true case "biome_marsh_tropical_freshwater": obj.BiomeMarshTropicalFreshwater = true case "biome_marsh_tropical_saltwater": obj.BiomeMarshTropicalSaltwater = true case "biome_mountain": obj.BiomeMountain = true case "biome_ocean_arctic": obj.BiomeOceanArctic = true case "biome_ocean_temperate": obj.BiomeOceanTemperate = true case "biome_ocean_tropical": obj.BiomeOceanTropical = true case "biome_pool_temperate_brackishwater": obj.BiomePoolTemperateBrackishwater = true case "biome_pool_temperate_freshwater": obj.BiomePoolTemperateFreshwater = true case "biome_pool_temperate_saltwater": obj.BiomePoolTemperateSaltwater = true case "biome_pool_tropical_brackishwater": obj.BiomePoolTropicalBrackishwater = true case "biome_pool_tropical_freshwater": obj.BiomePoolTropicalFreshwater = true case "biome_pool_tropical_saltwater": obj.BiomePoolTropicalSaltwater = true case "biome_river_temperate_brackishwater": obj.BiomeRiverTemperateBrackishwater = true case "biome_river_temperate_freshwater": obj.BiomeRiverTemperateFreshwater = true case "biome_river_temperate_saltwater": obj.BiomeRiverTemperateSaltwater = true case "biome_river_tropical_brackishwater": obj.BiomeRiverTropicalBrackishwater = true case "biome_river_tropical_freshwater": obj.BiomeRiverTropicalFreshwater = true case "biome_river_tropical_saltwater": obj.BiomeRiverTropicalSaltwater = true case "biome_savanna_temperate": obj.BiomeSavannaTemperate = true case "biome_savanna_tropical": obj.BiomeSavannaTropical = true case "biome_shrubland_temperate": obj.BiomeShrublandTemperate = true case "biome_shrubland_tropical": obj.BiomeShrublandTropical = true case "biome_subterranean_chasm": obj.BiomeSubterraneanChasm = true case "biome_subterranean_lava": obj.BiomeSubterraneanLava = true case "biome_subterranean_water": obj.BiomeSubterraneanWater = true case "biome_swamp_mangrove": obj.BiomeSwampMangrove = true case "biome_swamp_temperate_freshwater": obj.BiomeSwampTemperateFreshwater = true case "biome_swamp_temperate_saltwater": obj.BiomeSwampTemperateSaltwater = true case "biome_swamp_tropical_freshwater": obj.BiomeSwampTropicalFreshwater = true case "biome_swamp_tropical_saltwater": obj.BiomeSwampTropicalSaltwater = true case "biome_tundra": obj.BiomeTundra = true case "creature_id": obj.CreatureId = string(data) case "does_not_exist": obj.DoesNotExist = true case "equipment": obj.Equipment = true case "equipment_wagon": obj.EquipmentWagon = true case "evil": obj.Evil = true case "fanciful": obj.Fanciful = true case "generated": obj.Generated = true case "good": obj.Good = true case "has_any_benign": obj.HasAnyBenign = true case "has_any_can_swim": obj.HasAnyCanSwim = true case "has_any_cannot_breathe_air": obj.HasAnyCannotBreatheAir = true case "has_any_cannot_breathe_water": obj.HasAnyCannotBreatheWater = true case "has_any_carnivore": obj.HasAnyCarnivore = true case "has_any_common_domestic": obj.HasAnyCommonDomestic = true case "has_any_curious_beast": obj.HasAnyCuriousBeast = true case "has_any_demon": obj.HasAnyDemon = true case "has_any_feature_beast": obj.HasAnyFeatureBeast = true case "has_any_flier": obj.HasAnyFlier = true case "has_any_fly_race_gait": obj.HasAnyFlyRaceGait = true case "has_any_grasp": obj.HasAnyGrasp = true case "has_any_grazer": obj.HasAnyGrazer = true case "has_any_has_blood": obj.HasAnyHasBlood = true case "has_any_immobile": obj.HasAnyImmobile = true case "has_any_intelligent_learns": obj.HasAnyIntelligentLearns = true case "has_any_intelligent_speaks": obj.HasAnyIntelligentSpeaks = true case "has_any_large_predator": obj.HasAnyLargePredator = true case "has_any_local_pops_controllable": obj.HasAnyLocalPopsControllable = true case "has_any_local_pops_produce_heroes": obj.HasAnyLocalPopsProduceHeroes = true case "has_any_megabeast": obj.HasAnyMegabeast = true case "has_any_mischievous": obj.HasAnyMischievous = true case "has_any_natural_animal": obj.HasAnyNaturalAnimal = true case "has_any_night_creature": obj.HasAnyNightCreature = true case "has_any_night_creature_bogeyman": obj.HasAnyNightCreatureBogeyman = true case "has_any_night_creature_hunter": obj.HasAnyNightCreatureHunter = true case "has_any_night_creature_nightmare": obj.HasAnyNightCreatureNightmare = true case "has_any_not_fireimmune": obj.HasAnyNotFireimmune = true case "has_any_not_living": obj.HasAnyNotLiving = true case "has_any_outsider_controllable": obj.HasAnyOutsiderControllable = true case "has_any_race_gait": obj.HasAnyRaceGait = true case "has_any_semimegabeast": obj.HasAnySemimegabeast = true case "has_any_slow_learner": obj.HasAnySlowLearner = true case "has_any_supernatural": obj.HasAnySupernatural = true case "has_any_titan": obj.HasAnyTitan = true case "has_any_unique_demon": obj.HasAnyUniqueDemon = true case "has_any_utterances": obj.HasAnyUtterances = true case "has_any_vermin_hateable": obj.HasAnyVerminHateable = true case "has_any_vermin_micro": obj.HasAnyVerminMicro = true case "has_female": obj.HasFemale = true case "has_male": obj.HasMale = true case "large_roaming": obj.LargeRoaming = true case "loose_clusters": obj.LooseClusters = true case "mates_to_breed": obj.MatesToBreed = true case "mundane": obj.Mundane = true case "name_plural": obj.NamePlural = string(data) case "name_singular": obj.NameSingular = string(data) case "occurs_as_entity_race": obj.OccursAsEntityRace = true case "savage": obj.Savage = true case "small_race": obj.SmallRace = true case "two_genders": obj.TwoGenders = true case "ubiquitous": obj.Ubiquitous = true case "vermin_eater": obj.VerminEater = true case "vermin_fish": obj.VerminFish = true case "vermin_grounder": obj.VerminGrounder = true case "vermin_rotter": obj.VerminRotter = true case "vermin_soil": obj.VerminSoil = true case "vermin_soil_colony": obj.VerminSoilColony = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseDanceForm(d *xml.Decoder, start *xml.StartElement) (*DanceForm, error) { var ( obj = &DanceForm{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "description": data = nil case "id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "description": obj.Description = string(data) case "id": obj.Id_ = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseDanceFormPlus(d *xml.Decoder, start *xml.StartElement, obj *DanceForm) (*DanceForm, error) { var ( data []byte ) if obj == nil { obj = &DanceForm{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseDfWorld(d *xml.Decoder, start *xml.StartElement) (*DfWorld, error) { var ( obj = &DfWorld{} data []byte ) obj.Artifacts = make(map[int]*Artifact) obj.DanceForms = make(map[int]*DanceForm) obj.Entities = make(map[int]*Entity) obj.EntityPopulations = make(map[int]*EntityPopulation) obj.HistoricalEventCollections = make(map[int]*HistoricalEventCollection) obj.HistoricalEvents = make(map[int]*HistoricalEvent) obj.HistoricalFigures = make(map[int]*HistoricalFigure) obj.Identities = make(map[int]*Identity) obj.Landmasses = make(map[int]*Landmass) obj.MountainPeaks = make(map[int]*MountainPeak) obj.MusicalForms = make(map[int]*MusicalForm) obj.PoeticForms = make(map[int]*PoeticForm) obj.Regions = make(map[int]*Region) obj.Sites = make(map[int]*Site) obj.UndergroundRegions = make(map[int]*UndergroundRegion) obj.WorldConstructions = make(map[int]*WorldConstruction) obj.WrittenContents = make(map[int]*WrittenContent) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifacts": parseMap(d, &obj.Artifacts, parseArtifact) case "dance_forms": parseMap(d, &obj.DanceForms, parseDanceForm) case "entities": parseMap(d, &obj.Entities, parseEntity) case "entity_populations": parseMap(d, &obj.EntityPopulations, parseEntityPopulation) case "historical_eras": parseArray(d, &obj.HistoricalEras, parseHistoricalEra) case "historical_event_collections": parseMap(d, &obj.HistoricalEventCollections, parseHistoricalEventCollection) case "historical_events": parseMap(d, &obj.HistoricalEvents, parseHistoricalEvent) case "historical_figures": parseMap(d, &obj.HistoricalFigures, parseHistoricalFigure) case "musical_forms": parseMap(d, &obj.MusicalForms, parseMusicalForm) case "poetic_forms": parseMap(d, &obj.PoeticForms, parsePoeticForm) case "regions": parseMap(d, &obj.Regions, parseRegion) case "sites": parseMap(d, &obj.Sites, parseSite) case "underground_regions": parseMap(d, &obj.UndergroundRegions, parseUndergroundRegion) case "world_constructions": parseMap(d, &obj.WorldConstructions, parseWorldConstruction) case "written_contents": parseMap(d, &obj.WrittenContents, parseWrittenContent) default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifacts": case "dance_forms": case "entities": case "entity_populations": case "historical_eras": case "historical_event_collections": case "historical_events": case "historical_figures": case "musical_forms": case "poetic_forms": case "regions": case "sites": case "underground_regions": case "world_constructions": case "written_contents": default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseDfWorldPlus(d *xml.Decoder, start *xml.StartElement, obj *DfWorld) (*DfWorld, error) { var ( data []byte ) if obj == nil { obj = &DfWorld{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "altname": data = nil case "artifacts": parseMapPlus(d, &obj.Artifacts, parseArtifactPlus) case "creature_raw": parseArray(d, &obj.CreatureRaw, parseCreature) case "dance_forms": parseMapPlus(d, &obj.DanceForms, parseDanceFormPlus) case "entities": parseMapPlus(d, &obj.Entities, parseEntityPlus) case "entity_populations": parseMapPlus(d, &obj.EntityPopulations, parseEntityPopulationPlus) case "historical_eras": parseArray(d, &obj.HistoricalEras, parseHistoricalEra) case "historical_event_collections": parseMapPlus(d, &obj.HistoricalEventCollections, parseHistoricalEventCollectionPlus) case "historical_event_relationship_supplements": parseArray(d, &obj.HistoricalEventRelationshipSupplements, parseHistoricalEventRelationshipSupplement) case "historical_event_relationships": parseArray(d, &obj.HistoricalEventRelationships, parseHistoricalEventRelationship) case "historical_events": parseMapPlus(d, &obj.HistoricalEvents, parseHistoricalEventPlus) case "historical_figures": parseMapPlus(d, &obj.HistoricalFigures, parseHistoricalFigurePlus) case "identities": parseMapPlus(d, &obj.Identities, parseIdentityPlus) case "landmasses": parseMapPlus(d, &obj.Landmasses, parseLandmassPlus) case "mountain_peaks": parseMapPlus(d, &obj.MountainPeaks, parseMountainPeakPlus) case "musical_forms": parseMapPlus(d, &obj.MusicalForms, parseMusicalFormPlus) case "name": data = nil case "poetic_forms": parseMapPlus(d, &obj.PoeticForms, parsePoeticFormPlus) case "regions": parseMapPlus(d, &obj.Regions, parseRegionPlus) case "rivers": parseArray(d, &obj.Rivers, parseRiver) case "sites": parseMapPlus(d, &obj.Sites, parseSitePlus) case "underground_regions": parseMapPlus(d, &obj.UndergroundRegions, parseUndergroundRegionPlus) case "world_constructions": parseMapPlus(d, &obj.WorldConstructions, parseWorldConstructionPlus) case "written_contents": parseMapPlus(d, &obj.WrittenContents, parseWrittenContentPlus) default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "altname": obj.Altname = string(data) case "artifacts": case "creature_raw": case "dance_forms": case "entities": case "entity_populations": case "historical_eras": case "historical_event_collections": case "historical_event_relationship_supplements": case "historical_event_relationships": case "historical_events": case "historical_figures": case "identities": case "landmasses": case "mountain_peaks": case "musical_forms": case "name": obj.Name_ = string(data) case "poetic_forms": case "regions": case "rivers": case "sites": case "underground_regions": case "world_constructions": case "written_contents": default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntity(d *xml.Decoder, start *xml.StartElement) (*Entity, error) { var ( obj = &Entity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "honor": v, _ := parseHonor(d, &t) obj.Honor = append(obj.Honor, v) case "id": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "honor": case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPlus(d *xml.Decoder, start *xml.StartElement, obj *Entity) (*Entity, error) { var ( data []byte ) if obj == nil { obj = &Entity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "child": data = nil case "claims": data = nil case "entity_link": v, _ := parseEntityEntityLinkPlus(d, &t, &EntityEntityLink{}) obj.EntityLink = append(obj.EntityLink, v) case "entity_position": v, _ := parseEntityPositionPlus(d, &t, &EntityPosition{}) obj.EntityPosition = append(obj.EntityPosition, v) case "entity_position_assignment": v, _ := parseEntityPositionAssignmentPlus(d, &t, &EntityPositionAssignment{}) obj.EntityPositionAssignment = append(obj.EntityPositionAssignment, v) case "histfig_id": data = nil case "id": data = nil case "occasion": v, _ := parseOccasionPlus(d, &t, &Occasion{}) obj.Occasion = append(obj.Occasion, v) case "profession": data = nil case "race": data = nil case "type": data = nil case "weapon": data = nil case "worship_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "child": obj.Child = append(obj.Child, n(data)) case "claims": obj.Claims = string(data) case "entity_link": case "entity_position": case "entity_position_assignment": case "histfig_id": obj.HistfigId = append(obj.HistfigId, n(data)) case "id": obj.Id_ = n(data) case "occasion": case "profession": obj.Profession = parseEntityProfession(string(data)) case "race": obj.Race = string(data) case "type": obj.Type = parseEntityType(string(data)) case "weapon": obj.Weapon = append(obj.Weapon, parseEntityWeapon(string(data))) case "worship_id": obj.WorshipId = append(obj.WorshipId, n(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityEntityLink(d *xml.Decoder, start *xml.StartElement) (*EntityEntityLink, error) { var ( obj = &EntityEntityLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityEntityLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityEntityLink) (*EntityEntityLink, error) { var ( data []byte ) if obj == nil { obj = &EntityEntityLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "strength": data = nil case "target": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "strength": obj.Strength = n(data) case "target": obj.Target = n(data) case "type": obj.Type = parseEntityEntityLinkType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityFormerPositionLink(d *xml.Decoder, start *xml.StartElement) (*EntityFormerPositionLink, error) { var ( obj = &EntityFormerPositionLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "end_year": data = nil case "entity_id": data = nil case "position_profile_id": data = nil case "start_year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "end_year": obj.EndYear = n(data) case "entity_id": obj.EntityId = n(data) case "position_profile_id": obj.PositionProfileId = n(data) case "start_year": obj.StartYear = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityFormerPositionLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityFormerPositionLink) (*EntityFormerPositionLink, error) { var ( data []byte ) if obj == nil { obj = &EntityFormerPositionLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityFormerSquadLink(d *xml.Decoder, start *xml.StartElement) (*EntityFormerSquadLink, error) { var ( obj = &EntityFormerSquadLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "end_year": data = nil case "entity_id": data = nil case "squad_id": data = nil case "start_year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "end_year": obj.EndYear = n(data) case "entity_id": obj.EntityId = n(data) case "squad_id": obj.SquadId = n(data) case "start_year": obj.StartYear = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityFormerSquadLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityFormerSquadLink) (*EntityFormerSquadLink, error) { var ( data []byte ) if obj == nil { obj = &EntityFormerSquadLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPopulation(d *xml.Decoder, start *xml.StartElement) (*EntityPopulation, error) { var ( obj = &EntityPopulation{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPopulationPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityPopulation) (*EntityPopulation, error) { var ( data []byte ) if obj == nil { obj = &EntityPopulation{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "id": data = nil case "race": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "id": obj.Id_ = n(data) case "race": obj.Race = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPosition(d *xml.Decoder, start *xml.StartElement) (*EntityPosition, error) { var ( obj = &EntityPosition{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPositionPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityPosition) (*EntityPosition, error) { var ( data []byte ) if obj == nil { obj = &EntityPosition{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "name": data = nil case "name_female": data = nil case "name_male": data = nil case "spouse": data = nil case "spouse_female": data = nil case "spouse_male": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "name_female": obj.NameFemale = string(data) case "name_male": obj.NameMale = string(data) case "spouse": obj.Spouse = string(data) case "spouse_female": obj.SpouseFemale = string(data) case "spouse_male": obj.SpouseMale = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPositionAssignment(d *xml.Decoder, start *xml.StartElement) (*EntityPositionAssignment, error) { var ( obj = &EntityPositionAssignment{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPositionAssignmentPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityPositionAssignment) (*EntityPositionAssignment, error) { var ( data []byte ) if obj == nil { obj = &EntityPositionAssignment{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "histfig": data = nil case "id": data = nil case "position_id": data = nil case "squad_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "histfig": obj.Histfig = n(data) case "id": obj.Id_ = n(data) case "position_id": obj.PositionId = n(data) case "squad_id": obj.SquadId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPositionLink(d *xml.Decoder, start *xml.StartElement) (*EntityPositionLink, error) { var ( obj = &EntityPositionLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "position_profile_id": data = nil case "start_year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "position_profile_id": obj.PositionProfileId = n(data) case "start_year": obj.StartYear = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityPositionLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityPositionLink) (*EntityPositionLink, error) { var ( data []byte ) if obj == nil { obj = &EntityPositionLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityReputation(d *xml.Decoder, start *xml.StartElement) (*EntityReputation, error) { var ( obj = &EntityReputation{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "first_ageless_season_count": data = nil case "first_ageless_year": data = nil case "rep_bard": data = nil case "rep_enemy_fighter": data = nil case "rep_hero": data = nil case "rep_hunter": data = nil case "rep_killer": data = nil case "rep_knowledge_preserver": data = nil case "rep_poet": data = nil case "rep_protector_of_weak": data = nil case "rep_storyteller": data = nil case "rep_thief": data = nil case "rep_treasure_hunter": data = nil case "unsolved_murders": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "first_ageless_season_count": obj.FirstAgelessSeasonCount = n(data) case "first_ageless_year": obj.FirstAgelessYear = n(data) case "rep_bard": obj.RepBard = n(data) case "rep_enemy_fighter": obj.RepEnemyFighter = n(data) case "rep_hero": obj.RepHero = n(data) case "rep_hunter": obj.RepHunter = n(data) case "rep_killer": obj.RepKiller = n(data) case "rep_knowledge_preserver": obj.RepKnowledgePreserver = n(data) case "rep_poet": obj.RepPoet = n(data) case "rep_protector_of_weak": obj.RepProtectorOfWeak = n(data) case "rep_storyteller": obj.RepStoryteller = n(data) case "rep_thief": obj.RepThief = n(data) case "rep_treasure_hunter": obj.RepTreasureHunter = n(data) case "unsolved_murders": obj.UnsolvedMurders = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntityReputationPlus(d *xml.Decoder, start *xml.StartElement, obj *EntityReputation) (*EntityReputation, error) { var ( data []byte ) if obj == nil { obj = &EntityReputation{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntitySquadLink(d *xml.Decoder, start *xml.StartElement) (*EntitySquadLink, error) { var ( obj = &EntitySquadLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "squad_id": data = nil case "squad_position": data = nil case "start_year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "squad_id": obj.SquadId = n(data) case "squad_position": obj.SquadPosition = n(data) case "start_year": obj.StartYear = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseEntitySquadLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *EntitySquadLink) (*EntitySquadLink, error) { var ( data []byte ) if obj == nil { obj = &EntitySquadLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseFeature(d *xml.Decoder, start *xml.StartElement) (*Feature, error) { var ( obj = &Feature{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseFeaturePlus(d *xml.Decoder, start *xml.StartElement, obj *Feature) (*Feature, error) { var ( data []byte ) if obj == nil { obj = &Feature{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "reference": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "reference": obj.Reference = n(data) case "type": obj.Type = parseFeatureType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHfLink(d *xml.Decoder, start *xml.StartElement) (*HfLink, error) { var ( obj = &HfLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hfid": data = nil case "link_strength": data = nil case "link_type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hfid": obj.Hfid = n(data) case "link_strength": obj.LinkStrength = n(data) case "link_type": obj.LinkType = parseHfLinkLinkType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHfLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HfLink) (*HfLink, error) { var ( data []byte ) if obj == nil { obj = &HfLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHfSkill(d *xml.Decoder, start *xml.StartElement) (*HfSkill, error) { var ( obj = &HfSkill{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "skill": data = nil case "total_ip": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "skill": obj.Skill = string(data) case "total_ip": obj.TotalIp = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHfSkillPlus(d *xml.Decoder, start *xml.StartElement, obj *HfSkill) (*HfSkill, error) { var ( data []byte ) if obj == nil { obj = &HfSkill{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEra(d *xml.Decoder, start *xml.StartElement) (*HistoricalEra, error) { var ( obj = &HistoricalEra{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "name": data = nil case "start_year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "name": obj.Name_ = string(data) case "start_year": obj.StartYear = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEraPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEra) (*HistoricalEra, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEra{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEvent(d *xml.Decoder, start *xml.StartElement) (*HistoricalEvent, error) { var ( obj = &HistoricalEvent{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "seconds72": data = nil case "type": data = nil case "year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "seconds72": obj.Seconds72 = n(data) case "type": var err error switch string(data) { case "add hf entity honor": obj.Details, err = parseHistoricalEventAddHfEntityHonor(d, start) case "add hf entity link": obj.Details, err = parseHistoricalEventAddHfEntityLink(d, start) case "add hf hf link": obj.Details, err = parseHistoricalEventAddHfHfLink(d, start) case "add hf site link": obj.Details, err = parseHistoricalEventAddHfSiteLink(d, start) case "agreement formed": obj.Details, err = parseHistoricalEventAgreementFormed(d, start) case "agreement made": obj.Details, err = parseHistoricalEventAgreementMade(d, start) case "agreement rejected": obj.Details, err = parseHistoricalEventAgreementRejected(d, start) case "artifact claim formed": obj.Details, err = parseHistoricalEventArtifactClaimFormed(d, start) case "artifact copied": obj.Details, err = parseHistoricalEventArtifactCopied(d, start) case "artifact created": obj.Details, err = parseHistoricalEventArtifactCreated(d, start) case "artifact destroyed": obj.Details, err = parseHistoricalEventArtifactDestroyed(d, start) case "artifact found": obj.Details, err = parseHistoricalEventArtifactFound(d, start) case "artifact given": obj.Details, err = parseHistoricalEventArtifactGiven(d, start) case "artifact lost": obj.Details, err = parseHistoricalEventArtifactLost(d, start) case "artifact possessed": obj.Details, err = parseHistoricalEventArtifactPossessed(d, start) case "artifact recovered": obj.Details, err = parseHistoricalEventArtifactRecovered(d, start) case "artifact stored": obj.Details, err = parseHistoricalEventArtifactStored(d, start) case "artifact transformed": obj.Details, err = parseHistoricalEventArtifactTransformed(d, start) case "assume identity": obj.Details, err = parseHistoricalEventAssumeIdentity(d, start) case "attacked site": obj.Details, err = parseHistoricalEventAttackedSite(d, start) case "body abused": obj.Details, err = parseHistoricalEventBodyAbused(d, start) case "building profile acquired": obj.Details, err = parseHistoricalEventBuildingProfileAcquired(d, start) case "ceremony": obj.Details, err = parseHistoricalEventCeremony(d, start) case "change hf body state": obj.Details, err = parseHistoricalEventChangeHfBodyState(d, start) case "change hf job": obj.Details, err = parseHistoricalEventChangeHfJob(d, start) case "change hf state": obj.Details, err = parseHistoricalEventChangeHfState(d, start) case "changed creature type": obj.Details, err = parseHistoricalEventChangedCreatureType(d, start) case "competition": obj.Details, err = parseHistoricalEventCompetition(d, start) case "create entity position": obj.Details, err = parseHistoricalEventCreateEntityPosition(d, start) case "created site": obj.Details, err = parseHistoricalEventCreatedSite(d, start) case "created structure": obj.Details, err = parseHistoricalEventCreatedStructure(d, start) case "created world construction": obj.Details, err = parseHistoricalEventCreatedWorldConstruction(d, start) case "creature devoured": obj.Details, err = parseHistoricalEventCreatureDevoured(d, start) case "dance form created": obj.Details, err = parseHistoricalEventDanceFormCreated(d, start) case "destroyed site": obj.Details, err = parseHistoricalEventDestroyedSite(d, start) case "diplomat lost": obj.Details, err = parseHistoricalEventDiplomatLost(d, start) case "entity alliance formed": obj.Details, err = parseHistoricalEventEntityAllianceFormed(d, start) case "entity breach feature layer": obj.Details, err = parseHistoricalEventEntityBreachFeatureLayer(d, start) case "entity created": obj.Details, err = parseHistoricalEventEntityCreated(d, start) case "entity dissolved": obj.Details, err = parseHistoricalEventEntityDissolved(d, start) case "entity equipment purchase": obj.Details, err = parseHistoricalEventEntityEquipmentPurchase(d, start) case "entity expels hf": obj.Details, err = parseHistoricalEventEntityExpelsHf(d, start) case "entity fled site": obj.Details, err = parseHistoricalEventEntityFledSite(d, start) case "entity incorporated": obj.Details, err = parseHistoricalEventEntityIncorporated(d, start) case "entity law": obj.Details, err = parseHistoricalEventEntityLaw(d, start) case "entity overthrown": obj.Details, err = parseHistoricalEventEntityOverthrown(d, start) case "entity persecuted": obj.Details, err = parseHistoricalEventEntityPersecuted(d, start) case "entity primary criminals": obj.Details, err = parseHistoricalEventEntityPrimaryCriminals(d, start) case "entity rampaged in site": obj.Details, err = parseHistoricalEventEntityRampagedInSite(d, start) case "entity relocate": obj.Details, err = parseHistoricalEventEntityRelocate(d, start) case "entity searched site": obj.Details, err = parseHistoricalEventEntitySearchedSite(d, start) case "failed frame attempt": obj.Details, err = parseHistoricalEventFailedFrameAttempt(d, start) case "failed intrigue corruption": obj.Details, err = parseHistoricalEventFailedIntrigueCorruption(d, start) case "field battle": obj.Details, err = parseHistoricalEventFieldBattle(d, start) case "first contact": obj.Details, err = parseHistoricalEventFirstContact(d, start) case "gamble": obj.Details, err = parseHistoricalEventGamble(d, start) case "hf abducted": obj.Details, err = parseHistoricalEventHfAbducted(d, start) case "hf attacked site": obj.Details, err = parseHistoricalEventHfAttackedSite(d, start) case "hf confronted": obj.Details, err = parseHistoricalEventHfConfronted(d, start) case "hf convicted": obj.Details, err = parseHistoricalEventHfConvicted(d, start) case "hf destroyed site": obj.Details, err = parseHistoricalEventHfDestroyedSite(d, start) case "hf died": obj.Details, err = parseHistoricalEventHfDied(d, start) case "hf disturbed structure": obj.Details, err = parseHistoricalEventHfDisturbedStructure(d, start) case "hf does interaction": obj.Details, err = parseHistoricalEventHfDoesInteraction(d, start) case "hf enslaved": obj.Details, err = parseHistoricalEventHfEnslaved(d, start) case "hf equipment purchase": obj.Details, err = parseHistoricalEventHfEquipmentPurchase(d, start) case "hf freed": obj.Details, err = parseHistoricalEventHfFreed(d, start) case "hf gains secret goal": obj.Details, err = parseHistoricalEventHfGainsSecretGoal(d, start) case "hf interrogated": obj.Details, err = parseHistoricalEventHfInterrogated(d, start) case "hf learns secret": obj.Details, err = parseHistoricalEventHfLearnsSecret(d, start) case "hf new pet": obj.Details, err = parseHistoricalEventHfNewPet(d, start) case "hf performed horrible experiments": obj.Details, err = parseHistoricalEventHfPerformedHorribleExperiments(d, start) case "hf prayed inside structure": obj.Details, err = parseHistoricalEventHfPrayedInsideStructure(d, start) case "hf preach": obj.Details, err = parseHistoricalEventHfPreach(d, start) case "hf profaned structure": obj.Details, err = parseHistoricalEventHfProfanedStructure(d, start) case "hf ransomed": obj.Details, err = parseHistoricalEventHfRansomed(d, start) case "hf reach summit": obj.Details, err = parseHistoricalEventHfReachSummit(d, start) case "hf recruited unit type for entity": obj.Details, err = parseHistoricalEventHfRecruitedUnitTypeForEntity(d, start) case "hf relationship denied": obj.Details, err = parseHistoricalEventHfRelationshipDenied(d, start) case "hf reunion": obj.Details, err = parseHistoricalEventHfReunion(d, start) case "hf revived": obj.Details, err = parseHistoricalEventHfRevived(d, start) case "hf simple battle event": obj.Details, err = parseHistoricalEventHfSimpleBattleEvent(d, start) case "hf travel": obj.Details, err = parseHistoricalEventHfTravel(d, start) case "hf viewed artifact": obj.Details, err = parseHistoricalEventHfViewedArtifact(d, start) case "hf wounded": obj.Details, err = parseHistoricalEventHfWounded(d, start) case "hfs formed intrigue relationship": obj.Details, err = parseHistoricalEventHfsFormedIntrigueRelationship(d, start) case "hfs formed reputation relationship": obj.Details, err = parseHistoricalEventHfsFormedReputationRelationship(d, start) case "holy city declaration": obj.Details, err = parseHistoricalEventHolyCityDeclaration(d, start) case "insurrection started": obj.Details, err = parseHistoricalEventInsurrectionStarted(d, start) case "item stolen": obj.Details, err = parseHistoricalEventItemStolen(d, start) case "knowledge discovered": obj.Details, err = parseHistoricalEventKnowledgeDiscovered(d, start) case "masterpiece arch constructed": obj.Details, err = parseHistoricalEventMasterpieceArchConstructed(d, start) case "masterpiece engraving": obj.Details, err = parseHistoricalEventMasterpieceEngraving(d, start) case "masterpiece food": obj.Details, err = parseHistoricalEventMasterpieceFood(d, start) case "masterpiece item": obj.Details, err = parseHistoricalEventMasterpieceItem(d, start) case "masterpiece item improvement": obj.Details, err = parseHistoricalEventMasterpieceItemImprovement(d, start) case "masterpiece lost": obj.Details, err = parseHistoricalEventMasterpieceLost(d, start) case "merchant": obj.Details, err = parseHistoricalEventMerchant(d, start) case "modified building": obj.Details, err = parseHistoricalEventModifiedBuilding(d, start) case "musical form created": obj.Details, err = parseHistoricalEventMusicalFormCreated(d, start) case "new site leader": obj.Details, err = parseHistoricalEventNewSiteLeader(d, start) case "peace accepted": obj.Details, err = parseHistoricalEventPeaceAccepted(d, start) case "peace rejected": obj.Details, err = parseHistoricalEventPeaceRejected(d, start) case "performance": obj.Details, err = parseHistoricalEventPerformance(d, start) case "plundered site": obj.Details, err = parseHistoricalEventPlunderedSite(d, start) case "poetic form created": obj.Details, err = parseHistoricalEventPoeticFormCreated(d, start) case "procession": obj.Details, err = parseHistoricalEventProcession(d, start) case "razed structure": obj.Details, err = parseHistoricalEventRazedStructure(d, start) case "reclaim site": obj.Details, err = parseHistoricalEventReclaimSite(d, start) case "regionpop incorporated into entity": obj.Details, err = parseHistoricalEventRegionpopIncorporatedIntoEntity(d, start) case "remove hf entity link": obj.Details, err = parseHistoricalEventRemoveHfEntityLink(d, start) case "remove hf hf link": obj.Details, err = parseHistoricalEventRemoveHfHfLink(d, start) case "remove hf site link": obj.Details, err = parseHistoricalEventRemoveHfSiteLink(d, start) case "replaced structure": obj.Details, err = parseHistoricalEventReplacedStructure(d, start) case "site died": obj.Details, err = parseHistoricalEventSiteDied(d, start) case "site dispute": obj.Details, err = parseHistoricalEventSiteDispute(d, start) case "site retired": obj.Details, err = parseHistoricalEventSiteRetired(d, start) case "site surrendered": obj.Details, err = parseHistoricalEventSiteSurrendered(d, start) case "site taken over": obj.Details, err = parseHistoricalEventSiteTakenOver(d, start) case "site tribute forced": obj.Details, err = parseHistoricalEventSiteTributeForced(d, start) case "sneak into site": obj.Details, err = parseHistoricalEventSneakIntoSite(d, start) case "spotted leaving site": obj.Details, err = parseHistoricalEventSpottedLeavingSite(d, start) case "squad vs squad": obj.Details, err = parseHistoricalEventSquadVsSquad(d, start) case "tactical situation": obj.Details, err = parseHistoricalEventTacticalSituation(d, start) case "trade": obj.Details, err = parseHistoricalEventTrade(d, start) case "written content composed": obj.Details, err = parseHistoricalEventWrittenContentComposed(d, start) default: d.Skip() } if err != nil { return nil, err } return obj, nil case "year": obj.Year = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEvent) (*HistoricalEvent, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEvent{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "type": var err error switch string(data) { case "add_hf_entity_link": obj.Details, err = parseHistoricalEventAddHfEntityLinkPlus(d, start, obj.Details.(*HistoricalEventAddHfEntityLink)) case "add_hf_hf_link": obj.Details, err = parseHistoricalEventAddHfHfLinkPlus(d, start, obj.Details.(*HistoricalEventAddHfHfLink)) case "add_hf_site_link": obj.Details, err = parseHistoricalEventAddHfSiteLinkPlus(d, start, obj.Details.(*HistoricalEventAddHfSiteLink)) case "artifact_created": obj.Details, err = parseHistoricalEventArtifactCreatedPlus(d, start, obj.Details.(*HistoricalEventArtifactCreated)) case "assume_identity": obj.Details, err = parseHistoricalEventAssumeIdentityPlus(d, start, obj.Details.(*HistoricalEventAssumeIdentity)) case "body_abused": obj.Details, err = parseHistoricalEventBodyAbusedPlus(d, start, obj.Details.(*HistoricalEventBodyAbused)) case "change_creature_type": obj.Details, err = parseHistoricalEventChangedCreatureTypePlus(d, start, obj.Details.(*HistoricalEventChangedCreatureType)) case "change_hf_job": obj.Details, err = parseHistoricalEventChangeHfJobPlus(d, start, obj.Details.(*HistoricalEventChangeHfJob)) case "change_hf_state": obj.Details, err = parseHistoricalEventChangeHfStatePlus(d, start, obj.Details.(*HistoricalEventChangeHfState)) case "create_entity_position": obj.Details, err = parseHistoricalEventCreateEntityPositionPlus(d, start, obj.Details.(*HistoricalEventCreateEntityPosition)) case "created_building": obj.Details, err = parseHistoricalEventCreatedStructurePlus(d, start, obj.Details.(*HistoricalEventCreatedStructure)) case "creature_devoured": obj.Details, err = parseHistoricalEventCreatureDevouredPlus(d, start, obj.Details.(*HistoricalEventCreatureDevoured)) case "diplomat_lost": obj.Details, err = parseHistoricalEventDiplomatLostPlus(d, start, obj.Details.(*HistoricalEventDiplomatLost)) case "entity_action": switch details := obj.Details.(type) { case *HistoricalEventEntityPrimaryCriminals: obj.Details, err = parseHistoricalEventEntityPrimaryCriminalsPlus(d, start, details) case *HistoricalEventEntityRelocate: obj.Details, err = parseHistoricalEventEntityRelocatePlus(d, start, details) default: fmt.Println("unknown subtype option", obj.Details) d.Skip() } case "hf_act_on_building": switch details := obj.Details.(type) { case *HistoricalEventHfDisturbedStructure: obj.Details, err = parseHistoricalEventHfDisturbedStructurePlus(d, start, details) case *HistoricalEventHfPrayedInsideStructure: obj.Details, err = parseHistoricalEventHfPrayedInsideStructurePlus(d, start, details) case *HistoricalEventHfProfanedStructure: obj.Details, err = parseHistoricalEventHfProfanedStructurePlus(d, start, details) default: fmt.Println("unknown subtype option", obj.Details) d.Skip() } case "hf_does_interaction": obj.Details, err = parseHistoricalEventHfDoesInteractionPlus(d, start, obj.Details.(*HistoricalEventHfDoesInteraction)) case "hf_learns_secret": obj.Details, err = parseHistoricalEventHfLearnsSecretPlus(d, start, obj.Details.(*HistoricalEventHfLearnsSecret)) case "hist_figure_died": obj.Details, err = parseHistoricalEventHfDiedPlus(d, start, obj.Details.(*HistoricalEventHfDied)) case "hist_figure_new_pet": obj.Details, err = parseHistoricalEventHfNewPetPlus(d, start, obj.Details.(*HistoricalEventHfNewPet)) case "hist_figure_wounded": obj.Details, err = parseHistoricalEventHfWoundedPlus(d, start, obj.Details.(*HistoricalEventHfWounded)) case "item_stolen": obj.Details, err = parseHistoricalEventItemStolenPlus(d, start, obj.Details.(*HistoricalEventItemStolen)) case "masterpiece_created_arch_construct": obj.Details, err = parseHistoricalEventMasterpieceArchConstructedPlus(d, start, obj.Details.(*HistoricalEventMasterpieceArchConstructed)) case "masterpiece_created_engraving": obj.Details, err = parseHistoricalEventMasterpieceEngravingPlus(d, start, obj.Details.(*HistoricalEventMasterpieceEngraving)) case "masterpiece_created_item": obj.Details, err = parseHistoricalEventMasterpieceItemPlus(d, start, obj.Details.(*HistoricalEventMasterpieceItem)) case "masterpiece_lost": obj.Details, err = parseHistoricalEventMasterpieceLostPlus(d, start, obj.Details.(*HistoricalEventMasterpieceLost)) case "merchant": obj.Details, err = parseHistoricalEventMerchantPlus(d, start, obj.Details.(*HistoricalEventMerchant)) case "remove_hf_entity_link": obj.Details, err = parseHistoricalEventRemoveHfEntityLinkPlus(d, start, obj.Details.(*HistoricalEventRemoveHfEntityLink)) case "remove_hf_site_link": obj.Details, err = parseHistoricalEventRemoveHfSiteLinkPlus(d, start, obj.Details.(*HistoricalEventRemoveHfSiteLink)) case "replaced_building": obj.Details, err = parseHistoricalEventReplacedStructurePlus(d, start, obj.Details.(*HistoricalEventReplacedStructure)) case "war_peace_accepted": obj.Details, err = parseHistoricalEventPeaceAcceptedPlus(d, start, obj.Details.(*HistoricalEventPeaceAccepted)) case "war_peace_rejected": obj.Details, err = parseHistoricalEventPeaceRejectedPlus(d, start, obj.Details.(*HistoricalEventPeaceRejected)) default: d.Skip() } if err != nil { return nil, err } return obj, nil default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfEntityHonor(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfEntityHonor, error) { var ( obj = &HistoricalEventAddHfEntityHonor{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "honor_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "honor_id": obj.HonorId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfEntityHonorPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAddHfEntityHonor) (*HistoricalEventAddHfEntityHonor, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAddHfEntityHonor{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfEntityLink, error) { var ( obj = &HistoricalEventAddHfEntityLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "appointer_hfid": data = nil case "civ_id": data = nil case "hfid": data = nil case "link": data = nil case "position_id": data = nil case "promise_to_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "appointer_hfid": obj.AppointerHfid = n(data) case "civ_id": obj.CivId = n(data) case "hfid": obj.Hfid = n(data) case "link": obj.Link = parseHistoricalEventAddHfEntityLinkLink(string(data)) case "position_id": obj.PositionId = n(data) case "promise_to_hfid": obj.PromiseToHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfEntityLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAddHfEntityLink) (*HistoricalEventAddHfEntityLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAddHfEntityLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "appointer_hfid": data = nil case "civ": data = nil case "histfig": data = nil case "link_type": data = nil case "position": data = nil case "promise_to_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "appointer_hfid": obj.AppointerHfid = n(data) case "civ": obj.CivId = n(data) case "histfig": obj.Hfid = n(data) case "link_type": obj.Link = parseHistoricalEventAddHfEntityLinkLink(string(data)) case "position": obj.Position = string(data) case "promise_to_hfid": obj.PromiseToHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfHfLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfHfLink, error) { var ( obj = &HistoricalEventAddHfHfLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hfid": data = nil case "hfid_target": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hfid": obj.Hfid = n(data) case "hfid_target": obj.HfidTarget = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfHfLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAddHfHfLink) (*HistoricalEventAddHfHfLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAddHfHfLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hf": data = nil case "hf_target": data = nil case "link_type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hf": obj.Hfid = n(data) case "hf_target": obj.HfidTarget = n(data) case "link_type": obj.LinkType = parseHistoricalEventAddHfHfLinkLinkType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfSiteLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAddHfSiteLink, error) { var ( obj = &HistoricalEventAddHfSiteLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAddHfSiteLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAddHfSiteLink) (*HistoricalEventAddHfSiteLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAddHfSiteLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ": data = nil case "histfig": data = nil case "link_type": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ": obj.Civ = n(data) case "histfig": obj.Histfig = n(data) case "link_type": obj.LinkType = parseHistoricalEventAddHfSiteLinkLinkType(string(data)) case "site": obj.SiteId = n(data) case "structure": obj.Structure = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAgreementFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAgreementFormed, error) { var ( obj = &HistoricalEventAgreementFormed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "agreement_id": data = nil case "agreement_subject_id": data = nil case "ally_defense_bonus": data = nil case "coconspirator_bonus": data = nil case "concluder_hfid": data = nil case "delegated": data = nil case "failed_judgment_test": data = nil case "method": data = nil case "reason": data = nil case "relevant_entity_id": data = nil case "relevant_id_for_method": data = nil case "relevant_position_profile_id": data = nil case "successful": data = nil case "top_facet": data = nil case "top_facet_modifier": data = nil case "top_facet_rating": data = nil case "top_relationship_factor": data = nil case "top_relationship_modifier": data = nil case "top_relationship_rating": data = nil case "top_value": data = nil case "top_value_modifier": data = nil case "top_value_rating": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventAgreementFormedAction(string(data)) case "agreement_id": obj.AgreementId = n(data) case "agreement_subject_id": obj.AgreementSubjectId = n(data) case "ally_defense_bonus": obj.AllyDefenseBonus = n(data) case "coconspirator_bonus": obj.CoconspiratorBonus = n(data) case "concluder_hfid": obj.ConcluderHfid = n(data) case "delegated": obj.Delegated = true case "failed_judgment_test": obj.FailedJudgmentTest = true case "method": obj.Method = parseHistoricalEventAgreementFormedMethod(string(data)) case "reason": obj.Reason = parseHistoricalEventAgreementFormedReason(string(data)) case "relevant_entity_id": obj.RelevantEntityId = n(data) case "relevant_id_for_method": obj.RelevantIdForMethod = n(data) case "relevant_position_profile_id": obj.RelevantPositionProfileId = n(data) case "successful": obj.Successful = true case "top_facet": obj.TopFacet = parseHistoricalEventAgreementFormedTopFacet(string(data)) case "top_facet_modifier": obj.TopFacetModifier = n(data) case "top_facet_rating": obj.TopFacetRating = n(data) case "top_relationship_factor": obj.TopRelationshipFactor = parseHistoricalEventAgreementFormedTopRelationshipFactor(string(data)) case "top_relationship_modifier": obj.TopRelationshipModifier = n(data) case "top_relationship_rating": obj.TopRelationshipRating = n(data) case "top_value": obj.TopValue = parseHistoricalEventAgreementFormedTopValue(string(data)) case "top_value_modifier": obj.TopValueModifier = n(data) case "top_value_rating": obj.TopValueRating = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAgreementFormedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAgreementFormed) (*HistoricalEventAgreementFormed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAgreementFormed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAgreementMade(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAgreementMade, error) { var ( obj = &HistoricalEventAgreementMade{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAgreementMadePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAgreementMade) (*HistoricalEventAgreementMade, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAgreementMade{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAgreementRejected(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAgreementRejected, error) { var ( obj = &HistoricalEventAgreementRejected{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAgreementRejectedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAgreementRejected) (*HistoricalEventAgreementRejected, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAgreementRejected{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactClaimFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactClaimFormed, error) { var ( obj = &HistoricalEventArtifactClaimFormed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "circumstance": data = nil case "claim": data = nil case "entity_id": data = nil case "hist_figure_id": data = nil case "position_profile_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "circumstance": obj.Circumstance = parseHistoricalEventArtifactClaimFormedCircumstance(string(data)) case "claim": obj.Claim = parseHistoricalEventArtifactClaimFormedClaim(string(data)) case "entity_id": obj.EntityId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "position_profile_id": obj.PositionProfileId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactClaimFormedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactClaimFormed) (*HistoricalEventArtifactClaimFormed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactClaimFormed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactCopied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCopied, error) { var ( obj = &HistoricalEventArtifactCopied{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "dest_entity_id": data = nil case "dest_site_id": data = nil case "dest_structure_id": data = nil case "from_original": data = nil case "source_entity_id": data = nil case "source_site_id": data = nil case "source_structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "dest_entity_id": obj.DestEntityId = n(data) case "dest_site_id": obj.DestSiteId = n(data) case "dest_structure_id": obj.DestStructureId = n(data) case "from_original": obj.FromOriginal = true case "source_entity_id": obj.SourceEntityId = n(data) case "source_site_id": obj.SourceSiteId = n(data) case "source_structure_id": obj.SourceStructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactCopiedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactCopied) (*HistoricalEventArtifactCopied, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactCopied{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCreated, error) { var ( obj = &HistoricalEventArtifactCreated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "hist_figure_id": data = nil case "name_only": data = nil case "site_id": data = nil case "unit_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "name_only": obj.NameOnly = true case "site_id": obj.SiteId = n(data) case "unit_id": obj.UnitId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactCreatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactCreated) (*HistoricalEventArtifactCreated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactCreated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "circumstance": v, _ := parseHistoricalEventArtifactCreatedCircumstancePlus(d, &t, &HistoricalEventArtifactCreatedCircumstance{}) obj.Circumstance = v case "creator_hfid": data = nil case "creator_unit_id": data = nil case "reason": data = nil case "sanctify_hf": data = nil case "site": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "circumstance": case "creator_hfid": obj.HistFigureId = n(data) case "creator_unit_id": obj.UnitId = n(data) case "reason": obj.Reason = parseHistoricalEventArtifactCreatedReason(string(data)) case "sanctify_hf": obj.SanctifyHf = n(data) case "site": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactCreatedCircumstance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactCreatedCircumstance, error) { var ( obj = &HistoricalEventArtifactCreatedCircumstance{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactCreatedCircumstancePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactCreatedCircumstance) (*HistoricalEventArtifactCreatedCircumstance, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactCreatedCircumstance{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "defeated": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "defeated": obj.Defeated = n(data) case "type": obj.Type = parseHistoricalEventArtifactCreatedCircumstanceType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactDestroyed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactDestroyed, error) { var ( obj = &HistoricalEventArtifactDestroyed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "destroyer_enid": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "destroyer_enid": obj.DestroyerEnid = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactDestroyedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactDestroyed) (*HistoricalEventArtifactDestroyed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactDestroyed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactFound(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactFound, error) { var ( obj = &HistoricalEventArtifactFound{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "hist_figure_id": data = nil case "site_id": data = nil case "unit_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "site_id": obj.SiteId = n(data) case "unit_id": obj.UnitId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactFoundPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactFound) (*HistoricalEventArtifactFound, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactFound{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactGiven(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactGiven, error) { var ( obj = &HistoricalEventArtifactGiven{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "giver_entity_id": data = nil case "giver_hist_figure_id": data = nil case "reason": data = nil case "receiver_entity_id": data = nil case "receiver_hist_figure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "giver_entity_id": obj.GiverEntityId = n(data) case "giver_hist_figure_id": obj.GiverHistFigureId = n(data) case "reason": obj.Reason = parseHistoricalEventArtifactGivenReason(string(data)) case "receiver_entity_id": obj.ReceiverEntityId = n(data) case "receiver_hist_figure_id": obj.ReceiverHistFigureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactGivenPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactGiven) (*HistoricalEventArtifactGiven, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactGiven{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactLost(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactLost, error) { var ( obj = &HistoricalEventArtifactLost{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "feature_layer_id": data = nil case "site_id": data = nil case "site_property_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "site_property_id": obj.SitePropertyId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactLostPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactLost) (*HistoricalEventArtifactLost, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactLost{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactPossessed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactPossessed, error) { var ( obj = &HistoricalEventArtifactPossessed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "circumstance": data = nil case "circumstance_id": data = nil case "feature_layer_id": data = nil case "hist_figure_id": data = nil case "reason": data = nil case "reason_id": data = nil case "site_id": data = nil case "subregion_id": data = nil case "unit_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "circumstance": obj.Circumstance = parseHistoricalEventArtifactPossessedCircumstance(string(data)) case "circumstance_id": obj.CircumstanceId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "reason": obj.Reason = parseHistoricalEventArtifactPossessedReason(string(data)) case "reason_id": obj.ReasonId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "unit_id": obj.UnitId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactPossessedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactPossessed) (*HistoricalEventArtifactPossessed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactPossessed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactRecovered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactRecovered, error) { var ( obj = &HistoricalEventArtifactRecovered{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "feature_layer_id": data = nil case "hist_figure_id": data = nil case "site_id": data = nil case "structure_id": data = nil case "subregion_id": data = nil case "unit_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) case "subregion_id": obj.SubregionId = n(data) case "unit_id": obj.UnitId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactRecoveredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactRecovered) (*HistoricalEventArtifactRecovered, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactRecovered{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactStored(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactStored, error) { var ( obj = &HistoricalEventArtifactStored{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "hist_figure_id": data = nil case "site_id": data = nil case "unit_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "site_id": obj.SiteId = n(data) case "unit_id": obj.UnitId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactStoredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactStored) (*HistoricalEventArtifactStored, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactStored{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactTransformed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventArtifactTransformed, error) { var ( obj = &HistoricalEventArtifactTransformed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hist_figure_id": data = nil case "new_artifact_id": data = nil case "old_artifact_id": data = nil case "site_id": data = nil case "unit_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hist_figure_id": obj.HistFigureId = n(data) case "new_artifact_id": obj.NewArtifactId = n(data) case "old_artifact_id": obj.OldArtifactId = n(data) case "site_id": obj.SiteId = n(data) case "unit_id": obj.UnitId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventArtifactTransformedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventArtifactTransformed) (*HistoricalEventArtifactTransformed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventArtifactTransformed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAssumeIdentity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAssumeIdentity, error) { var ( obj = &HistoricalEventAssumeIdentity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "identity_id": data = nil case "target_enid": data = nil case "trickster_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "identity_id": obj.IdentityId = n(data) case "target_enid": obj.TargetEnid = n(data) case "trickster_hfid": obj.TricksterHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAssumeIdentityPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAssumeIdentity) (*HistoricalEventAssumeIdentity, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAssumeIdentity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "identity_caste": data = nil case "identity_histfig_id": data = nil case "identity_name": data = nil case "identity_nemesis_id": data = nil case "identity_race": data = nil case "target": data = nil case "trickster": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "identity_caste": obj.IdentityCaste = string(data) case "identity_histfig_id": obj.TricksterHfid = n(data) case "identity_name": obj.IdentityName = string(data) case "identity_nemesis_id": obj.TricksterHfid = n(data) case "identity_race": obj.IdentityRace = string(data) case "target": obj.TargetEnid = n(data) case "trickster": obj.TricksterHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAttackedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventAttackedSite, error) { var ( obj = &HistoricalEventAttackedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "a_support_merc_enid": data = nil case "attacker_civ_id": data = nil case "attacker_general_hfid": data = nil case "attacker_merc_enid": data = nil case "d_support_merc_enid": data = nil case "defender_civ_id": data = nil case "defender_general_hfid": data = nil case "defender_merc_enid": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "a_support_merc_enid": obj.ASupportMercEnid = n(data) case "attacker_civ_id": obj.AttackerCivId = n(data) case "attacker_general_hfid": obj.AttackerGeneralHfid = n(data) case "attacker_merc_enid": obj.AttackerMercEnid = n(data) case "d_support_merc_enid": obj.DSupportMercEnid = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "defender_general_hfid": obj.DefenderGeneralHfid = n(data) case "defender_merc_enid": obj.DefenderMercEnid = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventAttackedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventAttackedSite) (*HistoricalEventAttackedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventAttackedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventBodyAbused(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventBodyAbused, error) { var ( obj = &HistoricalEventBodyAbused{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "feature_layer_id": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventBodyAbusedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventBodyAbused) (*HistoricalEventBodyAbused, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventBodyAbused{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "abuse_type": data = nil case "bodies": data = nil case "civ": data = nil case "histfig": data = nil case "interaction": data = nil case "item_mat": data = nil case "item_subtype": data = nil case "item_type": data = nil case "pile_type": data = nil case "site": data = nil case "structure": data = nil case "tree": data = nil case "victim_entity": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "abuse_type": obj.AbuseType = parseHistoricalEventBodyAbusedAbuseType(string(data)) case "bodies": obj.Bodies = append(obj.Bodies, n(data)) case "civ": obj.Civ = n(data) case "histfig": obj.Histfig = n(data) case "interaction": obj.Interaction = n(data) case "item_mat": obj.ItemMat = string(data) case "item_subtype": obj.ItemSubtype = parseHistoricalEventBodyAbusedItemSubtype(string(data)) case "item_type": obj.ItemType = parseHistoricalEventBodyAbusedItemType(string(data)) case "pile_type": obj.PileType = parseHistoricalEventBodyAbusedPileType(string(data)) case "site": obj.SiteId = n(data) case "structure": obj.Structure = n(data) case "tree": obj.Tree = n(data) case "victim_entity": obj.VictimEntity = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventBuildingProfileAcquired(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventBuildingProfileAcquired, error) { var ( obj = &HistoricalEventBuildingProfileAcquired{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "acquirer_enid": data = nil case "acquirer_hfid": data = nil case "building_profile_id": data = nil case "inherited": data = nil case "last_owner_hfid": data = nil case "purchased_unowned": data = nil case "rebuilt_ruined": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "acquirer_enid": obj.AcquirerEnid = n(data) case "acquirer_hfid": obj.AcquirerHfid = n(data) case "building_profile_id": obj.BuildingProfileId = n(data) case "inherited": obj.Inherited = true case "last_owner_hfid": obj.LastOwnerHfid = n(data) case "purchased_unowned": obj.PurchasedUnowned = true case "rebuilt_ruined": obj.RebuiltRuined = true case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventBuildingProfileAcquiredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventBuildingProfileAcquired) (*HistoricalEventBuildingProfileAcquired, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventBuildingProfileAcquired{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCeremony(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCeremony, error) { var ( obj = &HistoricalEventCeremony{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "feature_layer_id": data = nil case "occasion_id": data = nil case "schedule_id": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "occasion_id": obj.OccasionId = n(data) case "schedule_id": obj.ScheduleId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCeremonyPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCeremony) (*HistoricalEventCeremony, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCeremony{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangeHfBodyState(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfBodyState, error) { var ( obj = &HistoricalEventChangeHfBodyState{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "body_state": data = nil case "coords": data = nil case "feature_layer_id": data = nil case "hfid": data = nil case "site_id": data = nil case "structure_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "body_state": obj.BodyState = parseHistoricalEventChangeHfBodyStateBodyState(string(data)) case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangeHfBodyStatePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventChangeHfBodyState) (*HistoricalEventChangeHfBodyState, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventChangeHfBodyState{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangeHfJob(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfJob, error) { var ( obj = &HistoricalEventChangeHfJob{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "hfid": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangeHfJobPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventChangeHfJob) (*HistoricalEventChangeHfJob, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventChangeHfJob{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hfid": data = nil case "new_job": data = nil case "old_job": data = nil case "site": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hfid": obj.Hfid = n(data) case "new_job": obj.NewJob = string(data) case "old_job": obj.OldJob = string(data) case "site": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangeHfState(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangeHfState, error) { var ( obj = &HistoricalEventChangeHfState{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "feature_layer_id": data = nil case "hfid": data = nil case "mood": data = nil case "reason": data = nil case "site_id": data = nil case "state": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hfid": obj.Hfid = n(data) case "mood": obj.Mood = parseHistoricalEventChangeHfStateMood(string(data)) case "reason": obj.Reason = parseHistoricalEventChangeHfStateReason(string(data)) case "site_id": obj.SiteId = n(data) case "state": obj.State = parseHistoricalEventChangeHfStateState(string(data)) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangeHfStatePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventChangeHfState) (*HistoricalEventChangeHfState, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventChangeHfState{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hfid": data = nil case "reason": data = nil case "site": data = nil case "state": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hfid": obj.Hfid = n(data) case "reason": obj.Reason = parseHistoricalEventChangeHfStateReason(string(data)) case "site": obj.SiteId = n(data) case "state": obj.State = parseHistoricalEventChangeHfStateState(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangedCreatureType(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventChangedCreatureType, error) { var ( obj = &HistoricalEventChangedCreatureType{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "changee_hfid": data = nil case "changer_hfid": data = nil case "new_caste": data = nil case "new_race": data = nil case "old_caste": data = nil case "old_race": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "changee_hfid": obj.ChangeeHfid = n(data) case "changer_hfid": obj.ChangerHfid = n(data) case "new_caste": obj.NewCaste = string(data) case "new_race": obj.NewRace = string(data) case "old_caste": obj.OldCaste = string(data) case "old_race": obj.OldRace = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventChangedCreatureTypePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventChangedCreatureType) (*HistoricalEventChangedCreatureType, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventChangedCreatureType{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "changee": data = nil case "changer": data = nil case "new_caste": data = nil case "new_race": data = nil case "old_caste": data = nil case "old_race": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "changee": obj.ChangeeHfid = n(data) case "changer": obj.ChangerHfid = n(data) case "new_caste": obj.NewCaste = string(data) case "new_race": obj.NewRace = string(data) case "old_caste": obj.OldCaste = string(data) case "old_race": obj.OldRace = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollection(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollection, error) { var ( obj = &HistoricalEventCollection{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "end_seconds72": data = nil case "end_year": data = nil case "event": data = nil case "eventcol": data = nil case "id": data = nil case "start_seconds72": data = nil case "start_year": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "end_seconds72": obj.EndSeconds72 = n(data) case "end_year": obj.EndYear = n(data) case "event": obj.Event = append(obj.Event, n(data)) case "eventcol": obj.Eventcol = append(obj.Eventcol, n(data)) case "id": obj.Id_ = n(data) case "start_seconds72": obj.StartSeconds72 = n(data) case "start_year": obj.StartYear = n(data) case "type": var err error switch string(data) { case "abduction": obj.Details, err = parseHistoricalEventCollectionAbduction(d, start) case "battle": obj.Details, err = parseHistoricalEventCollectionBattle(d, start) case "beast attack": obj.Details, err = parseHistoricalEventCollectionBeastAttack(d, start) case "ceremony": obj.Details, err = parseHistoricalEventCollectionCeremony(d, start) case "competition": obj.Details, err = parseHistoricalEventCollectionCompetition(d, start) case "duel": obj.Details, err = parseHistoricalEventCollectionDuel(d, start) case "entity overthrown": obj.Details, err = parseHistoricalEventCollectionEntityOverthrown(d, start) case "insurrection": obj.Details, err = parseHistoricalEventCollectionInsurrection(d, start) case "journey": obj.Details, err = parseHistoricalEventCollectionJourney(d, start) case "occasion": obj.Details, err = parseHistoricalEventCollectionOccasion(d, start) case "performance": obj.Details, err = parseHistoricalEventCollectionPerformance(d, start) case "persecution": obj.Details, err = parseHistoricalEventCollectionPersecution(d, start) case "procession": obj.Details, err = parseHistoricalEventCollectionProcession(d, start) case "purge": obj.Details, err = parseHistoricalEventCollectionPurge(d, start) case "raid": obj.Details, err = parseHistoricalEventCollectionRaid(d, start) case "site conquered": obj.Details, err = parseHistoricalEventCollectionSiteConquered(d, start) case "theft": obj.Details, err = parseHistoricalEventCollectionTheft(d, start) case "war": obj.Details, err = parseHistoricalEventCollectionWar(d, start) default: d.Skip() } if err != nil { return nil, err } return obj, nil default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollection) (*HistoricalEventCollection, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollection{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionAbduction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionAbduction, error) { var ( obj = &HistoricalEventCollectionAbduction{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacking_enid": data = nil case "coords": data = nil case "defending_enid": data = nil case "feature_layer_id": data = nil case "ordinal": data = nil case "parent_eventcol": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacking_enid": obj.AttackingEnid = n(data) case "coords": obj.Coords = string(data) case "defending_enid": obj.DefendingEnid = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "ordinal": obj.Ordinal = n(data) case "parent_eventcol": obj.ParentEventcol = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionAbductionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionAbduction) (*HistoricalEventCollectionAbduction, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionAbduction{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionBattle(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionBattle, error) { var ( obj = &HistoricalEventCollectionBattle{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "a_support_merc_enid": data = nil case "a_support_merc_hfid": data = nil case "attacking_hfid": data = nil case "attacking_merc_enid": data = nil case "attacking_squad_animated": data = nil case "attacking_squad_deaths": data = nil case "attacking_squad_entity_pop": data = nil case "attacking_squad_number": data = nil case "attacking_squad_race": data = nil case "attacking_squad_site": data = nil case "company_merc": data = nil case "coords": data = nil case "d_support_merc_enid": data = nil case "d_support_merc_hfid": data = nil case "defending_hfid": data = nil case "defending_merc_enid": data = nil case "defending_squad_animated": data = nil case "defending_squad_deaths": data = nil case "defending_squad_entity_pop": data = nil case "defending_squad_number": data = nil case "defending_squad_race": data = nil case "defending_squad_site": data = nil case "feature_layer_id": data = nil case "individual_merc": data = nil case "name": data = nil case "noncom_hfid": data = nil case "outcome": data = nil case "site_id": data = nil case "subregion_id": data = nil case "war_eventcol": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "a_support_merc_enid": obj.ASupportMercEnid = n(data) case "a_support_merc_hfid": obj.ASupportMercHfid = append(obj.ASupportMercHfid, n(data)) case "attacking_hfid": obj.AttackingHfid = append(obj.AttackingHfid, n(data)) case "attacking_merc_enid": obj.AttackingMercEnid = n(data) case "attacking_squad_animated": case "attacking_squad_deaths": obj.AttackingSquadDeaths = append(obj.AttackingSquadDeaths, n(data)) case "attacking_squad_entity_pop": obj.AttackingSquadEntityPop = append(obj.AttackingSquadEntityPop, n(data)) case "attacking_squad_number": obj.AttackingSquadNumber = append(obj.AttackingSquadNumber, n(data)) case "attacking_squad_race": obj.AttackingSquadRace = append(obj.AttackingSquadRace, string(data)) case "attacking_squad_site": obj.AttackingSquadSite = append(obj.AttackingSquadSite, n(data)) case "company_merc": case "coords": obj.Coords = string(data) case "d_support_merc_enid": obj.DSupportMercEnid = n(data) case "d_support_merc_hfid": obj.DSupportMercHfid = append(obj.DSupportMercHfid, n(data)) case "defending_hfid": obj.DefendingHfid = append(obj.DefendingHfid, n(data)) case "defending_merc_enid": obj.DefendingMercEnid = n(data) case "defending_squad_animated": case "defending_squad_deaths": obj.DefendingSquadDeaths = append(obj.DefendingSquadDeaths, n(data)) case "defending_squad_entity_pop": obj.DefendingSquadEntityPop = append(obj.DefendingSquadEntityPop, n(data)) case "defending_squad_number": obj.DefendingSquadNumber = append(obj.DefendingSquadNumber, n(data)) case "defending_squad_race": obj.DefendingSquadRace = append(obj.DefendingSquadRace, string(data)) case "defending_squad_site": obj.DefendingSquadSite = append(obj.DefendingSquadSite, n(data)) case "feature_layer_id": obj.FeatureLayerId = n(data) case "individual_merc": case "name": obj.Name_ = string(data) case "noncom_hfid": obj.NoncomHfid = append(obj.NoncomHfid, n(data)) case "outcome": obj.Outcome = parseHistoricalEventCollectionBattleOutcome(string(data)) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "war_eventcol": obj.WarEventcol = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionBattlePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionBattle) (*HistoricalEventCollectionBattle, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionBattle{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionBeastAttack(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionBeastAttack, error) { var ( obj = &HistoricalEventCollectionBeastAttack{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "defending_enid": data = nil case "feature_layer_id": data = nil case "ordinal": data = nil case "parent_eventcol": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "defending_enid": obj.DefendingEnid = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "ordinal": obj.Ordinal = n(data) case "parent_eventcol": obj.ParentEventcol = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionBeastAttackPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionBeastAttack) (*HistoricalEventCollectionBeastAttack, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionBeastAttack{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionCeremony(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionCeremony, error) { var ( obj = &HistoricalEventCollectionCeremony{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionCeremonyPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionCeremony) (*HistoricalEventCollectionCeremony, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionCeremony{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionCompetition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionCompetition, error) { var ( obj = &HistoricalEventCollectionCompetition{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionCompetitionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionCompetition) (*HistoricalEventCollectionCompetition, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionCompetition{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionDuel(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionDuel, error) { var ( obj = &HistoricalEventCollectionDuel{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacking_hfid": data = nil case "coords": data = nil case "defending_hfid": data = nil case "feature_layer_id": data = nil case "ordinal": data = nil case "parent_eventcol": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacking_hfid": obj.AttackingHfid = n(data) case "coords": obj.Coords = string(data) case "defending_hfid": obj.DefendingHfid = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "ordinal": obj.Ordinal = n(data) case "parent_eventcol": obj.ParentEventcol = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionDuelPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionDuel) (*HistoricalEventCollectionDuel, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionDuel{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionEntityOverthrown(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionEntityOverthrown, error) { var ( obj = &HistoricalEventCollectionEntityOverthrown{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil case "site_id": data = nil case "target_entity_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) case "site_id": obj.SiteId = n(data) case "target_entity_id": obj.TargetEntityId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionEntityOverthrownPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionEntityOverthrown) (*HistoricalEventCollectionEntityOverthrown, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionEntityOverthrown{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionInsurrection(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionInsurrection, error) { var ( obj = &HistoricalEventCollectionInsurrection{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil case "site_id": data = nil case "target_enid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) case "site_id": obj.SiteId = n(data) case "target_enid": obj.TargetEnid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionInsurrectionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionInsurrection) (*HistoricalEventCollectionInsurrection, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionInsurrection{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionJourney(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionJourney, error) { var ( obj = &HistoricalEventCollectionJourney{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionJourneyPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionJourney) (*HistoricalEventCollectionJourney, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionJourney{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionOccasion(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionOccasion, error) { var ( obj = &HistoricalEventCollectionOccasion{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "occasion_id": data = nil case "ordinal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "occasion_id": obj.OccasionId = n(data) case "ordinal": obj.Ordinal = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionOccasionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionOccasion) (*HistoricalEventCollectionOccasion, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionOccasion{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPerformance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPerformance, error) { var ( obj = &HistoricalEventCollectionPerformance{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPerformancePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionPerformance) (*HistoricalEventCollectionPerformance, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionPerformance{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPersecution(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPersecution, error) { var ( obj = &HistoricalEventCollectionPersecution{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil case "site_id": data = nil case "target_entity_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) case "site_id": obj.SiteId = n(data) case "target_entity_id": obj.TargetEntityId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPersecutionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionPersecution) (*HistoricalEventCollectionPersecution, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionPersecution{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionProcession(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionProcession, error) { var ( obj = &HistoricalEventCollectionProcession{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "ordinal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "ordinal": obj.Ordinal = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionProcessionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionProcession) (*HistoricalEventCollectionProcession, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionProcession{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPurge(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionPurge, error) { var ( obj = &HistoricalEventCollectionPurge{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "adjective": data = nil case "ordinal": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "adjective": obj.Adjective = parseHistoricalEventCollectionPurgeAdjective(string(data)) case "ordinal": obj.Ordinal = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionPurgePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionPurge) (*HistoricalEventCollectionPurge, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionPurge{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionRaid(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionRaid, error) { var ( obj = &HistoricalEventCollectionRaid{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacking_enid": data = nil case "coords": data = nil case "defending_enid": data = nil case "feature_layer_id": data = nil case "ordinal": data = nil case "parent_eventcol": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacking_enid": obj.AttackingEnid = n(data) case "coords": obj.Coords = string(data) case "defending_enid": obj.DefendingEnid = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "ordinal": obj.Ordinal = n(data) case "parent_eventcol": obj.ParentEventcol = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionRaidPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionRaid) (*HistoricalEventCollectionRaid, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionRaid{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionSiteConquered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionSiteConquered, error) { var ( obj = &HistoricalEventCollectionSiteConquered{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacking_enid": data = nil case "defending_enid": data = nil case "ordinal": data = nil case "site_id": data = nil case "war_eventcol": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacking_enid": obj.AttackingEnid = n(data) case "defending_enid": obj.DefendingEnid = n(data) case "ordinal": obj.Ordinal = n(data) case "site_id": obj.SiteId = n(data) case "war_eventcol": obj.WarEventcol = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionSiteConqueredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionSiteConquered) (*HistoricalEventCollectionSiteConquered, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionSiteConquered{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionTheft(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionTheft, error) { var ( obj = &HistoricalEventCollectionTheft{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacking_enid": data = nil case "coords": data = nil case "defending_enid": data = nil case "feature_layer_id": data = nil case "ordinal": data = nil case "parent_eventcol": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacking_enid": obj.AttackingEnid = n(data) case "coords": obj.Coords = string(data) case "defending_enid": obj.DefendingEnid = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "ordinal": obj.Ordinal = n(data) case "parent_eventcol": obj.ParentEventcol = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionTheftPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionTheft) (*HistoricalEventCollectionTheft, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionTheft{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionWar(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCollectionWar, error) { var ( obj = &HistoricalEventCollectionWar{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "aggressor_ent_id": data = nil case "defender_ent_id": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "aggressor_ent_id": obj.AggressorEntId = n(data) case "defender_ent_id": obj.DefenderEntId = n(data) case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCollectionWarPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCollectionWar) (*HistoricalEventCollectionWar, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCollectionWar{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCompetition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCompetition, error) { var ( obj = &HistoricalEventCompetition{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "competitor_hfid": data = nil case "feature_layer_id": data = nil case "occasion_id": data = nil case "schedule_id": data = nil case "site_id": data = nil case "subregion_id": data = nil case "winner_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "competitor_hfid": obj.CompetitorHfid = append(obj.CompetitorHfid, n(data)) case "feature_layer_id": obj.FeatureLayerId = n(data) case "occasion_id": obj.OccasionId = n(data) case "schedule_id": obj.ScheduleId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "winner_hfid": obj.WinnerHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCompetitionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCompetition) (*HistoricalEventCompetition, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCompetition{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreateEntityPosition(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreateEntityPosition, error) { var ( obj = &HistoricalEventCreateEntityPosition{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreateEntityPositionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCreateEntityPosition) (*HistoricalEventCreateEntityPosition, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCreateEntityPosition{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ": data = nil case "histfig": data = nil case "position": data = nil case "reason": data = nil case "site_civ": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ": obj.Civ = n(data) case "histfig": obj.Histfig = n(data) case "position": obj.Position = string(data) case "reason": obj.Reason = parseHistoricalEventCreateEntityPositionReason(string(data)) case "site_civ": obj.SiteCiv = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedSite, error) { var ( obj = &HistoricalEventCreatedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "builder_hfid": data = nil case "civ_id": data = nil case "resident_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "builder_hfid": obj.BuilderHfid = n(data) case "civ_id": obj.CivId = n(data) case "resident_civ_id": obj.ResidentCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCreatedSite) (*HistoricalEventCreatedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCreatedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedStructure, error) { var ( obj = &HistoricalEventCreatedStructure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "builder_hfid": data = nil case "civ_id": data = nil case "rebuilt": data = nil case "site_civ_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "builder_hfid": obj.BuilderHfid = n(data) case "civ_id": obj.CivId = n(data) case "rebuilt": obj.Rebuilt = true case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatedStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCreatedStructure) (*HistoricalEventCreatedStructure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCreatedStructure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "builder_hf": data = nil case "civ": data = nil case "rebuild": data = nil case "site": data = nil case "site_civ": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "builder_hf": obj.BuilderHfid = n(data) case "civ": obj.CivId = n(data) case "rebuild": obj.Rebuild = parseHistoricalEventCreatedStructureRebuild(string(data)) case "site": obj.SiteId = n(data) case "site_civ": obj.SiteCivId = n(data) case "structure": obj.Structure = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatedWorldConstruction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatedWorldConstruction, error) { var ( obj = &HistoricalEventCreatedWorldConstruction{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "master_wcid": data = nil case "site_civ_id": data = nil case "site_id1": data = nil case "site_id2": data = nil case "wcid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "master_wcid": obj.MasterWcid = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id1": obj.SiteId1 = n(data) case "site_id2": obj.SiteId2 = n(data) case "wcid": obj.Wcid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatedWorldConstructionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCreatedWorldConstruction) (*HistoricalEventCreatedWorldConstruction, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCreatedWorldConstruction{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatureDevoured(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventCreatureDevoured, error) { var ( obj = &HistoricalEventCreatureDevoured{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventCreatureDevouredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventCreatureDevoured) (*HistoricalEventCreatureDevoured, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventCreatureDevoured{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "caste": data = nil case "eater": data = nil case "entity": data = nil case "race": data = nil case "site": data = nil case "victim": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "caste": obj.Caste = string(data) case "eater": obj.Eater = n(data) case "entity": obj.Entity = n(data) case "race": obj.Race = string(data) case "site": obj.SiteId = n(data) case "victim": obj.Victim = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventDanceFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDanceFormCreated, error) { var ( obj = &HistoricalEventDanceFormCreated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "circumstance": data = nil case "circumstance_id": data = nil case "form_id": data = nil case "hist_figure_id": data = nil case "reason": data = nil case "reason_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "circumstance": obj.Circumstance = parseHistoricalEventDanceFormCreatedCircumstance(string(data)) case "circumstance_id": obj.CircumstanceId = n(data) case "form_id": obj.FormId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "reason": obj.Reason = parseHistoricalEventDanceFormCreatedReason(string(data)) case "reason_id": obj.ReasonId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventDanceFormCreatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventDanceFormCreated) (*HistoricalEventDanceFormCreated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventDanceFormCreated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventDestroyedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDestroyedSite, error) { var ( obj = &HistoricalEventDestroyedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "no_defeat_mention": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "no_defeat_mention": obj.NoDefeatMention = true case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventDestroyedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventDestroyedSite) (*HistoricalEventDestroyedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventDestroyedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventDiplomatLost(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventDiplomatLost, error) { var ( obj = &HistoricalEventDiplomatLost{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventDiplomatLostPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventDiplomatLost) (*HistoricalEventDiplomatLost, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventDiplomatLost{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity": data = nil case "involved": data = nil case "site": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity": obj.Entity = n(data) case "involved": obj.Involved = n(data) case "site": obj.Site = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityAllianceFormed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityAllianceFormed, error) { var ( obj = &HistoricalEventEntityAllianceFormed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "initiating_enid": data = nil case "joining_enid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "initiating_enid": obj.InitiatingEnid = n(data) case "joining_enid": obj.JoiningEnid = append(obj.JoiningEnid, n(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityAllianceFormedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityAllianceFormed) (*HistoricalEventEntityAllianceFormed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityAllianceFormed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityBreachFeatureLayer(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityBreachFeatureLayer, error) { var ( obj = &HistoricalEventEntityBreachFeatureLayer{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_entity_id": data = nil case "feature_layer_id": data = nil case "site_entity_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_entity_id": obj.CivEntityId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_entity_id": obj.SiteEntityId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityBreachFeatureLayerPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityBreachFeatureLayer) (*HistoricalEventEntityBreachFeatureLayer, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityBreachFeatureLayer{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityCreated, error) { var ( obj = &HistoricalEventEntityCreated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "creator_hfid": data = nil case "entity_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "creator_hfid": obj.CreatorHfid = n(data) case "entity_id": obj.EntityId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityCreatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityCreated) (*HistoricalEventEntityCreated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityCreated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityDissolved(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityDissolved, error) { var ( obj = &HistoricalEventEntityDissolved{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "reason": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "reason": obj.Reason = parseHistoricalEventEntityDissolvedReason(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityDissolvedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityDissolved) (*HistoricalEventEntityDissolved, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityDissolved{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityEquipmentPurchase(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityEquipmentPurchase, error) { var ( obj = &HistoricalEventEntityEquipmentPurchase{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "new_equipment_level": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = append(obj.Hfid, n(data)) case "new_equipment_level": obj.NewEquipmentLevel = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityEquipmentPurchasePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityEquipmentPurchase) (*HistoricalEventEntityEquipmentPurchase, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityEquipmentPurchase{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityExpelsHf(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityExpelsHf, error) { var ( obj = &HistoricalEventEntityExpelsHf{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityExpelsHfPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityExpelsHf) (*HistoricalEventEntityExpelsHf, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityExpelsHf{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityFledSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityFledSite, error) { var ( obj = &HistoricalEventEntityFledSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "fled_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "fled_civ_id": obj.FledCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityFledSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityFledSite) (*HistoricalEventEntityFledSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityFledSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityIncorporated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityIncorporated, error) { var ( obj = &HistoricalEventEntityIncorporated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "joined_entity_id": data = nil case "joiner_entity_id": data = nil case "leader_hfid": data = nil case "partial_incorporation": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "joined_entity_id": obj.JoinedEntityId = n(data) case "joiner_entity_id": obj.JoinerEntityId = n(data) case "leader_hfid": obj.LeaderHfid = n(data) case "partial_incorporation": obj.PartialIncorporation = true case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityIncorporatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityIncorporated) (*HistoricalEventEntityIncorporated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityIncorporated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityLaw(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityLaw, error) { var ( obj = &HistoricalEventEntityLaw{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hist_figure_id": data = nil case "law_add": data = nil case "law_remove": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "law_add": obj.LawAdd = parseHistoricalEventEntityLawLawAdd(string(data)) case "law_remove": obj.LawRemove = parseHistoricalEventEntityLawLawRemove(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityLawPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityLaw) (*HistoricalEventEntityLaw, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityLaw{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityOverthrown(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityOverthrown, error) { var ( obj = &HistoricalEventEntityOverthrown{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "conspirator_hfid": data = nil case "entity_id": data = nil case "instigator_hfid": data = nil case "overthrown_hfid": data = nil case "pos_taker_hfid": data = nil case "position_profile_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "conspirator_hfid": obj.ConspiratorHfid = append(obj.ConspiratorHfid, n(data)) case "entity_id": obj.EntityId = n(data) case "instigator_hfid": obj.InstigatorHfid = n(data) case "overthrown_hfid": obj.OverthrownHfid = n(data) case "pos_taker_hfid": obj.PosTakerHfid = n(data) case "position_profile_id": obj.PositionProfileId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityOverthrownPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityOverthrown) (*HistoricalEventEntityOverthrown, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityOverthrown{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityPersecuted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityPersecuted, error) { var ( obj = &HistoricalEventEntityPersecuted{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "destroyed_structure_id": data = nil case "expelled_creature": data = nil case "expelled_hfid": data = nil case "expelled_number": data = nil case "expelled_pop_id": data = nil case "persecutor_enid": data = nil case "persecutor_hfid": data = nil case "property_confiscated_from_hfid": data = nil case "shrine_amount_destroyed": data = nil case "site_id": data = nil case "target_enid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "destroyed_structure_id": obj.DestroyedStructureId = n(data) case "expelled_creature": obj.ExpelledCreature = append(obj.ExpelledCreature, n(data)) case "expelled_hfid": obj.ExpelledHfid = append(obj.ExpelledHfid, n(data)) case "expelled_number": obj.ExpelledNumber = append(obj.ExpelledNumber, n(data)) case "expelled_pop_id": obj.ExpelledPopId = append(obj.ExpelledPopId, n(data)) case "persecutor_enid": obj.PersecutorEnid = n(data) case "persecutor_hfid": obj.PersecutorHfid = n(data) case "property_confiscated_from_hfid": obj.PropertyConfiscatedFromHfid = append(obj.PropertyConfiscatedFromHfid, n(data)) case "shrine_amount_destroyed": obj.ShrineAmountDestroyed = n(data) case "site_id": obj.SiteId = n(data) case "target_enid": obj.TargetEnid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityPersecutedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityPersecuted) (*HistoricalEventEntityPersecuted, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityPersecuted{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityPrimaryCriminals(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityPrimaryCriminals, error) { var ( obj = &HistoricalEventEntityPrimaryCriminals{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityPrimaryCriminalsPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityPrimaryCriminals) (*HistoricalEventEntityPrimaryCriminals, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityPrimaryCriminals{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "entity": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventEntityPrimaryCriminalsAction(string(data)) case "entity": obj.EntityId = n(data) case "site": obj.SiteId = n(data) case "structure": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityRampagedInSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityRampagedInSite, error) { var ( obj = &HistoricalEventEntityRampagedInSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "rampage_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "rampage_civ_id": obj.RampageCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityRampagedInSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityRampagedInSite) (*HistoricalEventEntityRampagedInSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityRampagedInSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityRelocate(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntityRelocate, error) { var ( obj = &HistoricalEventEntityRelocate{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntityRelocatePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntityRelocate) (*HistoricalEventEntityRelocate, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntityRelocate{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "entity": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventEntityRelocateAction(string(data)) case "entity": obj.EntityId = n(data) case "site": obj.SiteId = n(data) case "structure": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntitySearchedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventEntitySearchedSite, error) { var ( obj = &HistoricalEventEntitySearchedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "result": data = nil case "searcher_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "result": obj.Result = parseHistoricalEventEntitySearchedSiteResult(string(data)) case "searcher_civ_id": obj.SearcherCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventEntitySearchedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventEntitySearchedSite) (*HistoricalEventEntitySearchedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventEntitySearchedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFailedFrameAttempt(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFailedFrameAttempt, error) { var ( obj = &HistoricalEventFailedFrameAttempt{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "convicter_enid": data = nil case "crime": data = nil case "fooled_hfid": data = nil case "framer_hfid": data = nil case "plotter_hfid": data = nil case "target_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "convicter_enid": obj.ConvicterEnid = n(data) case "crime": obj.Crime = parseHistoricalEventFailedFrameAttemptCrime(string(data)) case "fooled_hfid": obj.FooledHfid = n(data) case "framer_hfid": obj.FramerHfid = n(data) case "plotter_hfid": obj.PlotterHfid = n(data) case "target_hfid": obj.TargetHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFailedFrameAttemptPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventFailedFrameAttempt) (*HistoricalEventFailedFrameAttempt, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventFailedFrameAttempt{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFailedIntrigueCorruption(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFailedIntrigueCorruption, error) { var ( obj = &HistoricalEventFailedIntrigueCorruption{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "ally_defense_bonus": data = nil case "coconspirator_bonus": data = nil case "corruptor_hfid": data = nil case "corruptor_identity": data = nil case "failed_judgment_test": data = nil case "feature_layer_id": data = nil case "lure_hfid": data = nil case "method": data = nil case "relevant_entity_id": data = nil case "relevant_id_for_method": data = nil case "relevant_position_profile_id": data = nil case "site_id": data = nil case "subregion_id": data = nil case "target_hfid": data = nil case "target_identity": data = nil case "top_facet": data = nil case "top_facet_modifier": data = nil case "top_facet_rating": data = nil case "top_relationship_factor": data = nil case "top_relationship_modifier": data = nil case "top_relationship_rating": data = nil case "top_value": data = nil case "top_value_modifier": data = nil case "top_value_rating": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventFailedIntrigueCorruptionAction(string(data)) case "ally_defense_bonus": obj.AllyDefenseBonus = n(data) case "coconspirator_bonus": obj.CoconspiratorBonus = n(data) case "corruptor_hfid": obj.CorruptorHfid = n(data) case "corruptor_identity": obj.CorruptorIdentity = n(data) case "failed_judgment_test": obj.FailedJudgmentTest = true case "feature_layer_id": obj.FeatureLayerId = n(data) case "lure_hfid": obj.LureHfid = n(data) case "method": obj.Method = parseHistoricalEventFailedIntrigueCorruptionMethod(string(data)) case "relevant_entity_id": obj.RelevantEntityId = n(data) case "relevant_id_for_method": obj.RelevantIdForMethod = n(data) case "relevant_position_profile_id": obj.RelevantPositionProfileId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "target_hfid": obj.TargetHfid = n(data) case "target_identity": obj.TargetIdentity = n(data) case "top_facet": obj.TopFacet = parseHistoricalEventFailedIntrigueCorruptionTopFacet(string(data)) case "top_facet_modifier": obj.TopFacetModifier = n(data) case "top_facet_rating": obj.TopFacetRating = n(data) case "top_relationship_factor": obj.TopRelationshipFactor = parseHistoricalEventFailedIntrigueCorruptionTopRelationshipFactor(string(data)) case "top_relationship_modifier": obj.TopRelationshipModifier = n(data) case "top_relationship_rating": obj.TopRelationshipRating = n(data) case "top_value": obj.TopValue = parseHistoricalEventFailedIntrigueCorruptionTopValue(string(data)) case "top_value_modifier": obj.TopValueModifier = n(data) case "top_value_rating": obj.TopValueRating = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFailedIntrigueCorruptionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventFailedIntrigueCorruption) (*HistoricalEventFailedIntrigueCorruption, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventFailedIntrigueCorruption{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFieldBattle(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFieldBattle, error) { var ( obj = &HistoricalEventFieldBattle{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "a_support_merc_enid": data = nil case "attacker_civ_id": data = nil case "attacker_general_hfid": data = nil case "attacker_merc_enid": data = nil case "coords": data = nil case "d_support_merc_enid": data = nil case "defender_civ_id": data = nil case "defender_general_hfid": data = nil case "defender_merc_enid": data = nil case "feature_layer_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "a_support_merc_enid": obj.ASupportMercEnid = n(data) case "attacker_civ_id": obj.AttackerCivId = n(data) case "attacker_general_hfid": obj.AttackerGeneralHfid = n(data) case "attacker_merc_enid": obj.AttackerMercEnid = n(data) case "coords": obj.Coords = string(data) case "d_support_merc_enid": obj.DSupportMercEnid = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "defender_general_hfid": obj.DefenderGeneralHfid = n(data) case "defender_merc_enid": obj.DefenderMercEnid = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFieldBattlePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventFieldBattle) (*HistoricalEventFieldBattle, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventFieldBattle{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFirstContact(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventFirstContact, error) { var ( obj = &HistoricalEventFirstContact{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "contacted_enid": data = nil case "contactor_enid": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "contacted_enid": obj.ContactedEnid = n(data) case "contactor_enid": obj.ContactorEnid = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventFirstContactPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventFirstContact) (*HistoricalEventFirstContact, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventFirstContact{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventGamble(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventGamble, error) { var ( obj = &HistoricalEventGamble{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "gambler_hfid": data = nil case "new_account": data = nil case "old_account": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "gambler_hfid": obj.GamblerHfid = n(data) case "new_account": obj.NewAccount = n(data) case "old_account": obj.OldAccount = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventGamblePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventGamble) (*HistoricalEventGamble, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventGamble{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfAbducted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfAbducted, error) { var ( obj = &HistoricalEventHfAbducted{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "site_id": data = nil case "snatcher_hfid": data = nil case "subregion_id": data = nil case "target_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "snatcher_hfid": obj.SnatcherHfid = n(data) case "subregion_id": obj.SubregionId = n(data) case "target_hfid": obj.TargetHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfAbductedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfAbducted) (*HistoricalEventHfAbducted, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfAbducted{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfAttackedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfAttackedSite, error) { var ( obj = &HistoricalEventHfAttackedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_hfid": data = nil case "defender_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_hfid": obj.AttackerHfid = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfAttackedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfAttackedSite) (*HistoricalEventHfAttackedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfAttackedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfConfronted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfConfronted, error) { var ( obj = &HistoricalEventHfConfronted{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "feature_layer_id": data = nil case "hfid": data = nil case "reason": data = nil case "site_id": data = nil case "situation": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hfid": obj.Hfid = n(data) case "reason": obj.Reason = append(obj.Reason, parseHistoricalEventHfConfrontedReason(string(data))) case "site_id": obj.SiteId = n(data) case "situation": obj.Situation = parseHistoricalEventHfConfrontedSituation(string(data)) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfConfrontedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfConfronted) (*HistoricalEventHfConfronted, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfConfronted{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfConvicted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfConvicted, error) { var ( obj = &HistoricalEventHfConvicted{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "beating": data = nil case "coconspirator_hfid": data = nil case "confessed_after_apb_arrest_enid": data = nil case "contact_hfid": data = nil case "convict_is_contact": data = nil case "convicted_hfid": data = nil case "convicter_enid": data = nil case "corrupt_convicter_hfid": data = nil case "crime": data = nil case "death_penalty": data = nil case "did_not_reveal_all_in_interrogation": data = nil case "exiled": data = nil case "fooled_hfid": data = nil case "framer_hfid": data = nil case "hammerstrokes": data = nil case "held_firm_in_interrogation": data = nil case "implicated_hfid": data = nil case "interrogator_hfid": data = nil case "no_prison_available": data = nil case "plotter_hfid": data = nil case "prison_months": data = nil case "surveiled_coconspirator": data = nil case "surveiled_contact": data = nil case "surveiled_convicted": data = nil case "surveiled_target": data = nil case "target_hfid": data = nil case "wrongful_conviction": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "beating": obj.Beating = true case "coconspirator_hfid": obj.CoconspiratorHfid = n(data) case "confessed_after_apb_arrest_enid": obj.ConfessedAfterApbArrestEnid = n(data) case "contact_hfid": obj.ContactHfid = n(data) case "convict_is_contact": obj.ConvictIsContact = true case "convicted_hfid": obj.ConvictedHfid = n(data) case "convicter_enid": obj.ConvicterEnid = n(data) case "corrupt_convicter_hfid": obj.CorruptConvicterHfid = n(data) case "crime": obj.Crime = parseHistoricalEventHfConvictedCrime(string(data)) case "death_penalty": obj.DeathPenalty = true case "did_not_reveal_all_in_interrogation": obj.DidNotRevealAllInInterrogation = true case "exiled": obj.Exiled = true case "fooled_hfid": obj.FooledHfid = n(data) case "framer_hfid": obj.FramerHfid = n(data) case "hammerstrokes": obj.Hammerstrokes = n(data) case "held_firm_in_interrogation": obj.HeldFirmInInterrogation = true case "implicated_hfid": obj.ImplicatedHfid = append(obj.ImplicatedHfid, n(data)) case "interrogator_hfid": obj.InterrogatorHfid = n(data) case "no_prison_available": obj.NoPrisonAvailable = true case "plotter_hfid": obj.PlotterHfid = n(data) case "prison_months": obj.PrisonMonths = n(data) case "surveiled_coconspirator": obj.SurveiledCoconspirator = true case "surveiled_contact": obj.SurveiledContact = true case "surveiled_convicted": obj.SurveiledConvicted = true case "surveiled_target": obj.SurveiledTarget = true case "target_hfid": obj.TargetHfid = n(data) case "wrongful_conviction": obj.WrongfulConviction = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfConvictedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfConvicted) (*HistoricalEventHfConvicted, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfConvicted{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDestroyedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDestroyedSite, error) { var ( obj = &HistoricalEventHfDestroyedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_hfid": data = nil case "defender_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_hfid": obj.AttackerHfid = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDestroyedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfDestroyedSite) (*HistoricalEventHfDestroyedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfDestroyedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDied, error) { var ( obj = &HistoricalEventHfDied{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "cause": data = nil case "feature_layer_id": data = nil case "hfid": data = nil case "site_id": data = nil case "slayer_caste": data = nil case "slayer_hfid": data = nil case "slayer_item_id": data = nil case "slayer_race": data = nil case "slayer_shooter_item_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "cause": obj.Cause = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "slayer_caste": obj.SlayerCaste = string(data) case "slayer_hfid": obj.SlayerHfid = n(data) case "slayer_item_id": obj.SlayerItemId = n(data) case "slayer_race": obj.SlayerRace = string(data) case "slayer_shooter_item_id": obj.SlayerShooterItemId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDiedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfDied) (*HistoricalEventHfDied, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfDied{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "death_cause": data = nil case "item": data = nil case "item_subtype": data = nil case "item_type": data = nil case "mat": data = nil case "site": data = nil case "slayer_caste": data = nil case "slayer_hf": data = nil case "slayer_race": data = nil case "victim_hf": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.SlayerItemId = n(data) case "death_cause": obj.DeathCause = parseHistoricalEventHfDiedDeathCause(string(data)) case "item": obj.SlayerItemId = n(data) case "item_subtype": obj.ItemSubtype = parseHistoricalEventHfDiedItemSubtype(string(data)) case "item_type": obj.ItemType = parseHistoricalEventHfDiedItemType(string(data)) case "mat": obj.Mat = parseHistoricalEventHfDiedMat(string(data)) case "site": obj.SiteId = n(data) case "slayer_caste": obj.SlayerCaste = string(data) case "slayer_hf": obj.SlayerHfid = n(data) case "slayer_race": obj.SlayerRace = string(data) case "victim_hf": obj.Hfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDisturbedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDisturbedStructure, error) { var ( obj = &HistoricalEventHfDisturbedStructure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hist_fig_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hist_fig_id": obj.HistFigId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDisturbedStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfDisturbedStructure) (*HistoricalEventHfDisturbedStructure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfDisturbedStructure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "histfig": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventHfDisturbedStructureAction(string(data)) case "histfig": obj.HistFigId = n(data) case "site": obj.SiteId = n(data) case "structure": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDoesInteraction(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfDoesInteraction, error) { var ( obj = &HistoricalEventHfDoesInteraction{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "doer_hfid": data = nil case "interaction": data = nil case "target_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "doer_hfid": obj.DoerHfid = n(data) case "interaction": obj.Interaction = string(data) case "target_hfid": obj.TargetHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfDoesInteractionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfDoesInteraction) (*HistoricalEventHfDoesInteraction, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfDoesInteraction{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "doer": data = nil case "interaction_action": data = nil case "region": data = nil case "site": data = nil case "source": data = nil case "target": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "doer": obj.DoerHfid = n(data) case "interaction_action": obj.InteractionAction = string(data) case "region": obj.Region = n(data) case "site": obj.Site = n(data) case "source": obj.Source = n(data) case "target": obj.TargetHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfEnslaved(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfEnslaved, error) { var ( obj = &HistoricalEventHfEnslaved{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "enslaved_hfid": data = nil case "moved_to_site_id": data = nil case "payer_entity_id": data = nil case "seller_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "enslaved_hfid": obj.EnslavedHfid = n(data) case "moved_to_site_id": obj.MovedToSiteId = n(data) case "payer_entity_id": obj.PayerEntityId = n(data) case "seller_hfid": obj.SellerHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfEnslavedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfEnslaved) (*HistoricalEventHfEnslaved, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfEnslaved{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfEquipmentPurchase(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfEquipmentPurchase, error) { var ( obj = &HistoricalEventHfEquipmentPurchase{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "group_hfid": data = nil case "quality": data = nil case "site_id": data = nil case "structure_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_hfid": obj.GroupHfid = n(data) case "quality": obj.Quality = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfEquipmentPurchasePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfEquipmentPurchase) (*HistoricalEventHfEquipmentPurchase, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfEquipmentPurchase{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfFreed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfFreed, error) { var ( obj = &HistoricalEventHfFreed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "freeing_hfid": data = nil case "holding_civ_id": data = nil case "rescued_hfid": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "freeing_hfid": obj.FreeingHfid = n(data) case "holding_civ_id": obj.HoldingCivId = n(data) case "rescued_hfid": obj.RescuedHfid = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfFreedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfFreed) (*HistoricalEventHfFreed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfFreed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfGainsSecretGoal(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfGainsSecretGoal, error) { var ( obj = &HistoricalEventHfGainsSecretGoal{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hfid": data = nil case "secret_goal": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hfid": obj.Hfid = n(data) case "secret_goal": obj.SecretGoal = parseHistoricalEventHfGainsSecretGoalSecretGoal(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfGainsSecretGoalPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfGainsSecretGoal) (*HistoricalEventHfGainsSecretGoal, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfGainsSecretGoal{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfInterrogated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfInterrogated, error) { var ( obj = &HistoricalEventHfInterrogated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "arresting_enid": data = nil case "held_firm_in_interrogation": data = nil case "implicated_hfid": data = nil case "interrogator_hfid": data = nil case "target_hfid": data = nil case "wanted_and_recognized": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "arresting_enid": obj.ArrestingEnid = n(data) case "held_firm_in_interrogation": obj.HeldFirmInInterrogation = true case "implicated_hfid": obj.ImplicatedHfid = n(data) case "interrogator_hfid": obj.InterrogatorHfid = n(data) case "target_hfid": obj.TargetHfid = n(data) case "wanted_and_recognized": obj.WantedAndRecognized = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfInterrogatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfInterrogated) (*HistoricalEventHfInterrogated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfInterrogated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfLearnsSecret(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfLearnsSecret, error) { var ( obj = &HistoricalEventHfLearnsSecret{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "interaction": data = nil case "student_hfid": data = nil case "teacher_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "interaction": obj.Interaction = string(data) case "student_hfid": obj.StudentHfid = n(data) case "teacher_hfid": obj.TeacherHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfLearnsSecretPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfLearnsSecret) (*HistoricalEventHfLearnsSecret, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfLearnsSecret{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact": data = nil case "secret_text": data = nil case "student": data = nil case "teacher": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact": obj.ArtifactId = n(data) case "secret_text": obj.SecretText = parseHistoricalEventHfLearnsSecretSecretText(string(data)) case "student": obj.StudentHfid = n(data) case "teacher": obj.TeacherHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfNewPet(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfNewPet, error) { var ( obj = &HistoricalEventHfNewPet{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "feature_layer_id": data = nil case "group_hfid": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_hfid": obj.GroupHfid = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfNewPetPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfNewPet) (*HistoricalEventHfNewPet, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfNewPet{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "group": data = nil case "pets": data = nil case "site": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "group": obj.GroupHfid = n(data) case "pets": obj.Pets = string(data) case "site": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfPerformedHorribleExperiments(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPerformedHorribleExperiments, error) { var ( obj = &HistoricalEventHfPerformedHorribleExperiments{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "group_hfid": data = nil case "site_id": data = nil case "structure_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_hfid": obj.GroupHfid = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfPerformedHorribleExperimentsPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfPerformedHorribleExperiments) (*HistoricalEventHfPerformedHorribleExperiments, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfPerformedHorribleExperiments{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfPrayedInsideStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPrayedInsideStructure, error) { var ( obj = &HistoricalEventHfPrayedInsideStructure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hist_fig_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hist_fig_id": obj.HistFigId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfPrayedInsideStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfPrayedInsideStructure) (*HistoricalEventHfPrayedInsideStructure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfPrayedInsideStructure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "histfig": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventHfPrayedInsideStructureAction(string(data)) case "histfig": obj.HistFigId = n(data) case "site": obj.SiteId = n(data) case "structure": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfPreach(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfPreach, error) { var ( obj = &HistoricalEventHfPreach{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_1": data = nil case "entity_2": data = nil case "site_hfid": data = nil case "speaker_hfid": data = nil case "topic": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_1": obj.Entity1 = n(data) case "entity_2": obj.Entity2 = n(data) case "site_hfid": obj.SiteHfid = n(data) case "speaker_hfid": obj.SpeakerHfid = n(data) case "topic": obj.Topic = parseHistoricalEventHfPreachTopic(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfPreachPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfPreach) (*HistoricalEventHfPreach, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfPreach{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfProfanedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfProfanedStructure, error) { var ( obj = &HistoricalEventHfProfanedStructure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hist_fig_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hist_fig_id": obj.HistFigId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfProfanedStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfProfanedStructure) (*HistoricalEventHfProfanedStructure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfProfanedStructure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "histfig": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventHfProfanedStructureAction(string(data)) case "histfig": obj.HistFigId = n(data) case "site": obj.SiteId = n(data) case "structure": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRansomed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRansomed, error) { var ( obj = &HistoricalEventHfRansomed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "moved_to_site_id": data = nil case "payer_entity_id": data = nil case "payer_hfid": data = nil case "ransomed_hfid": data = nil case "ransomer_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "moved_to_site_id": obj.MovedToSiteId = n(data) case "payer_entity_id": obj.PayerEntityId = n(data) case "payer_hfid": obj.PayerHfid = n(data) case "ransomed_hfid": obj.RansomedHfid = n(data) case "ransomer_hfid": obj.RansomerHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRansomedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfRansomed) (*HistoricalEventHfRansomed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfRansomed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfReachSummit(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfReachSummit, error) { var ( obj = &HistoricalEventHfReachSummit{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "feature_layer_id": data = nil case "group_hfid": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_hfid": obj.GroupHfid = append(obj.GroupHfid, n(data)) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfReachSummitPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfReachSummit) (*HistoricalEventHfReachSummit, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfReachSummit{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRecruitedUnitTypeForEntity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) { var ( obj = &HistoricalEventHfRecruitedUnitTypeForEntity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "feature_layer_id": data = nil case "hfid": data = nil case "site_id": data = nil case "subregion_id": data = nil case "unit_type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "unit_type": obj.UnitType = parseHistoricalEventHfRecruitedUnitTypeForEntityUnitType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRecruitedUnitTypeForEntityPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfRecruitedUnitTypeForEntity) (*HistoricalEventHfRecruitedUnitTypeForEntity, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfRecruitedUnitTypeForEntity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRelationshipDenied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRelationshipDenied, error) { var ( obj = &HistoricalEventHfRelationshipDenied{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "reason": data = nil case "reason_id": data = nil case "relationship": data = nil case "seeker_hfid": data = nil case "site_id": data = nil case "subregion_id": data = nil case "target_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "reason": obj.Reason = parseHistoricalEventHfRelationshipDeniedReason(string(data)) case "reason_id": obj.ReasonId = n(data) case "relationship": obj.Relationship = parseHistoricalEventHfRelationshipDeniedRelationship(string(data)) case "seeker_hfid": obj.SeekerHfid = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "target_hfid": obj.TargetHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRelationshipDeniedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfRelationshipDenied) (*HistoricalEventHfRelationshipDenied, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfRelationshipDenied{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfReunion(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfReunion, error) { var ( obj = &HistoricalEventHfReunion{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "group_1_hfid": data = nil case "group_2_hfid": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_1_hfid": obj.Group1Hfid = n(data) case "group_2_hfid": obj.Group2Hfid = append(obj.Group2Hfid, n(data)) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfReunionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfReunion) (*HistoricalEventHfReunion, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfReunion{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRevived(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfRevived, error) { var ( obj = &HistoricalEventHfRevived{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "actor_hfid": data = nil case "disturbance": data = nil case "feature_layer_id": data = nil case "ghost": data = nil case "hfid": data = nil case "raised_before": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "actor_hfid": obj.ActorHfid = n(data) case "disturbance": obj.Disturbance = true case "feature_layer_id": obj.FeatureLayerId = n(data) case "ghost": obj.Ghost = parseHistoricalEventHfRevivedGhost(string(data)) case "hfid": obj.Hfid = n(data) case "raised_before": obj.RaisedBefore = true case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfRevivedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfRevived) (*HistoricalEventHfRevived, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfRevived{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfSimpleBattleEvent(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfSimpleBattleEvent, error) { var ( obj = &HistoricalEventHfSimpleBattleEvent{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "group_1_hfid": data = nil case "group_2_hfid": data = nil case "site_id": data = nil case "subregion_id": data = nil case "subtype": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_1_hfid": obj.Group1Hfid = n(data) case "group_2_hfid": obj.Group2Hfid = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "subtype": obj.Subtype = parseHistoricalEventHfSimpleBattleEventSubtype(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfSimpleBattleEventPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfSimpleBattleEvent) (*HistoricalEventHfSimpleBattleEvent, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfSimpleBattleEvent{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfTravel(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfTravel, error) { var ( obj = &HistoricalEventHfTravel{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "feature_layer_id": data = nil case "group_hfid": data = nil case "return": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "group_hfid": obj.GroupHfid = append(obj.GroupHfid, n(data)) case "return": obj.Return = true case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfTravelPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfTravel) (*HistoricalEventHfTravel, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfTravel{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfViewedArtifact(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfViewedArtifact, error) { var ( obj = &HistoricalEventHfViewedArtifact{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artifact_id": data = nil case "hist_fig_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artifact_id": obj.ArtifactId = n(data) case "hist_fig_id": obj.HistFigId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfViewedArtifactPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfViewedArtifact) (*HistoricalEventHfViewedArtifact, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfViewedArtifact{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfWounded(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfWounded, error) { var ( obj = &HistoricalEventHfWounded{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "site_id": data = nil case "subregion_id": data = nil case "was_torture": data = nil case "woundee_hfid": data = nil case "wounder_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "was_torture": obj.WasTorture = true case "woundee_hfid": obj.WoundeeHfid = n(data) case "wounder_hfid": obj.WounderHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfWoundedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfWounded) (*HistoricalEventHfWounded, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfWounded{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "body_part": data = nil case "injury_type": data = nil case "part_lost": data = nil case "site": data = nil case "woundee": data = nil case "woundee_caste": data = nil case "woundee_race": data = nil case "wounder": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "body_part": obj.BodyPart = n(data) case "injury_type": obj.InjuryType = parseHistoricalEventHfWoundedInjuryType(string(data)) case "part_lost": obj.PartLost = parseHistoricalEventHfWoundedPartLost(string(data)) case "site": obj.SiteId = n(data) case "woundee": obj.WoundeeHfid = n(data) case "woundee_caste": obj.WoundeeCaste = n(data) case "woundee_race": obj.WoundeeRace = n(data) case "wounder": obj.WounderHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfsFormedIntrigueRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfsFormedIntrigueRelationship, error) { var ( obj = &HistoricalEventHfsFormedIntrigueRelationship{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "action": data = nil case "ally_defense_bonus": data = nil case "circumstance": data = nil case "circumstance_id": data = nil case "coconspirator_bonus": data = nil case "corruptor_hfid": data = nil case "corruptor_identity": data = nil case "corruptor_seen_as": data = nil case "failed_judgment_test": data = nil case "feature_layer_id": data = nil case "lure_hfid": data = nil case "method": data = nil case "relevant_entity_id": data = nil case "relevant_id_for_method": data = nil case "relevant_position_profile_id": data = nil case "site_id": data = nil case "subregion_id": data = nil case "successful": data = nil case "target_hfid": data = nil case "target_identity": data = nil case "target_seen_as": data = nil case "top_facet": data = nil case "top_facet_modifier": data = nil case "top_facet_rating": data = nil case "top_relationship_factor": data = nil case "top_relationship_modifier": data = nil case "top_relationship_rating": data = nil case "top_value": data = nil case "top_value_modifier": data = nil case "top_value_rating": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "action": obj.Action = parseHistoricalEventHfsFormedIntrigueRelationshipAction(string(data)) case "ally_defense_bonus": obj.AllyDefenseBonus = n(data) case "circumstance": obj.Circumstance = parseHistoricalEventHfsFormedIntrigueRelationshipCircumstance(string(data)) case "circumstance_id": obj.CircumstanceId = n(data) case "coconspirator_bonus": obj.CoconspiratorBonus = n(data) case "corruptor_hfid": obj.CorruptorHfid = n(data) case "corruptor_identity": obj.CorruptorIdentity = n(data) case "corruptor_seen_as": obj.CorruptorSeenAs = parseHistoricalEventHfsFormedIntrigueRelationshipCorruptorSeenAs(string(data)) case "failed_judgment_test": obj.FailedJudgmentTest = true case "feature_layer_id": obj.FeatureLayerId = n(data) case "lure_hfid": obj.LureHfid = n(data) case "method": obj.Method = parseHistoricalEventHfsFormedIntrigueRelationshipMethod(string(data)) case "relevant_entity_id": obj.RelevantEntityId = n(data) case "relevant_id_for_method": obj.RelevantIdForMethod = n(data) case "relevant_position_profile_id": obj.RelevantPositionProfileId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "successful": obj.Successful = true case "target_hfid": obj.TargetHfid = n(data) case "target_identity": obj.TargetIdentity = n(data) case "target_seen_as": obj.TargetSeenAs = parseHistoricalEventHfsFormedIntrigueRelationshipTargetSeenAs(string(data)) case "top_facet": obj.TopFacet = parseHistoricalEventHfsFormedIntrigueRelationshipTopFacet(string(data)) case "top_facet_modifier": obj.TopFacetModifier = n(data) case "top_facet_rating": obj.TopFacetRating = n(data) case "top_relationship_factor": obj.TopRelationshipFactor = parseHistoricalEventHfsFormedIntrigueRelationshipTopRelationshipFactor(string(data)) case "top_relationship_modifier": obj.TopRelationshipModifier = n(data) case "top_relationship_rating": obj.TopRelationshipRating = n(data) case "top_value": obj.TopValue = parseHistoricalEventHfsFormedIntrigueRelationshipTopValue(string(data)) case "top_value_modifier": obj.TopValueModifier = n(data) case "top_value_rating": obj.TopValueRating = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfsFormedIntrigueRelationshipPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfsFormedIntrigueRelationship) (*HistoricalEventHfsFormedIntrigueRelationship, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfsFormedIntrigueRelationship{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfsFormedReputationRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHfsFormedReputationRelationship, error) { var ( obj = &HistoricalEventHfsFormedReputationRelationship{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature_layer_id": data = nil case "hf_rep_1_of_2": data = nil case "hf_rep_2_of_1": data = nil case "hfid1": data = nil case "hfid2": data = nil case "identity_id1": data = nil case "identity_id2": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature_layer_id": obj.FeatureLayerId = n(data) case "hf_rep_1_of_2": obj.HfRep1Of2 = parseHistoricalEventHfsFormedReputationRelationshipHfRep1Of2(string(data)) case "hf_rep_2_of_1": obj.HfRep2Of1 = parseHistoricalEventHfsFormedReputationRelationshipHfRep2Of1(string(data)) case "hfid1": obj.Hfid1 = n(data) case "hfid2": obj.Hfid2 = n(data) case "identity_id1": obj.IdentityId1 = n(data) case "identity_id2": obj.IdentityId2 = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHfsFormedReputationRelationshipPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHfsFormedReputationRelationship) (*HistoricalEventHfsFormedReputationRelationship, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHfsFormedReputationRelationship{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHolyCityDeclaration(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventHolyCityDeclaration, error) { var ( obj = &HistoricalEventHolyCityDeclaration{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "religion_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "religion_id": obj.ReligionId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventHolyCityDeclarationPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventHolyCityDeclaration) (*HistoricalEventHolyCityDeclaration, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventHolyCityDeclaration{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventInsurrectionStarted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventInsurrectionStarted, error) { var ( obj = &HistoricalEventInsurrectionStarted{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "outcome": data = nil case "site_id": data = nil case "target_civ_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "outcome": obj.Outcome = parseHistoricalEventInsurrectionStartedOutcome(string(data)) case "site_id": obj.SiteId = n(data) case "target_civ_id": obj.TargetCivId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventInsurrectionStartedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventInsurrectionStarted) (*HistoricalEventInsurrectionStarted, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventInsurrectionStarted{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventItemStolen(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventItemStolen, error) { var ( obj = &HistoricalEventItemStolen{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "circumstance": v, _ := parseHistoricalEventItemStolenCircumstance(d, &t) obj.Circumstance = v case "circumstance_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "circumstance": case "circumstance_id": obj.CircumstanceId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventItemStolenPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventItemStolen) (*HistoricalEventItemStolen, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventItemStolen{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "circumstance": v, _ := parseHistoricalEventItemStolenCircumstancePlus(d, &t, &HistoricalEventItemStolenCircumstance{}) obj.Circumstance = v case "entity": data = nil case "histfig": data = nil case "item": data = nil case "item_subtype": data = nil case "item_type": data = nil case "mat": data = nil case "matindex": data = nil case "mattype": data = nil case "site": data = nil case "stash_site": data = nil case "structure": data = nil case "theft_method": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "circumstance": case "entity": obj.Entity = n(data) case "histfig": obj.Histfig = n(data) case "item": obj.Item = n(data) case "item_subtype": obj.ItemSubtype = string(data) case "item_type": obj.ItemType = string(data) case "mat": obj.Mat = string(data) case "matindex": obj.Matindex = n(data) case "mattype": obj.Mattype = n(data) case "site": obj.Site = n(data) case "stash_site": obj.StashSite = n(data) case "structure": obj.Structure = n(data) case "theft_method": obj.TheftMethod = parseHistoricalEventItemStolenTheftMethod(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventItemStolenCircumstance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventItemStolenCircumstance, error) { var ( obj = &HistoricalEventItemStolenCircumstance{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventItemStolenCircumstancePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventItemStolenCircumstance) (*HistoricalEventItemStolenCircumstance, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventItemStolenCircumstance{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "defeated": data = nil case "hist_event_collection": data = nil case "murdered": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "defeated": obj.Defeated = n(data) case "hist_event_collection": obj.HistEventCollection = n(data) case "murdered": obj.Murdered = n(data) case "type": obj.Type = parseHistoricalEventItemStolenCircumstanceType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventKnowledgeDiscovered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventKnowledgeDiscovered, error) { var ( obj = &HistoricalEventKnowledgeDiscovered{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "first": data = nil case "hfid": data = nil case "knowledge": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "first": obj.First = true case "hfid": obj.Hfid = n(data) case "knowledge": obj.Knowledge = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventKnowledgeDiscoveredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventKnowledgeDiscovered) (*HistoricalEventKnowledgeDiscovered, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventKnowledgeDiscovered{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceArchConstructed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMasterpieceArchConstructed, error) { var ( obj = &HistoricalEventMasterpieceArchConstructed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "site_id": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "skill_at_time": obj.SkillAtTime = parseHistoricalEventMasterpieceArchConstructedSkillAtTime(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceArchConstructedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMasterpieceArchConstructed) (*HistoricalEventMasterpieceArchConstructed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMasterpieceArchConstructed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "building_custom": data = nil case "building_subtype": data = nil case "building_type": data = nil case "maker": data = nil case "maker_entity": data = nil case "site": data = nil case "skill_at_time": data = nil case "unk_2": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "building_custom": obj.BuildingCustom = n(data) case "building_subtype": obj.BuildingSubtype = parseHistoricalEventMasterpieceArchConstructedBuildingSubtype(string(data)) case "building_type": obj.BuildingType = parseHistoricalEventMasterpieceArchConstructedBuildingType(string(data)) case "maker": obj.Maker = n(data) case "maker_entity": obj.MakerEntity = n(data) case "site": obj.Site = n(data) case "skill_at_time": obj.SkillAtTime = parseHistoricalEventMasterpieceArchConstructedSkillAtTime(string(data)) case "unk_2": obj.Unk2 = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceEngraving(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMasterpieceEngraving, error) { var ( obj = &HistoricalEventMasterpieceEngraving{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "site_id": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "skill_at_time": obj.SkillAtTime = parseHistoricalEventMasterpieceEngravingSkillAtTime(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceEngravingPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMasterpieceEngraving) (*HistoricalEventMasterpieceEngraving, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMasterpieceEngraving{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "art_id": data = nil case "art_subid": data = nil case "maker": data = nil case "maker_entity": data = nil case "site": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "art_id": obj.ArtId = n(data) case "art_subid": obj.ArtSubid = n(data) case "maker": obj.Maker = n(data) case "maker_entity": obj.MakerEntity = n(data) case "site": obj.Site = n(data) case "skill_at_time": obj.SkillAtTime = parseHistoricalEventMasterpieceEngravingSkillAtTime(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceFood(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMasterpieceFood, error) { var ( obj = &HistoricalEventMasterpieceFood{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "site_id": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "skill_at_time": obj.SkillAtTime = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceFoodPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMasterpieceFood) (*HistoricalEventMasterpieceFood, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMasterpieceFood{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceItem(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMasterpieceItem, error) { var ( obj = &HistoricalEventMasterpieceItem{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "site_id": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "skill_at_time": obj.SkillAtTime = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceItemPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMasterpieceItem) (*HistoricalEventMasterpieceItem, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMasterpieceItem{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "item_id": data = nil case "item_subtype": data = nil case "item_type": data = nil case "maker": data = nil case "maker_entity": data = nil case "mat": data = nil case "site": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "item_id": obj.ItemId = n(data) case "item_subtype": obj.ItemSubtype = parseHistoricalEventMasterpieceItemItemSubtype(string(data)) case "item_type": obj.ItemType = parseHistoricalEventMasterpieceItemItemType(string(data)) case "maker": obj.Maker = n(data) case "maker_entity": obj.MakerEntity = n(data) case "mat": obj.Mat = string(data) case "site": obj.Site = n(data) case "skill_at_time": obj.SkillAtTime = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceItemImprovement(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMasterpieceItemImprovement, error) { var ( obj = &HistoricalEventMasterpieceItemImprovement{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "hfid": data = nil case "site_id": data = nil case "skill_at_time": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "hfid": obj.Hfid = n(data) case "site_id": obj.SiteId = n(data) case "skill_at_time": obj.SkillAtTime = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceItemImprovementPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMasterpieceItemImprovement) (*HistoricalEventMasterpieceItemImprovement, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMasterpieceItemImprovement{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceLost(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMasterpieceLost, error) { var ( obj = &HistoricalEventMasterpieceLost{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMasterpieceLostPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMasterpieceLost) (*HistoricalEventMasterpieceLost, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMasterpieceLost{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "creation_event": data = nil case "histfig": data = nil case "method": data = nil case "site": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "creation_event": obj.CreationEvent = n(data) case "histfig": obj.Histfig = n(data) case "method": obj.Method = parseHistoricalEventMasterpieceLostMethod(string(data)) case "site": obj.Site = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMerchant(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMerchant, error) { var ( obj = &HistoricalEventMerchant{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "depot_entity_id": data = nil case "hardship": data = nil case "lost_value": data = nil case "site_id": data = nil case "trader_entity_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "depot_entity_id": obj.DepotEntityId = n(data) case "hardship": obj.Hardship = true case "lost_value": obj.LostValue = true case "site_id": obj.SiteId = n(data) case "trader_entity_id": obj.TraderEntityId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMerchantPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMerchant) (*HistoricalEventMerchant, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMerchant{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "destination": data = nil case "site": data = nil case "source": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "destination": obj.Destination = n(data) case "site": obj.Site = n(data) case "source": obj.Source = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventModifiedBuilding(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventModifiedBuilding, error) { var ( obj = &HistoricalEventModifiedBuilding{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "modification": data = nil case "modifier_hfid": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "modification": obj.Modification = parseHistoricalEventModifiedBuildingModification(string(data)) case "modifier_hfid": obj.ModifierHfid = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventModifiedBuildingPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventModifiedBuilding) (*HistoricalEventModifiedBuilding, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventModifiedBuilding{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMusicalFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventMusicalFormCreated, error) { var ( obj = &HistoricalEventMusicalFormCreated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "circumstance": data = nil case "circumstance_id": data = nil case "form_id": data = nil case "hist_figure_id": data = nil case "reason": data = nil case "reason_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "circumstance": obj.Circumstance = parseHistoricalEventMusicalFormCreatedCircumstance(string(data)) case "circumstance_id": obj.CircumstanceId = n(data) case "form_id": obj.FormId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "reason": obj.Reason = parseHistoricalEventMusicalFormCreatedReason(string(data)) case "reason_id": obj.ReasonId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventMusicalFormCreatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventMusicalFormCreated) (*HistoricalEventMusicalFormCreated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventMusicalFormCreated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventNewSiteLeader(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventNewSiteLeader, error) { var ( obj = &HistoricalEventNewSiteLeader{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "new_leader_hfid": data = nil case "new_site_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "new_leader_hfid": obj.NewLeaderHfid = n(data) case "new_site_civ_id": obj.NewSiteCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventNewSiteLeaderPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventNewSiteLeader) (*HistoricalEventNewSiteLeader, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventNewSiteLeader{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPeaceAccepted(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPeaceAccepted, error) { var ( obj = &HistoricalEventPeaceAccepted{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPeaceAcceptedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventPeaceAccepted) (*HistoricalEventPeaceAccepted, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventPeaceAccepted{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "destination": data = nil case "site": data = nil case "source": data = nil case "topic": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "destination": obj.Destination = n(data) case "site": obj.SiteId = n(data) case "source": obj.Source = n(data) case "topic": obj.Topic = parseHistoricalEventPeaceAcceptedTopic(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPeaceRejected(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPeaceRejected, error) { var ( obj = &HistoricalEventPeaceRejected{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPeaceRejectedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventPeaceRejected) (*HistoricalEventPeaceRejected, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventPeaceRejected{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "destination": data = nil case "site": data = nil case "source": data = nil case "topic": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "destination": obj.Destination = n(data) case "site": obj.SiteId = n(data) case "source": obj.Source = n(data) case "topic": obj.Topic = parseHistoricalEventPeaceRejectedTopic(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPerformance(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPerformance, error) { var ( obj = &HistoricalEventPerformance{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "feature_layer_id": data = nil case "occasion_id": data = nil case "schedule_id": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "occasion_id": obj.OccasionId = n(data) case "schedule_id": obj.ScheduleId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPerformancePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventPerformance) (*HistoricalEventPerformance, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventPerformance{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPlunderedSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPlunderedSite, error) { var ( obj = &HistoricalEventPlunderedSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "detected": data = nil case "no_defeat_mention": data = nil case "site_civ_id": data = nil case "site_id": data = nil case "took_items": data = nil case "took_livestock": data = nil case "was_raid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "detected": obj.Detected = true case "no_defeat_mention": obj.NoDefeatMention = true case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) case "took_items": obj.TookItems = true case "took_livestock": obj.TookLivestock = true case "was_raid": obj.WasRaid = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPlunderedSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventPlunderedSite) (*HistoricalEventPlunderedSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventPlunderedSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPoeticFormCreated(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventPoeticFormCreated, error) { var ( obj = &HistoricalEventPoeticFormCreated{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "circumstance": data = nil case "form_id": data = nil case "hist_figure_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "circumstance": obj.Circumstance = parseHistoricalEventPoeticFormCreatedCircumstance(string(data)) case "form_id": obj.FormId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventPoeticFormCreatedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventPoeticFormCreated) (*HistoricalEventPoeticFormCreated, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventPoeticFormCreated{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventProcession(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventProcession, error) { var ( obj = &HistoricalEventProcession{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "feature_layer_id": data = nil case "occasion_id": data = nil case "schedule_id": data = nil case "site_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "occasion_id": obj.OccasionId = n(data) case "schedule_id": obj.ScheduleId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventProcessionPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventProcession) (*HistoricalEventProcession, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventProcession{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRazedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRazedStructure, error) { var ( obj = &HistoricalEventRazedStructure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "site_id": data = nil case "structure_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRazedStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRazedStructure) (*HistoricalEventRazedStructure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRazedStructure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventReclaimSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReclaimSite, error) { var ( obj = &HistoricalEventReclaimSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil case "unretire": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) case "unretire": obj.Unretire = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventReclaimSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventReclaimSite) (*HistoricalEventReclaimSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventReclaimSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRegionpopIncorporatedIntoEntity(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) { var ( obj = &HistoricalEventRegionpopIncorporatedIntoEntity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "join_entity_id": data = nil case "pop_flid": data = nil case "pop_number_moved": data = nil case "pop_race": data = nil case "pop_srid": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "join_entity_id": obj.JoinEntityId = n(data) case "pop_flid": obj.PopFlid = n(data) case "pop_number_moved": obj.PopNumberMoved = n(data) case "pop_race": obj.PopRace = n(data) case "pop_srid": obj.PopSrid = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRegionpopIncorporatedIntoEntityPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRegionpopIncorporatedIntoEntity) (*HistoricalEventRegionpopIncorporatedIntoEntity, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRegionpopIncorporatedIntoEntity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRelationship(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRelationship, error) { var ( obj = &HistoricalEventRelationship{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRelationshipPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRelationship) (*HistoricalEventRelationship, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRelationship{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "event": data = nil case "relationship": data = nil case "source_hf": data = nil case "target_hf": data = nil case "year": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "event": obj.Event = n(data) case "relationship": obj.Relationship = parseHistoricalEventRelationshipRelationship(string(data)) case "source_hf": obj.SourceHf = n(data) case "target_hf": obj.TargetHf = n(data) case "year": obj.Year = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRelationshipSupplement(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRelationshipSupplement, error) { var ( obj = &HistoricalEventRelationshipSupplement{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRelationshipSupplementPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRelationshipSupplement) (*HistoricalEventRelationshipSupplement, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRelationshipSupplement{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "event": data = nil case "occasion_type": data = nil case "site": data = nil case "unk_1": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "event": obj.Event = n(data) case "occasion_type": obj.OccasionType = n(data) case "site": obj.Site = n(data) case "unk_1": obj.Unk1 = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRemoveHfEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfEntityLink, error) { var ( obj = &HistoricalEventRemoveHfEntityLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "hfid": data = nil case "link": data = nil case "position_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "hfid": obj.Hfid = n(data) case "link": obj.Link = parseHistoricalEventRemoveHfEntityLinkLink(string(data)) case "position_id": obj.PositionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRemoveHfEntityLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRemoveHfEntityLink) (*HistoricalEventRemoveHfEntityLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRemoveHfEntityLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ": data = nil case "histfig": data = nil case "link_type": data = nil case "position": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ": obj.CivId = n(data) case "histfig": obj.Hfid = n(data) case "link_type": obj.Link = parseHistoricalEventRemoveHfEntityLinkLink(string(data)) case "position": obj.Position = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRemoveHfHfLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfHfLink, error) { var ( obj = &HistoricalEventRemoveHfHfLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "hfid": data = nil case "hfid_target": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "hfid": obj.Hfid = n(data) case "hfid_target": obj.HfidTarget = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRemoveHfHfLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRemoveHfHfLink) (*HistoricalEventRemoveHfHfLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRemoveHfHfLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRemoveHfSiteLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventRemoveHfSiteLink, error) { var ( obj = &HistoricalEventRemoveHfSiteLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventRemoveHfSiteLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventRemoveHfSiteLink) (*HistoricalEventRemoveHfSiteLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventRemoveHfSiteLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ": data = nil case "histfig": data = nil case "link_type": data = nil case "site": data = nil case "structure": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ": obj.Civ = n(data) case "histfig": obj.Histfig = n(data) case "link_type": obj.LinkType = parseHistoricalEventRemoveHfSiteLinkLinkType(string(data)) case "site": obj.SiteId = n(data) case "structure": obj.Structure = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventReplacedStructure(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventReplacedStructure, error) { var ( obj = &HistoricalEventReplacedStructure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "new_ab_id": data = nil case "old_ab_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "new_ab_id": obj.NewAbId = n(data) case "old_ab_id": obj.OldAbId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventReplacedStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventReplacedStructure) (*HistoricalEventReplacedStructure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventReplacedStructure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ": data = nil case "new_structure": data = nil case "old_structure": data = nil case "site": data = nil case "site_civ": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ": obj.Civ = n(data) case "new_structure": obj.NewStructure = n(data) case "old_structure": obj.OldStructure = n(data) case "site": obj.Site = n(data) case "site_civ": obj.SiteCiv = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteDied(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteDied, error) { var ( obj = &HistoricalEventSiteDied{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "abandoned": data = nil case "civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "abandoned": obj.Abandoned = true case "civ_id": obj.CivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteDiedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSiteDied) (*HistoricalEventSiteDied, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSiteDied{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteDispute(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteDispute, error) { var ( obj = &HistoricalEventSiteDispute{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "dispute": data = nil case "entity_id_1": data = nil case "entity_id_2": data = nil case "site_id_1": data = nil case "site_id_2": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "dispute": obj.Dispute = parseHistoricalEventSiteDisputeDispute(string(data)) case "entity_id_1": obj.EntityId1 = n(data) case "entity_id_2": obj.EntityId2 = n(data) case "site_id_1": obj.SiteId1 = n(data) case "site_id_2": obj.SiteId2 = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteDisputePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSiteDispute) (*HistoricalEventSiteDispute, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSiteDispute{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteRetired(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteRetired, error) { var ( obj = &HistoricalEventSiteRetired{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "first": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "first": obj.First = true case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteRetiredPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSiteRetired) (*HistoricalEventSiteRetired, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSiteRetired{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteSurrendered(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteSurrendered, error) { var ( obj = &HistoricalEventSiteSurrendered{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteSurrenderedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSiteSurrendered) (*HistoricalEventSiteSurrendered, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSiteSurrendered{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteTakenOver(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteTakenOver, error) { var ( obj = &HistoricalEventSiteTakenOver{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "new_site_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "new_site_civ_id": obj.NewSiteCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteTakenOverPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSiteTakenOver) (*HistoricalEventSiteTakenOver, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSiteTakenOver{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteTributeForced(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSiteTributeForced, error) { var ( obj = &HistoricalEventSiteTributeForced{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "season": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "season": obj.Season = parseHistoricalEventSiteTributeForcedSeason(string(data)) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSiteTributeForcedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSiteTributeForced) (*HistoricalEventSiteTributeForced, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSiteTributeForced{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSneakIntoSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSneakIntoSite, error) { var ( obj = &HistoricalEventSneakIntoSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "attacker_civ_id": data = nil case "defender_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "attacker_civ_id": obj.AttackerCivId = n(data) case "defender_civ_id": obj.DefenderCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSneakIntoSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSneakIntoSite) (*HistoricalEventSneakIntoSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSneakIntoSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSpottedLeavingSite(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSpottedLeavingSite, error) { var ( obj = &HistoricalEventSpottedLeavingSite{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "leaver_civ_id": data = nil case "site_civ_id": data = nil case "site_id": data = nil case "spotter_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "leaver_civ_id": obj.LeaverCivId = n(data) case "site_civ_id": obj.SiteCivId = n(data) case "site_id": obj.SiteId = n(data) case "spotter_hfid": obj.SpotterHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSpottedLeavingSitePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSpottedLeavingSite) (*HistoricalEventSpottedLeavingSite, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSpottedLeavingSite{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSquadVsSquad(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventSquadVsSquad, error) { var ( obj = &HistoricalEventSquadVsSquad{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "a_hfid": data = nil case "a_leader_hfid": data = nil case "a_leadership_roll": data = nil case "a_squad_id": data = nil case "d_effect": data = nil case "d_hfid": data = nil case "d_interaction": data = nil case "d_leader_hfid": data = nil case "d_leadership_roll": data = nil case "d_number": data = nil case "d_race": data = nil case "d_slain": data = nil case "d_squad_id": data = nil case "feature_layer_id": data = nil case "site_id": data = nil case "structure_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "a_hfid": obj.AHfid = append(obj.AHfid, n(data)) case "a_leader_hfid": obj.ALeaderHfid = n(data) case "a_leadership_roll": obj.ALeadershipRoll = n(data) case "a_squad_id": obj.ASquadId = n(data) case "d_effect": obj.DEffect = n(data) case "d_hfid": obj.DHfid = append(obj.DHfid, n(data)) case "d_interaction": obj.DInteraction = n(data) case "d_leader_hfid": obj.DLeaderHfid = n(data) case "d_leadership_roll": obj.DLeadershipRoll = n(data) case "d_number": obj.DNumber = n(data) case "d_race": obj.DRace = n(data) case "d_slain": obj.DSlain = n(data) case "d_squad_id": obj.DSquadId = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "structure_id": obj.StructureId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventSquadVsSquadPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventSquadVsSquad) (*HistoricalEventSquadVsSquad, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventSquadVsSquad{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventTacticalSituation(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventTacticalSituation, error) { var ( obj = &HistoricalEventTacticalSituation{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "a_tactician_hfid": data = nil case "a_tactics_roll": data = nil case "d_tactician_hfid": data = nil case "d_tactics_roll": data = nil case "feature_layer_id": data = nil case "site_id": data = nil case "situation": data = nil case "start": data = nil case "structure_id": data = nil case "subregion_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "a_tactician_hfid": obj.ATacticianHfid = n(data) case "a_tactics_roll": obj.ATacticsRoll = n(data) case "d_tactician_hfid": obj.DTacticianHfid = n(data) case "d_tactics_roll": obj.DTacticsRoll = n(data) case "feature_layer_id": obj.FeatureLayerId = n(data) case "site_id": obj.SiteId = n(data) case "situation": obj.Situation = parseHistoricalEventTacticalSituationSituation(string(data)) case "start": obj.Start = true case "structure_id": obj.StructureId = n(data) case "subregion_id": obj.SubregionId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventTacticalSituationPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventTacticalSituation) (*HistoricalEventTacticalSituation, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventTacticalSituation{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventTrade(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventTrade, error) { var ( obj = &HistoricalEventTrade{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "account_shift": data = nil case "allotment": data = nil case "allotment_index": data = nil case "dest_site_id": data = nil case "production_zone_id": data = nil case "source_site_id": data = nil case "trader_entity_id": data = nil case "trader_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "account_shift": obj.AccountShift = n(data) case "allotment": obj.Allotment = n(data) case "allotment_index": obj.AllotmentIndex = n(data) case "dest_site_id": obj.DestSiteId = n(data) case "production_zone_id": obj.ProductionZoneId = n(data) case "source_site_id": obj.SourceSiteId = n(data) case "trader_entity_id": obj.TraderEntityId = n(data) case "trader_hfid": obj.TraderHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventTradePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventTrade) (*HistoricalEventTrade, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventTrade{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventWrittenContentComposed(d *xml.Decoder, start *xml.StartElement) (*HistoricalEventWrittenContentComposed, error) { var ( obj = &HistoricalEventWrittenContentComposed{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "circumstance": data = nil case "circumstance_id": data = nil case "hist_figure_id": data = nil case "reason": data = nil case "reason_id": data = nil case "site_id": data = nil case "subregion_id": data = nil case "wc_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "circumstance": obj.Circumstance = parseHistoricalEventWrittenContentComposedCircumstance(string(data)) case "circumstance_id": obj.CircumstanceId = n(data) case "hist_figure_id": obj.HistFigureId = n(data) case "reason": obj.Reason = parseHistoricalEventWrittenContentComposedReason(string(data)) case "reason_id": obj.ReasonId = n(data) case "site_id": obj.SiteId = n(data) case "subregion_id": obj.SubregionId = n(data) case "wc_id": obj.WcId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalEventWrittenContentComposedPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalEventWrittenContentComposed) (*HistoricalEventWrittenContentComposed, error) { var ( data []byte ) if obj == nil { obj = &HistoricalEventWrittenContentComposed{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalFigure(d *xml.Decoder, start *xml.StartElement) (*HistoricalFigure, error) { var ( obj = &HistoricalFigure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "active_interaction": data = nil case "adventurer": data = nil case "animated": data = nil case "animated_string": data = nil case "appeared": data = nil case "associated_type": data = nil case "birth_seconds72": data = nil case "birth_year": data = nil case "breed_id": data = nil case "caste": data = nil case "current_identity_id": data = nil case "death_seconds72": data = nil case "death_year": data = nil case "deity": data = nil case "ent_pop_id": data = nil case "entity_former_position_link": v, _ := parseEntityFormerPositionLink(d, &t) obj.EntityFormerPositionLink = append(obj.EntityFormerPositionLink, v) case "entity_former_squad_link": v, _ := parseEntityFormerSquadLink(d, &t) obj.EntityFormerSquadLink = append(obj.EntityFormerSquadLink, v) case "entity_link": v, _ := parseHistoricalFigureEntityLink(d, &t) obj.EntityLink = append(obj.EntityLink, v) case "entity_position_link": v, _ := parseEntityPositionLink(d, &t) obj.EntityPositionLink = append(obj.EntityPositionLink, v) case "entity_reputation": v, _ := parseEntityReputation(d, &t) obj.EntityReputation = append(obj.EntityReputation, v) case "entity_squad_link": v, _ := parseEntitySquadLink(d, &t) obj.EntitySquadLink = v case "force": data = nil case "ghost": data = nil case "goal": data = nil case "hf_link": v, _ := parseHfLink(d, &t) obj.HfLink = append(obj.HfLink, v) case "hf_skill": v, _ := parseHfSkill(d, &t) obj.HfSkill = append(obj.HfSkill, v) case "holds_artifact": data = nil case "honor_entity": v, _ := parseHonorEntity(d, &t) obj.HonorEntity = append(obj.HonorEntity, v) case "id": data = nil case "interaction_knowledge": data = nil case "intrigue_actor": v, _ := parseIntrigueActor(d, &t) obj.IntrigueActor = append(obj.IntrigueActor, v) case "intrigue_plot": v, _ := parseIntriguePlot(d, &t) obj.IntriguePlot = append(obj.IntriguePlot, v) case "journey_pet": data = nil case "name": data = nil case "race": data = nil case "relationship_profile_hf_historical": v, _ := parseRelationshipProfileHfHistorical(d, &t) obj.RelationshipProfileHfHistorical = append(obj.RelationshipProfileHfHistorical, v) case "relationship_profile_hf_identity": v, _ := parseRelationshipProfileHfIdentity(d, &t) obj.RelationshipProfileHfIdentity = append(obj.RelationshipProfileHfIdentity, v) case "relationship_profile_hf_visual": v, _ := parseRelationshipProfileHfVisual(d, &t) obj.RelationshipProfileHfVisual = append(obj.RelationshipProfileHfVisual, v) case "site_link": v, _ := parseSiteLink(d, &t) obj.SiteLink = append(obj.SiteLink, v) case "site_property": v, _ := parseHistoricalFigureSiteProperty(d, &t) obj.SiteProperty = append(obj.SiteProperty, v) case "sphere": data = nil case "used_identity_id": data = nil case "vague_relationship": v, _ := parseVagueRelationship(d, &t) obj.VagueRelationship = append(obj.VagueRelationship, v) default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "active_interaction": obj.ActiveInteraction = append(obj.ActiveInteraction, string(data)) case "adventurer": obj.Adventurer = true case "animated": obj.Animated = true case "animated_string": obj.AnimatedString = string(data) case "appeared": obj.Appeared = n(data) case "associated_type": obj.AssociatedType = string(data) case "birth_seconds72": obj.BirthSeconds72 = n(data) case "birth_year": obj.BirthYear = n(data) case "breed_id": obj.BreedId = n(data) case "caste": obj.Caste = string(data) case "current_identity_id": obj.CurrentIdentityId = n(data) case "death_seconds72": obj.DeathSeconds72 = n(data) case "death_year": obj.DeathYear = n(data) case "deity": obj.Deity = true case "ent_pop_id": obj.EntPopId = n(data) case "entity_former_position_link": case "entity_former_squad_link": case "entity_link": case "entity_position_link": case "entity_reputation": case "entity_squad_link": case "force": obj.Force = true case "ghost": obj.Ghost = true case "goal": obj.Goal = append(obj.Goal, parseHistoricalFigureGoal(string(data))) case "hf_link": case "hf_skill": case "holds_artifact": obj.HoldsArtifact = append(obj.HoldsArtifact, n(data)) case "honor_entity": case "id": obj.Id_ = n(data) case "interaction_knowledge": obj.InteractionKnowledge = append(obj.InteractionKnowledge, string(data)) case "intrigue_actor": case "intrigue_plot": case "journey_pet": obj.JourneyPet = append(obj.JourneyPet, string(data)) case "name": obj.Name_ = string(data) case "race": obj.Race = string(data) case "relationship_profile_hf_historical": case "relationship_profile_hf_identity": case "relationship_profile_hf_visual": case "site_link": case "site_property": case "sphere": obj.Sphere = append(obj.Sphere, string(data)) case "used_identity_id": obj.UsedIdentityId = append(obj.UsedIdentityId, n(data)) case "vague_relationship": default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalFigurePlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalFigure) (*HistoricalFigure, error) { var ( data []byte ) if obj == nil { obj = &HistoricalFigure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "race": data = nil case "sex": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "race": obj.Race = string(data) case "sex": obj.Sex = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalFigureEntityLink(d *xml.Decoder, start *xml.StartElement) (*HistoricalFigureEntityLink, error) { var ( obj = &HistoricalFigureEntityLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "link_strength": data = nil case "link_type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "link_strength": obj.LinkStrength = n(data) case "link_type": obj.LinkType = parseHistoricalFigureEntityLinkLinkType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalFigureEntityLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalFigureEntityLink) (*HistoricalFigureEntityLink, error) { var ( data []byte ) if obj == nil { obj = &HistoricalFigureEntityLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalFigureSiteProperty(d *xml.Decoder, start *xml.StartElement) (*HistoricalFigureSiteProperty, error) { var ( obj = &HistoricalFigureSiteProperty{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "property_id": data = nil case "site_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "property_id": obj.PropertyId = n(data) case "site_id": obj.SiteId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHistoricalFigureSitePropertyPlus(d *xml.Decoder, start *xml.StartElement, obj *HistoricalFigureSiteProperty) (*HistoricalFigureSiteProperty, error) { var ( data []byte ) if obj == nil { obj = &HistoricalFigureSiteProperty{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHonor(d *xml.Decoder, start *xml.StartElement) (*Honor, error) { var ( obj = &Honor{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "exempt_epid": data = nil case "exempt_former_epid": data = nil case "gives_precedence": data = nil case "granted_to_everybody": data = nil case "id": data = nil case "name": data = nil case "required_battles": data = nil case "required_kills": data = nil case "required_skill": data = nil case "required_skill_ip_total": data = nil case "required_years": data = nil case "requires_any_melee_or_ranged_skill": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "exempt_epid": obj.ExemptEpid = n(data) case "exempt_former_epid": obj.ExemptFormerEpid = n(data) case "gives_precedence": obj.GivesPrecedence = n(data) case "granted_to_everybody": obj.GrantedToEverybody = true case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "required_battles": obj.RequiredBattles = n(data) case "required_kills": obj.RequiredKills = n(data) case "required_skill": obj.RequiredSkill = parseHonorRequiredSkill(string(data)) case "required_skill_ip_total": obj.RequiredSkillIpTotal = n(data) case "required_years": obj.RequiredYears = n(data) case "requires_any_melee_or_ranged_skill": obj.RequiresAnyMeleeOrRangedSkill = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHonorPlus(d *xml.Decoder, start *xml.StartElement, obj *Honor) (*Honor, error) { var ( data []byte ) if obj == nil { obj = &Honor{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHonorEntity(d *xml.Decoder, start *xml.StartElement) (*HonorEntity, error) { var ( obj = &HonorEntity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "battles": data = nil case "entity": data = nil case "honor_id": data = nil case "kills": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "battles": obj.Battles = n(data) case "entity": obj.Entity = n(data) case "honor_id": obj.HonorId = append(obj.HonorId, n(data)) case "kills": obj.Kills = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseHonorEntityPlus(d *xml.Decoder, start *xml.StartElement, obj *HonorEntity) (*HonorEntity, error) { var ( data []byte ) if obj == nil { obj = &HonorEntity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseIdentity(d *xml.Decoder, start *xml.StartElement) (*Identity, error) { var ( obj = &Identity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseIdentityPlus(d *xml.Decoder, start *xml.StartElement, obj *Identity) (*Identity, error) { var ( data []byte ) if obj == nil { obj = &Identity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "birth_second": data = nil case "birth_year": data = nil case "caste": data = nil case "entity_id": data = nil case "histfig_id": data = nil case "id": data = nil case "name": data = nil case "nemesis_id": data = nil case "profession": data = nil case "race": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "birth_second": obj.BirthSecond = n(data) case "birth_year": obj.BirthYear = n(data) case "caste": obj.Caste = string(data) case "entity_id": obj.EntityId = n(data) case "histfig_id": obj.HistfigId = n(data) case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "nemesis_id": obj.NemesisId = n(data) case "profession": obj.Profession = parseIdentityProfession(string(data)) case "race": obj.Race = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseIntrigueActor(d *xml.Decoder, start *xml.StartElement) (*IntrigueActor, error) { var ( obj = &IntrigueActor{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "handle_actor_id": data = nil case "hfid": data = nil case "local_id": data = nil case "promised_actor_immortality": data = nil case "promised_me_immortality": data = nil case "role": data = nil case "strategy": data = nil case "strategy_enid": data = nil case "strategy_eppid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "handle_actor_id": obj.HandleActorId = n(data) case "hfid": obj.Hfid = n(data) case "local_id": obj.LocalId = n(data) case "promised_actor_immortality": obj.PromisedActorImmortality = true case "promised_me_immortality": obj.PromisedMeImmortality = true case "role": obj.Role = parseIntrigueActorRole(string(data)) case "strategy": obj.Strategy = parseIntrigueActorStrategy(string(data)) case "strategy_enid": obj.StrategyEnid = n(data) case "strategy_eppid": obj.StrategyEppid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseIntrigueActorPlus(d *xml.Decoder, start *xml.StartElement, obj *IntrigueActor) (*IntrigueActor, error) { var ( data []byte ) if obj == nil { obj = &IntrigueActor{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseIntriguePlot(d *xml.Decoder, start *xml.StartElement) (*IntriguePlot, error) { var ( obj = &IntriguePlot{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "actor_id": data = nil case "artifact_id": data = nil case "delegated_plot_hfid": data = nil case "delegated_plot_id": data = nil case "entity_id": data = nil case "local_id": data = nil case "on_hold": data = nil case "parent_plot_hfid": data = nil case "parent_plot_id": data = nil case "plot_actor": v, _ := parsePlotActor(d, &t) obj.PlotActor = append(obj.PlotActor, v) case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "actor_id": obj.ActorId = n(data) case "artifact_id": obj.ArtifactId = n(data) case "delegated_plot_hfid": obj.DelegatedPlotHfid = n(data) case "delegated_plot_id": obj.DelegatedPlotId = n(data) case "entity_id": obj.EntityId = n(data) case "local_id": obj.LocalId = n(data) case "on_hold": obj.OnHold = true case "parent_plot_hfid": obj.ParentPlotHfid = n(data) case "parent_plot_id": obj.ParentPlotId = n(data) case "plot_actor": case "type": obj.Type = parseIntriguePlotType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseIntriguePlotPlus(d *xml.Decoder, start *xml.StartElement, obj *IntriguePlot) (*IntriguePlot, error) { var ( data []byte ) if obj == nil { obj = &IntriguePlot{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseItem(d *xml.Decoder, start *xml.StartElement) (*Item, error) { var ( obj = &Item{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "name_string": data = nil case "page_number": data = nil case "page_written_content_id": data = nil case "writing_written_content_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "name_string": obj.NameString = string(data) case "page_number": obj.PageNumber = n(data) case "page_written_content_id": obj.PageWrittenContentId = n(data) case "writing_written_content_id": obj.WritingWrittenContentId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseItemPlus(d *xml.Decoder, start *xml.StartElement, obj *Item) (*Item, error) { var ( data []byte ) if obj == nil { obj = &Item{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseLandmass(d *xml.Decoder, start *xml.StartElement) (*Landmass, error) { var ( obj = &Landmass{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseLandmassPlus(d *xml.Decoder, start *xml.StartElement, obj *Landmass) (*Landmass, error) { var ( data []byte ) if obj == nil { obj = &Landmass{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coord_1": data = nil case "coord_2": data = nil case "id": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coord_1": obj.Coord1 = string(data) case "coord_2": obj.Coord2 = string(data) case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseMountainPeak(d *xml.Decoder, start *xml.StartElement) (*MountainPeak, error) { var ( obj = &MountainPeak{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseMountainPeakPlus(d *xml.Decoder, start *xml.StartElement, obj *MountainPeak) (*MountainPeak, error) { var ( data []byte ) if obj == nil { obj = &MountainPeak{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "height": data = nil case "id": data = nil case "is_volcano": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "height": obj.Height = n(data) case "id": obj.Id_ = n(data) case "is_volcano": obj.IsVolcano = true case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseMusicalForm(d *xml.Decoder, start *xml.StartElement) (*MusicalForm, error) { var ( obj = &MusicalForm{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "description": data = nil case "id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "description": obj.Description = string(data) case "id": obj.Id_ = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseMusicalFormPlus(d *xml.Decoder, start *xml.StartElement, obj *MusicalForm) (*MusicalForm, error) { var ( data []byte ) if obj == nil { obj = &MusicalForm{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseOccasion(d *xml.Decoder, start *xml.StartElement) (*Occasion, error) { var ( obj = &Occasion{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseOccasionPlus(d *xml.Decoder, start *xml.StartElement, obj *Occasion) (*Occasion, error) { var ( data []byte ) if obj == nil { obj = &Occasion{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "event": data = nil case "id": data = nil case "name": data = nil case "schedule": v, _ := parseSchedulePlus(d, &t, &Schedule{}) obj.Schedule = append(obj.Schedule, v) default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "event": obj.Event = n(data) case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "schedule": default: // fmt.Println("unknown field", t.Name.Local) } } } } func parsePlotActor(d *xml.Decoder, start *xml.StartElement) (*PlotActor, error) { var ( obj = &PlotActor{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "actor_id": data = nil case "agreement_has_messenger": data = nil case "agreement_id": data = nil case "plot_role": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "actor_id": obj.ActorId = n(data) case "agreement_has_messenger": obj.AgreementHasMessenger = true case "agreement_id": obj.AgreementId = n(data) case "plot_role": obj.PlotRole = parsePlotActorPlotRole(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parsePlotActorPlus(d *xml.Decoder, start *xml.StartElement, obj *PlotActor) (*PlotActor, error) { var ( data []byte ) if obj == nil { obj = &PlotActor{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parsePoeticForm(d *xml.Decoder, start *xml.StartElement) (*PoeticForm, error) { var ( obj = &PoeticForm{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "description": data = nil case "id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "description": obj.Description = string(data) case "id": obj.Id_ = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parsePoeticFormPlus(d *xml.Decoder, start *xml.StartElement, obj *PoeticForm) (*PoeticForm, error) { var ( data []byte ) if obj == nil { obj = &PoeticForm{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "name": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseReference(d *xml.Decoder, start *xml.StartElement) (*Reference, error) { var ( obj = &Reference{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseReferencePlus(d *xml.Decoder, start *xml.StartElement, obj *Reference) (*Reference, error) { var ( data []byte ) if obj == nil { obj = &Reference{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "type": obj.Type = parseReferenceType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRegion(d *xml.Decoder, start *xml.StartElement) (*Region, error) { var ( obj = &Region{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "name": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "type": obj.Type = parseRegionType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRegionPlus(d *xml.Decoder, start *xml.StartElement, obj *Region) (*Region, error) { var ( data []byte ) if obj == nil { obj = &Region{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "evilness": data = nil case "force_id": data = nil case "id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "evilness": obj.Evilness = parseRegionEvilness(string(data)) case "force_id": obj.ForceId = n(data) case "id": obj.Id_ = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRelationshipProfileHfHistorical(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfHistorical, error) { var ( obj = &RelationshipProfileHfHistorical{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "fear": data = nil case "hf_id": data = nil case "love": data = nil case "loyalty": data = nil case "rep_enemy_fighter": data = nil case "rep_hero": data = nil case "rep_hunter": data = nil case "rep_killer": data = nil case "rep_psychopath": data = nil case "rep_storyteller": data = nil case "rep_violent": data = nil case "respect": data = nil case "trust": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "fear": obj.Fear = n(data) case "hf_id": obj.HfId = n(data) case "love": obj.Love = n(data) case "loyalty": obj.Loyalty = n(data) case "rep_enemy_fighter": obj.RepEnemyFighter = n(data) case "rep_hero": obj.RepHero = n(data) case "rep_hunter": obj.RepHunter = n(data) case "rep_killer": obj.RepKiller = n(data) case "rep_psychopath": obj.RepPsychopath = n(data) case "rep_storyteller": obj.RepStoryteller = n(data) case "rep_violent": obj.RepViolent = n(data) case "respect": obj.Respect = n(data) case "trust": obj.Trust = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRelationshipProfileHfHistoricalPlus(d *xml.Decoder, start *xml.StartElement, obj *RelationshipProfileHfHistorical) (*RelationshipProfileHfHistorical, error) { var ( data []byte ) if obj == nil { obj = &RelationshipProfileHfHistorical{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRelationshipProfileHfIdentity(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfIdentity, error) { var ( obj = &RelationshipProfileHfIdentity{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "fear": data = nil case "id": data = nil case "love": data = nil case "loyalty": data = nil case "rep_psychopath": data = nil case "respect": data = nil case "trust": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "fear": obj.Fear = n(data) case "id": obj.Id_ = n(data) case "love": obj.Love = n(data) case "loyalty": obj.Loyalty = n(data) case "rep_psychopath": obj.RepPsychopath = n(data) case "respect": obj.Respect = n(data) case "trust": obj.Trust = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRelationshipProfileHfIdentityPlus(d *xml.Decoder, start *xml.StartElement, obj *RelationshipProfileHfIdentity) (*RelationshipProfileHfIdentity, error) { var ( data []byte ) if obj == nil { obj = &RelationshipProfileHfIdentity{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRelationshipProfileHfVisual(d *xml.Decoder, start *xml.StartElement) (*RelationshipProfileHfVisual, error) { var ( obj = &RelationshipProfileHfVisual{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "fear": data = nil case "hf_id": data = nil case "known_identity_id": data = nil case "last_meet_seconds72": data = nil case "last_meet_year": data = nil case "love": data = nil case "loyalty": data = nil case "meet_count": data = nil case "rep_bonded": data = nil case "rep_comrade": data = nil case "rep_flatterer": data = nil case "rep_friendly": data = nil case "rep_hero": data = nil case "rep_hunter": data = nil case "rep_information_source": data = nil case "rep_killer": data = nil case "rep_psychopath": data = nil case "rep_quarreler": data = nil case "rep_trade_partner": data = nil case "respect": data = nil case "trust": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "fear": obj.Fear = n(data) case "hf_id": obj.HfId = n(data) case "known_identity_id": obj.KnownIdentityId = n(data) case "last_meet_seconds72": obj.LastMeetSeconds72 = n(data) case "last_meet_year": obj.LastMeetYear = n(data) case "love": obj.Love = n(data) case "loyalty": obj.Loyalty = n(data) case "meet_count": obj.MeetCount = n(data) case "rep_bonded": obj.RepBonded = n(data) case "rep_comrade": obj.RepComrade = n(data) case "rep_flatterer": obj.RepFlatterer = n(data) case "rep_friendly": obj.RepFriendly = n(data) case "rep_hero": obj.RepHero = n(data) case "rep_hunter": obj.RepHunter = n(data) case "rep_information_source": obj.RepInformationSource = n(data) case "rep_killer": obj.RepKiller = n(data) case "rep_psychopath": obj.RepPsychopath = n(data) case "rep_quarreler": obj.RepQuarreler = n(data) case "rep_trade_partner": obj.RepTradePartner = n(data) case "respect": obj.Respect = n(data) case "trust": obj.Trust = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRelationshipProfileHfVisualPlus(d *xml.Decoder, start *xml.StartElement, obj *RelationshipProfileHfVisual) (*RelationshipProfileHfVisual, error) { var ( data []byte ) if obj == nil { obj = &RelationshipProfileHfVisual{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRiver(d *xml.Decoder, start *xml.StartElement) (*River, error) { var ( obj = &River{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseRiverPlus(d *xml.Decoder, start *xml.StartElement, obj *River) (*River, error) { var ( data []byte ) if obj == nil { obj = &River{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "end_pos": data = nil case "name": data = nil case "path": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "end_pos": obj.EndPos = string(data) case "name": obj.Name_ = string(data) case "path": obj.Path = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSchedule(d *xml.Decoder, start *xml.StartElement) (*Schedule, error) { var ( obj = &Schedule{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSchedulePlus(d *xml.Decoder, start *xml.StartElement, obj *Schedule) (*Schedule, error) { var ( data []byte ) if obj == nil { obj = &Schedule{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "feature": v, _ := parseFeaturePlus(d, &t, &Feature{}) obj.Feature = append(obj.Feature, v) case "id": data = nil case "item_subtype": data = nil case "item_type": data = nil case "reference": data = nil case "reference2": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "feature": case "id": obj.Id_ = n(data) case "item_subtype": obj.ItemSubtype = parseScheduleItemSubtype(string(data)) case "item_type": obj.ItemType = parseScheduleItemType(string(data)) case "reference": obj.Reference = n(data) case "reference2": obj.Reference2 = n(data) case "type": obj.Type = parseScheduleType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSite(d *xml.Decoder, start *xml.StartElement) (*Site, error) { var ( obj = &Site{} data []byte ) obj.SiteProperties = make(map[int]*SiteSiteProperty) obj.Structures = make(map[int]*Structure) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "id": data = nil case "name": data = nil case "rectangle": data = nil case "site_properties": parseMap(d, &obj.SiteProperties, parseSiteSiteProperty) case "structures": parseMap(d, &obj.Structures, parseStructure) case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "rectangle": obj.Rectangle = string(data) case "site_properties": case "structures": case "type": obj.Type = parseSiteType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSitePlus(d *xml.Decoder, start *xml.StartElement, obj *Site) (*Site, error) { var ( data []byte ) if obj == nil { obj = &Site{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "civ_id": data = nil case "cur_owner_id": data = nil case "id": data = nil case "structures": parseMapPlus(d, &obj.Structures, parseStructurePlus) default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "civ_id": obj.CivId = n(data) case "cur_owner_id": obj.CurOwnerId = n(data) case "id": obj.Id_ = n(data) case "structures": default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSiteLink(d *xml.Decoder, start *xml.StartElement) (*SiteLink, error) { var ( obj = &SiteLink{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "entity_id": data = nil case "link_type": data = nil case "occupation_id": data = nil case "site_id": data = nil case "sub_id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "entity_id": obj.EntityId = n(data) case "link_type": obj.LinkType = parseSiteLinkLinkType(string(data)) case "occupation_id": obj.OccupationId = n(data) case "site_id": obj.SiteId = n(data) case "sub_id": obj.SubId = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSiteLinkPlus(d *xml.Decoder, start *xml.StartElement, obj *SiteLink) (*SiteLink, error) { var ( data []byte ) if obj == nil { obj = &SiteLink{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSiteSiteProperty(d *xml.Decoder, start *xml.StartElement) (*SiteSiteProperty, error) { var ( obj = &SiteSiteProperty{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "id": data = nil case "owner_hfid": data = nil case "structure_id": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "id": obj.Id_ = n(data) case "owner_hfid": obj.OwnerHfid = n(data) case "structure_id": obj.StructureId = n(data) case "type": obj.Type = parseSiteSitePropertyType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseSiteSitePropertyPlus(d *xml.Decoder, start *xml.StartElement, obj *SiteSiteProperty) (*SiteSiteProperty, error) { var ( data []byte ) if obj == nil { obj = &SiteSiteProperty{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseStructure(d *xml.Decoder, start *xml.StartElement) (*Structure, error) { var ( obj = &Structure{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "copied_artifact_id": data = nil case "entity_id": data = nil case "local_id": data = nil case "name": data = nil case "subtype": data = nil case "type": data = nil case "worship_hfid": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "copied_artifact_id": obj.CopiedArtifactId = append(obj.CopiedArtifactId, n(data)) case "entity_id": obj.EntityId = n(data) case "local_id": obj.LocalId = n(data) case "name": obj.Name_ = string(data) case "subtype": obj.Subtype = parseStructureSubtype(string(data)) case "type": obj.Type = parseStructureType(string(data)) case "worship_hfid": obj.WorshipHfid = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseStructurePlus(d *xml.Decoder, start *xml.StartElement, obj *Structure) (*Structure, error) { var ( data []byte ) if obj == nil { obj = &Structure{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "deity": data = nil case "deity_type": data = nil case "dungeon_type": data = nil case "id": data = nil case "inhabitant": data = nil case "name": data = nil case "name2": data = nil case "religion": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "deity": obj.Deity = n(data) case "deity_type": obj.DeityType = n(data) case "dungeon_type": obj.DungeonType = n(data) case "id": obj.Id_ = n(data) case "inhabitant": obj.Inhabitant = append(obj.Inhabitant, n(data)) case "name": obj.Name_ = string(data) case "name2": obj.Name2 = string(data) case "religion": obj.Religion = n(data) case "type": obj.Type = parseStructureType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseUndergroundRegion(d *xml.Decoder, start *xml.StartElement) (*UndergroundRegion, error) { var ( obj = &UndergroundRegion{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "depth": data = nil case "id": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "depth": obj.Depth = n(data) case "id": obj.Id_ = n(data) case "type": obj.Type = parseUndergroundRegionType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseUndergroundRegionPlus(d *xml.Decoder, start *xml.StartElement, obj *UndergroundRegion) (*UndergroundRegion, error) { var ( data []byte ) if obj == nil { obj = &UndergroundRegion{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "id": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "id": obj.Id_ = n(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseVagueRelationship(d *xml.Decoder, start *xml.StartElement) (*VagueRelationship, error) { var ( obj = &VagueRelationship{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "artistic_buddy": data = nil case "atheletic_rival": data = nil case "athlete_buddy": data = nil case "business_rival": data = nil case "childhood_friend": data = nil case "grudge": data = nil case "hfid": data = nil case "jealous_obsession": data = nil case "jealous_relationship_grudge": data = nil case "persecution_grudge": data = nil case "religious_persecution_grudge": data = nil case "scholar_buddy": data = nil case "supernatural_grudge": data = nil case "war_buddy": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "artistic_buddy": obj.ArtisticBuddy = true case "atheletic_rival": obj.AtheleticRival = true case "athlete_buddy": obj.AthleteBuddy = true case "business_rival": obj.BusinessRival = true case "childhood_friend": obj.ChildhoodFriend = true case "grudge": obj.Grudge = true case "hfid": obj.Hfid = n(data) case "jealous_obsession": obj.JealousObsession = true case "jealous_relationship_grudge": obj.JealousRelationshipGrudge = true case "persecution_grudge": obj.PersecutionGrudge = true case "religious_persecution_grudge": obj.ReligiousPersecutionGrudge = true case "scholar_buddy": obj.ScholarBuddy = true case "supernatural_grudge": obj.SupernaturalGrudge = true case "war_buddy": obj.WarBuddy = true default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseVagueRelationshipPlus(d *xml.Decoder, start *xml.StartElement, obj *VagueRelationship) (*VagueRelationship, error) { var ( data []byte ) if obj == nil { obj = &VagueRelationship{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseWorldConstruction(d *xml.Decoder, start *xml.StartElement) (*WorldConstruction, error) { var ( obj = &WorldConstruction{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseWorldConstructionPlus(d *xml.Decoder, start *xml.StartElement, obj *WorldConstruction) (*WorldConstruction, error) { var ( data []byte ) if obj == nil { obj = &WorldConstruction{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "coords": data = nil case "id": data = nil case "name": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "coords": obj.Coords = string(data) case "id": obj.Id_ = n(data) case "name": obj.Name_ = string(data) case "type": obj.Type = parseWorldConstructionType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseWrittenContent(d *xml.Decoder, start *xml.StartElement) (*WrittenContent, error) { var ( obj = &WrittenContent{} data []byte ) for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "author_hfid": data = nil case "author_roll": data = nil case "form": data = nil case "form_id": data = nil case "id": data = nil case "style": data = nil case "title": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "author_hfid": obj.AuthorHfid = n(data) case "author_roll": obj.AuthorRoll = n(data) case "form": obj.Form = parseWrittenContentForm(string(data)) case "form_id": obj.FormId = n(data) case "id": obj.Id_ = n(data) case "style": obj.Style = append(obj.Style, string(data)) case "title": obj.Title = string(data) default: // fmt.Println("unknown field", t.Name.Local) } } } } func parseWrittenContentPlus(d *xml.Decoder, start *xml.StartElement, obj *WrittenContent) (*WrittenContent, error) { var ( data []byte ) if obj == nil { obj = &WrittenContent{} } for { tok, err := d.Token() if err != nil { return nil, err } switch t := tok.(type) { case xml.StartElement: switch t.Name.Local { case "author": data = nil case "id": data = nil case "page_end": data = nil case "page_start": data = nil case "reference": v, _ := parseReferencePlus(d, &t, &Reference{}) obj.Reference = append(obj.Reference, v) case "style": data = nil case "title": data = nil case "type": data = nil default: // fmt.Println("unknown field", t.Name.Local) d.Skip() } case xml.CharData: data = append(data, t...) case xml.EndElement: if t.Name.Local == start.Name.Local { obj.CheckFields() return obj, nil } switch t.Name.Local { case "author": obj.AuthorHfid = n(data) case "id": obj.Id_ = n(data) case "page_end": obj.PageEnd = n(data) case "page_start": obj.PageStart = n(data) case "reference": case "style": obj.Style = append(obj.Style, string(data)) case "title": obj.Title = string(data) case "type": obj.Type = parseWrittenContentType(string(data)) default: // fmt.Println("unknown field", t.Name.Local) } } } }