Class REST.Test.Person Extends %Persistent
{
/// Person's name.
Property Name As %String [ Required ];
/// Person's Social Security number. This is validated using pattern match.
Property SSN As %String [ Required ];
/// Person's Date of Birth.
Property DOB As %Date;
/// Person's home address. This uses an embedded object.
Property Home As Address;
/// Person's office address. This uses an embedded object.
Property Office As Address;
/// Person's spouse. This is a reference to another persistent object.
Property Spouse As Person;
/// A collection of strings representing the person's favorite colors.
Property FavoriteColors As list Of %String;
/// A collection of strings representing the person's favorite colors.
Property FavoriteNumbers As array Of %Integer;
/// Person's age.
/// This is a calculated field whose value is derived from DOB.
Property Age As %Integer;
}
Class REST.Test.Address Extends %SerialObject
{
/// The street address.
Property Street As %String(MAXLEN = 80);
/// The city name.
Property City As %String(MAXLEN = 80);
/// The 2-letter state abbreviation.
Property State As %String(MAXLEN = 2);
/// The 5-digit U.S. Zone Improvement Plan (ZIP) code.
Property Zip As %String(MAXLEN = 5);
}