/* Options: Date: 2026-04-03 23:29:48 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: GetUserProfiles.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Returns a Users profile information. */ // @Route("/profiles") // @Api(Description="Returns a Users profile information.") public class GetUserProfiles : IReturn, Codable { public typealias Return = UserProfilesWithRolesModel /** * The user's Guid. If the value passed is empty, UserName must be entered. */ // @ApiMember(DataType="Guid?", Description="The user's Guid. If the value passed is empty, UserName must be entered.", Name="UserId", ParameterType="query") public var userId:String? /** * Unique Email address of the user. If the value passed is empty, UserId must be entered. */ // @ApiMember(DataType="string", Description="Unique Email address of the user. If the value passed is empty, UserId must be entered.", Name="UserName", ParameterType="query") public var userName:String? /** * Flag to exclude contact details from organisation profiles. */ // @ApiMember(DataType="bool", Description="Flag to exclude contact details from organisation profiles.", Name="ExcludeContactDetails", ParameterType="query") public var excludeContactDetails:Bool? required public init(){} } public class UserProfilesWithRolesModel : Codable { /** * A list of profiles for the user. */ // @ApiMember(DataType="List", Description="A list of profiles for the user.", Name="Profiles") public var profiles:[UserProfileWithRolesModel]? required public init(){} } public class UserRoleModel : Codable { /** * The Contact Role Id, that links the Contact to their role. */ // @ApiMember(DataType="Guid", Description="The Contact Role Id, that links the Contact to their role.", Name="ContactRoleId", ParameterType="query") public var contactRoleId:String? /** * The Role Id. */ // @ApiMember(DataType="Guid", Description="The Role Id.", Name="RoleId", ParameterType="query") public var roleId:String? /** * The role name. */ // @ApiMember(DataType="string", Description="The role name.", Name="RoleName", ParameterType="query") public var roleName:String? /** * The URL of the role's image icon. */ // @ApiMember(DataType="string", Description="The URL of the role's image icon.", Name="RolePrimaryImageURL", ParameterType="query") public var rolePrimaryImageURL:String? /** * The URL of the role's thumbnail image icon. */ // @ApiMember(DataType="string", Description="The URL of the role's thumbnail image icon.", Name="RolePrimaryImageThumbnailURL", ParameterType="query") public var rolePrimaryImageThumbnailURL:String? /** * The Guid of the role's media file containing the image icon details. */ // @ApiMember(DataType="string", Description="The Guid of the role's media file containing the image icon details.", Name="RolePrimaryImageId", ParameterType="query") public var rolePrimaryImageId:String? /** * The date the contact started having this role. */ // @ApiMember(DataType="DateTime", Description="The date the contact started having this role.", Name="StartDate", ParameterType="query") public var startDate:Date? /** * The date the contact will end having this role. */ // @ApiMember(DataType="DateTime?", Description="The date the contact will end having this role.", Name="EndDate", ParameterType="query") public var endDate:Date? required public init(){} } public class UserContactConnectionModel : Codable { /** * The Contact Role Id, that links the Contact to their role. */ // @ApiMember(DataType="Guid", Description="The Contact Role Id, that links the Contact to their role.", Name="ContactRoleId", ParameterType="query") public var contactRoleId:String? /** * The role name. */ // @ApiMember(DataType="string", Description="The role name.", Name="ContactRoleName", ParameterType="query") public var contactRoleName:String? /** * The list item role Id. */ // @ApiMember(DataType="Guid", Description="The list item role Id.", Name="ContactListItemRoleId", ParameterType="query") public var contactListItemRoleId:String? /** * The URL of the contact role's image icon. */ // @ApiMember(DataType="string", Description="The URL of the contact role's image icon.", Name="ContactRolePrimaryImageURL", ParameterType="query") public var contactRolePrimaryImageURL:String? /** * The URL of the contact role's thumbnail image icon. */ // @ApiMember(DataType="string", Description="The URL of the contact role's thumbnail image icon.", Name="ContactRolePrimaryImageThumbnailURL", ParameterType="query") public var contactRolePrimaryImageThumbnailURL:String? /** * The Guid of the contact role's media file containing the image icon details. */ // @ApiMember(DataType="string", Description="The Guid of the contact role's media file containing the image icon details.", Name="ContactRolePrimaryImageId", ParameterType="query") public var contactRolePrimaryImageId:String? /** * The connected contacts Id. (licensee) */ // @ApiMember(DataType="string", Description="The connected contacts Id. (licensee)", Name="ConnectionContactId", ParameterType="query") public var connectionContactId:String? /** * The connected contacts Full Name. */ // @ApiMember(DataType="string", Description="The connected contacts Full Name.", Name="ConnectionContactName", ParameterType="query") public var connectionContactName:String? /** * The connected contacts role. */ // @ApiMember(DataType="string", Description="The connected contacts role.", Name="ConnectionContactRoleName", ParameterType="query") public var connectionContactRoleName:String? /** * The connected contacts role Id. */ // @ApiMember(DataType="Guid", Description="The connected contacts role Id.", Name="ConnectionContactRoleId", ParameterType="query") public var connectionContactRoleId:String? /** * The connected contacts list item role Id. */ // @ApiMember(DataType="Guid", Description="The connected contacts list item role Id.", Name="ConnectionContactListItemRoleId", ParameterType="query") public var connectionContactListItemRoleId:String? /** * The Contacts Type. */ // @ApiMember(DataType="string", Description="The Contacts Type.", Name="ContactTypeName", ParameterType="query") public var contactTypeName:String? /** * The URL to the Connected Contacts Photo. */ // @ApiMember(DataType="string", Description="The URL to the Connected Contacts Photo.", Name="ConnectionContactPhotoURL", ParameterType="query") public var connectionContactPhotoURL:String? /** * . */ // @ApiMember(DataType="bool", Description=".", Name="IsContactLicenseeRole", ParameterType="query") public var isContactLicenseeRole:Bool? /** * If the connection is as a licensee this is true. */ // @ApiMember(DataType="bool", Description="If the connection is as a licensee this is true.", Name="IsConnectionLicenseeRole", ParameterType="query") public var isConnectionLicenseeRole:Bool? /** * The status of the connection with the contact. */ // @ApiMember(DataType="string", Description="The status of the connection with the contact.", Name="ConnectionStatusName", ParameterType="query") public var connectionStatusName:String? /** * The status Id of the connection with the contact. */ // @ApiMember(DataType="Guid", Description="The status Id of the connection with the contact.", Name="ConnectionStatusId", ParameterType="query") public var connectionStatusId:String? /** * The ContactRoleConnectionId of an active connection with the contact. */ // @ApiMember(DataType="Guid", Description="The ContactRoleConnectionId of an active connection with the contact.", Name="ConnectionId", ParameterType="query") public var connectionId:String? /** * The ContactRoleConnectionRequest of a pending connection with the contact. */ // @ApiMember(DataType="Guid", Description="The ContactRoleConnectionRequest of a pending connection with the contact.", Name="ConnectionRequestId", ParameterType="query") public var connectionRequestId:String? required public init(){} } public class ContactEmailAddress : Codable { /** * The Contact Id of the contact. */ // @ApiMember(DataType="Guid", Description="The Contact Id of the contact.", Name="ContactId", ParameterType="query") public var contactId:String? /** * The Contact Full Name */ // @ApiMember(DataType="string", Description="The Contact Full Name", Name="ContactName", ParameterType="query") public var contactName:String? /** * The Contact Email Address. */ // @ApiMember(DataType="string", Description="The Contact Email Address.", Name="EmailAddress", ParameterType="query") public var emailAddress:String? /** * The Contact Photo URL */ // @ApiMember(DataType="string", Description="The Contact Photo URL", Name="ContactPhotoURL", ParameterType="query") public var contactPhotoURL:String? required public init(){} } public class UserProfileWithRolesModel : UserProfileModel { /** * A list of roles assigned to the user. */ // @ApiMember(DataType="List", Description="A list of roles assigned to the user.", Name="Roles", ParameterType="query") public var roles:[UserRoleModel]? /** * A list of contact connections assigned to the user. */ // @ApiMember(DataType="List", Description="A list of contact connections assigned to the user.", Name="ContactConnections", ParameterType="query") public var contactConnections:[UserContactConnectionModel]? /** * A list of connected contacts and their email addresses. */ // @ApiMember(DataType="List", Description="A list of connected contacts and their email addresses.", Name="EmailAddressBook", ParameterType="query") public var emailAddressBook:[ContactEmailAddress]? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case roles case contactConnections case emailAddressBook } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) roles = try container.decodeIfPresent([UserRoleModel].self, forKey: .roles) ?? [] contactConnections = try container.decodeIfPresent([UserContactConnectionModel].self, forKey: .contactConnections) ?? [] emailAddressBook = try container.decodeIfPresent([ContactEmailAddress].self, forKey: .emailAddressBook) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if roles != nil { try container.encode(roles, forKey: .roles) } if contactConnections != nil { try container.encode(contactConnections, forKey: .contactConnections) } if emailAddressBook != nil { try container.encode(emailAddressBook, forKey: .emailAddressBook) } } } 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) } } }