/* Options: Date: 2026-04-04 01:22:00 SwiftVersion: 6.0 Version: 8.52 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://pfapi.pstpf.com.au/api //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: SearchContact.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Returns a list of Contact Profiles matching the search criteria provided. */ // @Api(Description="Returns a list of Contact Profiles matching the search criteria provided.") public class SearchContact : IReturn, Codable { public typealias Return = [UserProfileModel] /** * Email Address to search for the contact on. */ // @ApiMember(DataType="string", Description="Email Address to search for the contact on.", IsRequired=true, Name="EmailAddress", ParameterType="query") public var emailAddress:String? required public init(){} } public class UserProfileSummaryModel : Codable { /** * User Profile Id */ // @ApiMember(DataType="Guid", Description="User Profile Id", Name="UserProfileId") public var userProfileId:String? /** * User linked to the profile */ // @ApiMember(DataType="Guid", Description="User linked to the profile", Name="UserId") public var userId:String? /** * Contact linked to the profile */ // @ApiMember(DataType="Guid", Description="Contact linked to the profile", Name="ContactId") public var contactId:String? /** * User linked to the profile */ // @ApiMember(DataType="string", Description="User linked to the profile", Name="UserName") public var userName:String? /** * User Profile Name */ // @ApiMember(DataType="string", Description="User Profile Name", Name="ProfileName") public var profileName:String? /** * Full name of the contact linked to the profile */ // @ApiMember(DataType="string", Description="Full name of the contact linked to the profile", Name="ContactFullName") public var contactFullName:String? /** * Email Address of the contact linked to the profile */ // @ApiMember(DataType="string", Description="Email Address of the contact linked to the profile", Name="EmailAddress") public var emailAddress:String? /** * Email signature of the contact linked to the profile */ // @ApiMember(DataType="string", Description="Email signature of the contact linked to the profile", Name="EmailSignature") public var emailSignature:String? /** * Mobile number of the contact linked to the profile */ // @ApiMember(DataType="string", Description="Mobile number of the contact linked to the profile", Name="MobileNumber") public var mobileNumber:String? /** * Phone number of the contact linked to the profile */ // @ApiMember(DataType="string", Description="Phone number of the contact linked to the profile", Name="PhoneNumber") public var phoneNumber:String? /** * Type of contact (person, organisation etc.) linked to the profile */ // @ApiMember(DataType="string", Description="Type of contact (person, organisation etc.) linked to the profile", Name="ContactTypeId") public var contactTypeId:String? /** * Type of contact (person, organisation etc.) linked to the profile */ // @ApiMember(DataType="string", Description="Type of contact (person, organisation etc.) linked to the profile", Name="ContactTypeName") public var contactTypeName:String? /** * First name of the contact linked to the profile */ // @ApiMember(DataType="string", Description="First name of the contact linked to the profile", Name="FirstName") public var firstName:String? /** * Surname of the contact linked to the profile */ // @ApiMember(DataType="string", Description="Surname of the contact linked to the profile", Name="Surname") public var surname:String? /** * Title of contact linked to the profile */ // @ApiMember(DataType="string", Description="Title of contact linked to the profile", Name="Title") public var title:String? /** * Legal name of contact linked to the profile */ // @ApiMember(DataType="string", Description="Legal name of contact linked to the profile", Name="LegalName") public var legalName:String? /** * Trading name of contact linked to the profile */ // @ApiMember(DataType="string", Description="Trading name of contact linked to the profile", Name="TradingName") public var tradingName:String? /** * Australian Business Number */ // @ApiMember(DataType="string", Description="Australian Business Number", Name="Abn", ParameterType="query") public var abn:String? /** * Australian Company Number */ // @ApiMember(DataType="string", Description="Australian Company Number", Name="Acn", ParameterType="query") public var acn:String? /** * Australian Registered Body Number */ // @ApiMember(DataType="string", Description="Australian Registered Body Number", Name="Arbn", ParameterType="query") public var arbn:String? /** * Indicates if the Contact is registered for GST. */ // @ApiMember(DataType="bool", Description="Indicates if the Contact is registered for GST.", Name="GstRegistered", ParameterType="query") public var gstRegistered:Bool? /** * True if english is a secondary language for the contact. */ // @ApiMember(DataType="bool", Description="True if english is a secondary language for the contact.", Name="ESL", ParameterType="query") public var esl:Bool? /** * Language that is the primary language for the contact. */ // @ApiMember(DataType="string", Description="Language that is the primary language for the contact.", Name="Language", ParameterType="query") public var language:String? /** * True if an interpreter is required. */ // @ApiMember(DataType="bool", Description="True if an interpreter is required.", Name="InterpreterRequired", ParameterType="query") public var interpreterRequired:Bool? /** * Licensee specific notes about the contact. */ // @ApiMember(DataType="string", Description="Licensee specific notes about the contact.", Name="LicenseeNotes", ParameterType="query") public var licenseeNotes:String? /** * Profile photo of contact linked to the profile */ // @ApiMember(DataType="string", Description="Profile photo of contact linked to the profile", Name="ProfilePhotoUrl") public var profilePhotoUrl:String? /** * Thumbnail photo of contact linked to the profile */ // @ApiMember(DataType="string", Description="Thumbnail photo of contact linked to the profile", Name="ProfilePhotoThumbnailUrl") public var profilePhotoThumbnailUrl:String? /** * Profile photo id of contact linked to the profile */ // @ApiMember(DataType="Guid", Description="Profile photo id of contact linked to the profile", Name="ProfileImageId") public var profileImageId:String? /** * Profile description */ // @ApiMember(DataType="string", Description="Profile description", Name="Description") public var Description:String? /** * Employment Industry */ // @ApiMember(DataType="string", Description="Employment Industry", Name="EmploymentIndustry") public var employmentIndustry:String? /** * Employment Role */ // @ApiMember(DataType="string", Description="Employment Role", Name="EmploymentRole") public var employmentRole:String? /** * Areas of Work */ // @ApiMember(DataType="string", Description="Areas of Work", Name="EmploymentGeographicArea") public var employmentGeographicArea:String? /** * The contacts timezone. */ // @ApiMember(DataType="Guid", Description="The contacts timezone.", Name="Timezone", ParameterType="query") public var timezone:String? /** * Timezone Name */ // @ApiMember(DataType="string", Description="Timezone Name", Name="TimezoneName", ParameterType="query") public var timezoneName:String? /** * The primary address of the contact */ // @ApiMember(DataType="string", Description="The primary address of the contact", Name="PrimaryAddress", ParameterType="query") public var primaryAddress:String? /** * Is this an active contact? Or an inactive contact (deleted account)? */ // @ApiMember(DataType="bool", Description="Is this an active contact? Or an inactive contact (deleted account)?", Name="IsActiveContact") public var isActiveContact:Bool? required public init(){} } public class ContactDetailModel : Codable { /** * Id of the Contact Method */ // @ApiMember(DataType="Guid", Description="Id of the Contact Method", Name="ContactMethodId", ParameterType="body") public var contactMethodId:String? /** * Contact Method Name */ // @ApiMember(DataType="string", Description="Contact Method Name", Name="ContactMethodName", ParameterType="body") public var contactMethodName:String? /** * If the contact method is an address, this will contain the address details. */ // @ApiMember(DataType="ContactAddressModel", Description="If the contact method is an address, this will contain the address details.", Name="ContactAddress", ParameterType="body") public var contactAddress:ContactAddressModel? /** * If the contact method is a phone, this will contain the phone details */ // @ApiMember(DataType="PhoneModel", Description="If the contact method is a phone, this will contain the phone details", Name="ContactPhone", ParameterType="body") public var contactPhone:PhoneModel? /** * Id of the country */ // @ApiMember(DataType="Guid?", Description="Id of the country", Name="CountryId", ParameterType="body") public var countryId:String? /** * A summary string representing the contact details */ // @ApiMember(DataType="string", Description="A summary string representing the contact details", Name="ContactDetails", ParameterType="body") public var contactDetails:String? /** * Notes about the contact details */ // @ApiMember(DataType="string", Description="Notes about the contact details", Name="Notes", ParameterType="body") public var notes:String? /** * Area Code if contact details are a phone number */ // @ApiMember(DataType="string", Description="Area Code if contact details are a phone number", Name="ContactDetailsCode", ParameterType="body") public var contactDetailsCode:String? /** * Order number of the contact method */ // @ApiMember(DataType="int", Description="Order number of the contact method", Name="OrderContactMethod", ParameterType="body") public var orderContactMethod:Int? /** * True if this is the primary contact method */ // @ApiMember(DataType="bool", Description="True if this is the primary contact method", Name="IsPrimaryContactMethod", ParameterType="body") public var isPrimaryContactMethod:Bool? /** * True if this contact method is an address */ // @ApiMember(DataType="bool", Description="True if this contact method is an address", Name="IsAddress", ParameterType="body") public var isAddress:Bool? required public init(){} } public class ContactDetailModel : Codable { /** * Contact Method Id */ // @ApiMember(DataType="Guid", Description="Contact Method Id", Name="ContactMethodId", ParameterType="query") public var contactMethodId:String? /** * Contact Method Name */ // @ApiMember(DataType="string", Description="Contact Method Name", Name="ContactMethodName", ParameterType="query") public var contactMethodName:String? /** * Contact Address Details */ // @ApiMember(DataType="ContactAddressModel", Description="Contact Address Details", Name="ContactAddress", ParameterType="query") public var contactAddress:ContactAddressModel? /** * Contact Phone Details */ // @ApiMember(DataType="PhoneModel", Description="Contact Phone Details", Name="ContactPhone", ParameterType="query") public var contactPhone:PhoneModel? /** * Country id */ // @ApiMember(DataType="Guid", Description="Country id", Name="CountryId", ParameterType="query") public var countryId:String? /** * Contact Details */ // @ApiMember(DataType="string", Description="Contact Details", Name="ContactDetails", ParameterType="query") public var contactDetails:String? /** * Notes */ // @ApiMember(DataType="string", Description="Notes", Name="Notes", ParameterType="query") public var notes:String? /** * Contact Details Code */ // @ApiMember(DataType="string", Description="Contact Details Code", Name="ContactDetailsCode", ParameterType="query") public var contactDetailsCode:String? /** * Order of Contact Method Id */ // @ApiMember(DataType="int", Description="Order of Contact Method Id", Name="OrderContactMethod", ParameterType="query") public var orderContactMethod:Int? /** * Contact Method Id */ // @ApiMember(DataType="bool", Description="Contact Method Id", Name="IsPrimaryContactMethod", ParameterType="query") public var isPrimaryContactMethod:Bool? /** * Is contact details an address */ // @ApiMember(DataType="bool", Description="Is contact details an address", Name="IsAddress", ParameterType="query") public var isAddress:Bool? /** * Contact Contact Detail Id */ // @ApiMember(DataType="Guid", Description="Contact Contact Detail Id", Name="ContactContactDetailId", ParameterType="query") public var contactContactDetailId:String? /** * Contact Id */ // @ApiMember(DataType="Guid", Description="Contact Id", Name="ContactId", ParameterType="query") public var contactId:String? /** * Contact Details Id */ // @ApiMember(DataType="Guid", Description="Contact Details Id", Name="ContactDetailId", ParameterType="query") public var contactDetailId:String? /** * Is contact details a primary location */ // @ApiMember(DataType="bool", Description="Is contact details a primary location", Name="IsPrimaryLocation", ParameterType="query") public var isPrimaryLocation:Bool? /** * Is contact details a registered location */ // @ApiMember(DataType="bool", Description="Is contact details a registered location", Name="IsRegisteredLocation", ParameterType="query") public var isRegisteredLocation:Bool? /** * Is contact details a postal address */ // @ApiMember(DataType="bool", Description="Is contact details a postal address", Name="IsPostal", ParameterType="query") public var isPostal:Bool? /** * Is contact details a phone number */ // @ApiMember(DataType="bool", Description="Is contact details a phone number", Name="IsPhone", ParameterType="query") public var isPhone:Bool? /** * Email Signature Id */ // @ApiMember(DataType="Guid", Description="Email Signature Id", Name="EmailSignatureId", ParameterType="query") public var emailSignatureId:String? /** * Email Signature HTML */ // @ApiMember(DataType="string", Description="Email Signature HTML", Name="EmailSignatureHTML", ParameterType="query") public var emailSignatureHTML:String? /** * Email Signature Text */ // @ApiMember(DataType="string", Description="Email Signature Text", Name="EmailSignatureText", ParameterType="query") public var emailSignatureText:String? /** * API Key from Framework */ // @ApiMember(DataType="string", Description="API Key from Framework", Name="ApiFrameworkAlternateKey", ParameterType="query") public var apiFrameworkAlternateKey:String? required public init(){} } public class UserProfileModel : UserProfileSummaryModel { /** * Contact Date of Birth (when person type) */ // @ApiMember(DataType="DateTime?", Description="Contact Date of Birth (when person type)", Name="BirthDate", ParameterType="query") public var birthDate:Date? /** * Contact marital status (when person type) */ // @ApiMember(DataType="string", Description="Contact marital status (when person type)", Name="MaritalStatusName", ParameterType="query") public var maritalStatusName:String? /** * Contact gender (when person type) */ // @ApiMember(DataType="string", Description="Contact gender (when person type)", Name="GenderName", ParameterType="query") public var genderName:String? /** * The Gender Guid of the contact. */ // @ApiMember(DataType="Guid", Description="The Gender Guid of the contact.", Name="GenderId", ParameterType="query") public var genderId:String? /** * All contact details of the contact */ // @ApiMember(DataType="List", Description="All contact details of the contact", Name="ContactDetails", ParameterType="query") public var contactDetails:[ContactDetailModel]? /** * Primary Street Address */ // @ApiMember(DataType="ContactDetail", Description="Primary Street Address", Name="PrimaryStreetAddress ") public var primaryStreetAddress:ContactDetailModel? /** * Primary Postal Address */ // @ApiMember(DataType="ContactDetail", Description="Primary Postal Address", Name="PrimaryPostalAddress ") public var primaryPostalAddress:ContactDetailModel? /** * Primary Registered Address */ // @ApiMember(DataType="ContactDetail", Description="Primary Registered Address", Name="PrimaryRegisteredAddress ") public var primaryRegisteredAddress:ContactDetailModel? /** * Primary Email Address */ // @ApiMember(DataType="ContactDetail", Description="Primary Email Address", Name="PrimaryEmail ") public var primaryEmail:ContactDetailModel? /** * Primary Mobile Number */ // @ApiMember(DataType="ContactDetail", Description="Primary Mobile Number", Name="PrimaryMobile") public var primaryMobile:ContactDetailModel? /** * Primary Non-Mobile Number */ // @ApiMember(DataType="ContactDetail", Description="Primary Non-Mobile Number", Name="PrimaryPhone") public var primaryPhone:ContactDetailModel? /** * Primary Fax Number */ // @ApiMember(DataType="ContactDetail", Description="Primary Fax Number", Name="PrimaryFax") public var primaryFax:ContactDetailModel? /** * Primary Web Address */ // @ApiMember(DataType="ContactDetail", Description="Primary Web Address", Name="PrimaryWeb") public var primaryWeb:ContactDetailModel? /** * Social Media Twitter */ // @ApiMember(DataType="ContactDetail", Description="Social Media Twitter", Name="SocialMediaTwitter") public var socialMediaTwitter:ContactDetailModel? /** * Social Media Facebook */ // @ApiMember(DataType="ContactDetail", Description="Social Media Facebook", Name="SocialMediaFacebook") public var socialMediaFacebook:ContactDetailModel? /** * Social Media Instagram */ // @ApiMember(DataType="ContactDetail", Description="Social Media Instagram", Name="SocialMediaInstagram") public var socialMediaInstagram:ContactDetailModel? /** * Have all connections to the contact been removed? */ // @ApiMember(DataType="bool", Description="Have all connections to the contact been removed?", Name="IsRemovedContact") public var isRemovedContact:Bool? /** * True if this is the users default profile. */ // @ApiMember(DataType="bool", Description="True if this is the users default profile.", Name="IsDefault", ParameterType="query") public var isDefault:Bool? /** * True if the users email on this profile can be edited. */ // @ApiMember(DataType="bool", Description="True if the users email on this profile can be edited.", Name="IsEmailEditable", ParameterType="query") public var isEmailEditable:Bool? /** * Primary image Content sent as a file stream contents (if not attached to the request) */ // @ApiMember(DataType="string", Description="Primary image Content sent as a file stream contents (if not attached to the request)", Name="PrimaryImageContent") public var primaryImageContent:String? /** * Primary image Content type sent as a file stream contents (if not attached to the request) */ // @ApiMember(DataType="string", Description="Primary image Content type sent as a file stream contents (if not attached to the request)", Name="PrimaryImageContentType") public var primaryImageContentType:String? /** * Primary image file name */ // @ApiMember(DataType="string", Description="Primary image file name", Name="PrimaryImageFileName") public var primaryImageFileName:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case birthDate case maritalStatusName case genderName case genderId case contactDetails case primaryStreetAddress case primaryPostalAddress case primaryRegisteredAddress case primaryEmail case primaryMobile case primaryPhone case primaryFax case primaryWeb case socialMediaTwitter case socialMediaFacebook case socialMediaInstagram case isRemovedContact case isDefault case isEmailEditable case primaryImageContent case primaryImageContentType case primaryImageFileName } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) birthDate = try container.decodeIfPresent(Date.self, forKey: .birthDate) maritalStatusName = try container.decodeIfPresent(String.self, forKey: .maritalStatusName) genderName = try container.decodeIfPresent(String.self, forKey: .genderName) genderId = try container.decodeIfPresent(String.self, forKey: .genderId) contactDetails = try container.decodeIfPresent([ContactDetailModel].self, forKey: .contactDetails) ?? [] primaryStreetAddress = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryStreetAddress) primaryPostalAddress = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryPostalAddress) primaryRegisteredAddress = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryRegisteredAddress) primaryEmail = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryEmail) primaryMobile = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryMobile) primaryPhone = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryPhone) primaryFax = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryFax) primaryWeb = try container.decodeIfPresent(ContactDetailModel.self, forKey: .primaryWeb) socialMediaTwitter = try container.decodeIfPresent(ContactDetailModel.self, forKey: .socialMediaTwitter) socialMediaFacebook = try container.decodeIfPresent(ContactDetailModel.self, forKey: .socialMediaFacebook) socialMediaInstagram = try container.decodeIfPresent(ContactDetailModel.self, forKey: .socialMediaInstagram) isRemovedContact = try container.decodeIfPresent(Bool.self, forKey: .isRemovedContact) isDefault = try container.decodeIfPresent(Bool.self, forKey: .isDefault) isEmailEditable = try container.decodeIfPresent(Bool.self, forKey: .isEmailEditable) primaryImageContent = try container.decodeIfPresent(String.self, forKey: .primaryImageContent) primaryImageContentType = try container.decodeIfPresent(String.self, forKey: .primaryImageContentType) primaryImageFileName = try container.decodeIfPresent(String.self, forKey: .primaryImageFileName) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if birthDate != nil { try container.encode(birthDate, forKey: .birthDate) } if maritalStatusName != nil { try container.encode(maritalStatusName, forKey: .maritalStatusName) } if genderName != nil { try container.encode(genderName, forKey: .genderName) } if genderId != nil { try container.encode(genderId, forKey: .genderId) } if contactDetails != nil { try container.encode(contactDetails, forKey: .contactDetails) } if primaryStreetAddress != nil { try container.encode(primaryStreetAddress, forKey: .primaryStreetAddress) } if primaryPostalAddress != nil { try container.encode(primaryPostalAddress, forKey: .primaryPostalAddress) } if primaryRegisteredAddress != nil { try container.encode(primaryRegisteredAddress, forKey: .primaryRegisteredAddress) } if primaryEmail != nil { try container.encode(primaryEmail, forKey: .primaryEmail) } if primaryMobile != nil { try container.encode(primaryMobile, forKey: .primaryMobile) } if primaryPhone != nil { try container.encode(primaryPhone, forKey: .primaryPhone) } if primaryFax != nil { try container.encode(primaryFax, forKey: .primaryFax) } if primaryWeb != nil { try container.encode(primaryWeb, forKey: .primaryWeb) } if socialMediaTwitter != nil { try container.encode(socialMediaTwitter, forKey: .socialMediaTwitter) } if socialMediaFacebook != nil { try container.encode(socialMediaFacebook, forKey: .socialMediaFacebook) } if socialMediaInstagram != nil { try container.encode(socialMediaInstagram, forKey: .socialMediaInstagram) } if isRemovedContact != nil { try container.encode(isRemovedContact, forKey: .isRemovedContact) } if isDefault != nil { try container.encode(isDefault, forKey: .isDefault) } if isEmailEditable != nil { try container.encode(isEmailEditable, forKey: .isEmailEditable) } if primaryImageContent != nil { try container.encode(primaryImageContent, forKey: .primaryImageContent) } if primaryImageContentType != nil { try container.encode(primaryImageContentType, forKey: .primaryImageContentType) } if primaryImageFileName != nil { try container.encode(primaryImageFileName, forKey: .primaryImageFileName) } } }