// @ts-check // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL // This file is automatically generated. DO NOT EDIT // Title is a title export const Title = { // Mister is a title Mister: "Mr", Miss: "Miss", Ms: "Ms", Mrs: "Mrs", Dr: "Dr", }; // Person represents a person export const Person = class { /** * Creates a new Person instance. * @constructor * @param {Object} source - The source object to create the Person. * @param {Title} source.Title * @param {string} source.Name */ constructor(source = {}) { const { title = null, name = "" } = source; this.title = title; this.name = name; } /** * Creates a new Person instance from a string or object. * @param {string|object} source - The source data to create a Person instance from. * @returns {Person} A new Person instance. */ static createFrom(source) { let parsedSource = typeof source === 'string' ? JSON.parse(source) : source; return new Person(parsedSource); } };