Skip to content

Models

Models are complex data structures representing real-world entities like users and addresses.

Each model combines multiple primitive generators to create rich, structured objects with properly related fields. For example, a User model generates consistent email addresses based on the person’s name, and birthdate that matches the specified age range.

Models are accessed through pseudo-arrays that provide O(1)O(1) random access to infinite objects. Each array is seeded with a world seed for deterministic generation.

Each model type has a unique TypeSequence identifier used in PseudoIDs to distinguish object types.

Address object following OpenID Connect (OIDC) Address Claim.

Represents a physical mailing address with components for street address, locality (city), region (state/province), postal code, country, and locale.

TypeSequence: 110

FieldTypeDescription
idstringDeterministic, sortable PseudoID for this address object.
formattedstringFull mailing address, formatted for display or use on a mailing label.
street_addressstringFull street address component, may include house number, street name,
localitystringCity or locality component.
regionstringState, province, prefecture, or region component.
postal_codestringZip code or postal code component.
countrystringCountry name or code component.
localestringLocale associated with the address.

The AddressLink class provides type-safe navigation methods for relationships between Address objects and related entities.

Methods:

  • me(): Address - Returns the current Address object
  • homeAddressFor(): User - Reverse of homeAddress() on User (O(1)O(1) access)
  • owner(): User - Reverse of addresses() on User (O(1)O(1) access)

Usage:

addresss := NewAddressArray(worldSeed)
link := addresss.LinkAt(index)
address := link.Me()
related := link.HomeAddressFor()

pseudo-array providing O(1)O(1) access to infinite Address objects.

Usage:

addresss := NewAddressArray(worldSeed)
address := addresss.At(index)

Methods:

  • at(index: int): Address - Get Address at specified index (O(1)O(1) access)
  • constructor(worldSeed: uint64) - Create array with given world seed
  • linkAt(index: int): AddressLink - Get AddressLink for relationship navigation at specified index
  • linkFor(obj: Address): AddressLink - Get AddressLink for a given Address object

Group object representing a simple named group.

Used to model collections of users, teams, or other entities with a single group name. The group name is generated as a deterministic, human-friendly nickname.

This model is intentionally minimal, but can be extended to include additional group attributes as needed.

TypeSequence: 102

FieldTypeDescription
idstringDeterministic, sortable pseudo-id for this group object.
namestringDeterministic, human-friendly group name.

The GroupLink class provides type-safe navigation methods for relationships between Group objects and related entities.

Methods:

  • me(): Group - Returns the current Group object
  • members(): Generator<User> - Reverse of primaryGroup() on User (iterates through related objects, O(connector_bits)O(connector\_bits))

Usage:

groups := NewGroupArray(worldSeed)
link := groups.LinkAt(index)
group := link.Me()
related := link.Members()

pseudo-array providing O(1)O(1) access to infinite Group objects.

Usage:

groups := NewGroupArray(worldSeed)
group := groups.At(index)

Methods:

  • at(index: int): Group - Get Group at specified index (O(1)O(1) access)
  • constructor(worldSeed: uint64) - Create array with given world seed
  • linkAt(index: int): GroupLink - Get GroupLink for relationship navigation at specified index
  • linkFor(obj: Group): GroupLink - Get GroupLink for a given Group object

User object following OpenID Connect (OIDC) Standard Claims.

Represents a virtual user with identity information including name components, contact details, gender, locale, and profile picture.

TypeSequence: 101

FieldTypeDescription
idstringDeterministic, sortable pseudo-id for this user object.
substringSubject identifier - a unique identifier for the user.
namestringFull name in displayable form including all name parts.
given_namestringGiven name(s) or first name(s).
family_namestringFamily name(s) or last name(s).
middle_namestringMiddle name(s).
nicknamestringCasual name that may or may not be the same as given_name.
preferred_usernamestringShorthand name by which the user wishes to be referred to.
emailstringEmail address.
genderstringUser’s gender.
localestringLocale of the user.
picturestringURL of the user’s profile picture.
profilestringURL of the End-User’s profile page.
websitestringURL of the End-User’s web page or blog.
email_verifiedbooleanTrue if the End-User’s email address has been verified; otherwise false.
birthdatestringEnd-User’s birthday.
zoneinfostringString from IANA Time Zone Database representing the End-User’s time zone.
phone_numberstringEnd-User’s preferred telephone number.
phone_number_verifiedbooleanTrue if the End-User’s phone number has been verified; otherwise false.
updated_atsafeintTime the End-User’s information was last updated.

The UserLink class provides type-safe navigation methods for relationships between User objects and related entities.

Methods:

  • me(): User - Returns the current User object
  • manager(): User - Navigates to related User (many-to-one) (O(1)O(1) access)
  • directs(): Generator<User> - Reverse of manager() (iterates through related objects, O(connector_bits)O(connector\_bits))
  • primaryGroup(): Group - Navigates to related Group (many-to-one) (O(1)O(1) access)
  • members(): Generator<User> - Reverse of primaryGroup() (iterates through related objects, O(connector_bits)O(connector\_bits))
  • homeAddress(): Address - The primary residential location where the user lives and receives personal mail. (O(1)O(1) access)
  • homeAddressFor(): User - Reverse of homeAddress() (O(1)O(1) access)
  • workAddress(): Address - The professional office or job site location where the user is stationed during business hour. (O(1)O(1) access)
  • addresses(): Generator<Address> - A list of supplemental or miscellaneous locations associated with the user, such as temporary vacation rentals, secondary properties, or old historical records. (iterates through related objects, O(connector_bits)O(connector\_bits))
  • owner(): User - Reverse of addresses() (O(1)O(1) access)
  • directs(): Generator<User> - Reverse of manager() on User (iterates through related objects, O(connector_bits)O(connector\_bits))

Usage:

users := NewUserArray(worldSeed)
link := users.LinkAt(index)
user := link.Me()
related := link.Manager()

pseudo-array providing O(1)O(1) access to infinite User objects.

Usage:

users := NewUserArray(worldSeed)
user := users.At(index)

Methods:

  • at(index: int): User - Get User at specified index (O(1)O(1) access)
  • constructor(worldSeed: uint64) - Create array with given world seed
  • linkAt(index: int): UserLink - Get UserLink for relationship navigation at specified index
  • linkFor(obj: User): UserLink - Get UserLink for a given User object