/* Options: Date: 2026-04-04 01:20:39 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: GetContactProfile.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Get basic profile and contact details for the specified contact */ // @Route("/contacts/{ContactId}/profile") // @Api(Description="Get basic profile and contact details for the specified contact") public class GetContactProfile : IReturn, Codable { public typealias Return = GetContactProfileResponse /** * Contact Id to get contact profile and details for */ // @ApiMember(DataType="Guid", Description="Contact Id to get contact profile and details for", IsRequired=true, Name="ContactId") public var contactId:String? /** * Contact Id requesting the details - Current user or licensee */ // @ApiMember(DataType="Guid", Description="Contact Id requesting the details - Current user or licensee", IsRequired=true, Name="RequestorContactId") public var requestorContactId:String? required public init(){} } // @ApiResponse(Description="Contact profile and contact details for the specified contact") public class GetContactProfileResponse : Codable { public var contact:UserProfileModel? /** * Is Requestor contact allowed to view contact details? */ // @ApiMember(DataType="bool", Description="Is Requestor contact allowed to view contact details?", Name="RequestorAllowedContactDetails") public var requestorAllowedContactDetails:Bool? /** * Is Requestor contact allowed to view organisation profile? */ // @ApiMember(DataType="bool", Description="Is Requestor contact allowed to view organisation profile?", Name="RequestorAllowedOrganisationProfile") public var requestorAllowedOrganisationProfile:Bool? /** * Is Requestor contact allowed to view staff details? */ // @ApiMember(DataType="bool", Description="Is Requestor contact allowed to view staff details?", Name="RequestorAllowedStaffDetails") public var requestorAllowedStaffDetails:Bool? /** * Is Requestor contact allowed to view attachments? */ // @ApiMember(DataType="bool", Description="Is Requestor contact allowed to view attachments?", Name="RequestorAllowedAttachments") public var requestorAllowedAttachments:Bool? /** * Is Requestor contact allowed to view activity feed? */ // @ApiMember(DataType="bool", Description="Is Requestor contact allowed to view activity feed?", Name="RequestorAllowedActivityFeed") public var requestorAllowedActivityFeed:Bool? /** * Is Requestor contact allowed to view related items? */ // @ApiMember(DataType="bool", Description="Is Requestor contact allowed to view related items?", Name="RequestorAllowedRelatedItems") public var requestorAllowedRelatedItems:Bool? /** * Optional connection emails option allowed for for real contacts who are registered and connected */ // @ApiMember(DataType="bool", Description="Optional connection emails option allowed for for real contacts who are registered and connected", Name="DisplaySendConnectionEmailsOption") public var displaySendConnectionEmailsOption:Bool? public var responseStatus:ResponseStatus? 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) } } }