import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
/**
* Updates a Users Profile information'
*/
@Api(Description="Updates a Users Profile information'")
open class SaveUserProfile
{
/**
* The users profile Guid.
*/
@ApiMember(DataType="Guid", Description="The users profile Guid.", IsRequired=true, Name="UserProfileId", ParameterType="query")
open var UserProfileId:UUID? = null
/**
* The users Guid. This is used for validation to ensure the user in the session is only changing his own user information.
*/
@ApiMember(DataType="Guid", Description="The users Guid. This is used for validation to ensure the user in the session is only changing his own user information.", IsRequired=true, Name="UserId", ParameterType="query")
open var UserId:UUID? = null
/**
* The users contact Guid.
*/
@ApiMember(DataType="Guid", Description="The users contact Guid.", IsRequired=true, Name="ContactId", ParameterType="query")
open var ContactId:UUID? = null
/**
* The users profile name.
*/
@ApiMember(DataType="string", Description="The users profile name.", IsRequired=true, Name="ProfileName", ParameterType="query")
open var ProfileName:String? = null
/**
* The users (contact) title.
*/
@ApiMember(DataType="string", Description="The users (contact) title.", Name="Title", ParameterType="query")
open var Title:String? = null
/**
* The users (contact) first name(s).
*/
@ApiMember(DataType="string", Description="The users (contact) first name(s).", IsRequired=true, Name="FirstName", ParameterType="query")
open var FirstName:String? = null
/**
* The users (contact) surname.
*/
@ApiMember(DataType="string", Description="The users (contact) surname.", IsRequired=true, Name="Surname", ParameterType="query")
open var Surname:String? = null
/**
* The contact profile description.
*/
@ApiMember(DataType="string", Description="The contact profile description.", Name="Description", ParameterType="query")
open var Description:String? = null
/**
* The contacts profession/trade/industry details.
*/
@ApiMember(DataType="string", Description="The contacts profession/trade/industry details.", Name="EmploymentIndustry", ParameterType="query")
open var EmploymentIndustry:String? = null
/**
* The contact details of who they work/subcontract for.
*/
@ApiMember(DataType="string", Description="The contact details of who they work/subcontract for.", Name="EmploymentRole", ParameterType="query")
open var EmploymentRole:String? = null
/**
* The contacts work area/suburbs.
*/
@ApiMember(DataType="string", Description="The contacts work area/suburbs.", Name="EmploymentGeographicArea", ParameterType="query")
open var EmploymentGeographicArea:String? = null
/**
* The contacts timezone.
*/
@ApiMember(DataType="Guid", Description="The contacts timezone.", Name="Timezone", ParameterType="query")
open var Timezone:UUID? = null
/**
* A list of the contact details for the contact. Note: an email must always be set for a business.
*/
@ApiMember(DataType="List<ContactDetailModel>", Description="A list of the contact details for the contact. Note: an email must always be set for a business.", IsRequired=true, Name="ContactDetails", ParameterType="query")
open var ContactDetails:ArrayList<ContactDetailModel> = ArrayList<ContactDetailModel>()
/**
* 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="ContactType")
open var ContactType:UUID? = null
/**
* Legal name of contact linked to the profile
*/
@ApiMember(DataType="string", Description="Legal name of contact linked to the profile", Name="LegalName")
open var LegalName:String? = null
/**
* Trading name of contact linked to the profile
*/
@ApiMember(DataType="string", Description="Trading name of contact linked to the profile", Name="TradingName")
open var TradingName:String? = null
/**
* Abn of contact linked to the profile
*/
@ApiMember(DataType="string", Description="Abn of contact linked to the profile", Name="Abn")
open var Abn:String? = null
/**
* Acn of contact linked to the profile
*/
@ApiMember(DataType="string", Description="Acn of contact linked to the profile", Name="Acn")
open var Acn:String? = null
/**
* Arbn of contact linked to the profile
*/
@ApiMember(DataType="string", Description="Arbn of contact linked to the profile", Name="Arbn")
open var Arbn:String? = null
/**
* Indicates if the Contact is registered for GST.
*/
@ApiMember(DataType="bool", Description="Indicates if the Contact is registered for GST.", Name="GstRegistered", ParameterType="query")
open var GstRegistered:Boolean? = null
/**
* The Gender Guid of the contact.
*/
@ApiMember(DataType="Guid", Description="The Gender Guid of the contact.", Name="GenderId", ParameterType="query")
open var GenderId:UUID? = null
}
open class ContactDetailModel
{
/**
* Id of the Contact Method
*/
@ApiMember(DataType="Guid", Description="Id of the Contact Method", Name="ContactMethodId", ParameterType="body")
open var ContactMethodId:UUID? = null
/**
* Contact Method Name
*/
@ApiMember(DataType="string", Description="Contact Method Name", Name="ContactMethodName", ParameterType="body")
open var ContactMethodName:String? = null
/**
* 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")
open var ContactAddress:ContactAddressModel? = null
/**
* 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")
open var ContactPhone:PhoneModel? = null
/**
* Id of the country
*/
@ApiMember(DataType="Guid?", Description="Id of the country", Name="CountryId", ParameterType="body")
open var CountryId:UUID? = null
/**
* A summary string representing the contact details
*/
@ApiMember(DataType="string", Description="A summary string representing the contact details", Name="ContactDetails", ParameterType="body")
open var ContactDetails:String? = null
/**
* Notes about the contact details
*/
@ApiMember(DataType="string", Description="Notes about the contact details", Name="Notes", ParameterType="body")
open var Notes:String? = null
/**
* 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")
open var ContactDetailsCode:String? = null
/**
* Order number of the contact method
*/
@ApiMember(DataType="int", Description="Order number of the contact method", Name="OrderContactMethod", ParameterType="body")
open var OrderContactMethod:Int? = null
/**
* True if this is the primary contact method
*/
@ApiMember(DataType="bool", Description="True if this is the primary contact method", Name="IsPrimaryContactMethod", ParameterType="body")
open var IsPrimaryContactMethod:Boolean? = null
/**
* True if this contact method is an address
*/
@ApiMember(DataType="bool", Description="True if this contact method is an address", Name="IsAddress", ParameterType="body")
open var IsAddress:Boolean? = null
}
open class ContactAddressModel
{
/**
* Address Details
*/
@ApiMember(DataType="AddressModel", Description="Address Details", Name="Address", ParameterType="body")
open var Address:AddressModel? = null
/**
* True if this is a postal address.
*/
@ApiMember(DataType="bool", Description="True if this is a postal address.", Name="IsPostal", ParameterType="body")
open var IsPostal:Boolean? = null
/**
* True if this is the primary address.
*/
@ApiMember(DataType="bool", Description="True if this is the primary address.", Name="IsPrimaryLocation", ParameterType="body")
open var IsPrimaryLocation:Boolean? = null
/**
* True if this address is the registered tax address.
*/
@ApiMember(DataType="bool", Description="True if this address is the registered tax address.", Name="IsRegisteredLocation", ParameterType="body")
open var IsRegisteredLocation:Boolean? = null
/**
* Suburb Name
*/
@ApiMember(DataType="string", Description="Suburb Name", Name="SuburbName", ParameterType="body")
open var SuburbName:String? = null
/**
* State Name
*/
@ApiMember(DataType="string", Description="State Name", Name="StateName", ParameterType="body")
open var StateName:String? = null
/**
* Country Name
*/
@ApiMember(DataType="string", Description="Country Name", Name="CountryName", ParameterType="body")
open var CountryName:String? = null
}
open class AddressModel
{
/**
* The distance between this project and another specified set of gps coordinates.
*/
@ApiMember(DataType="double", Description="The distance between this project and another specified set of gps coordinates.", Name="DistanceAway", ParameterType="body")
open var DistanceAway:Double? = null
/**
* The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.
*/
@ApiMember(DataType="Double?", Description="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", Name="Latitude", ParameterType="body")
open var Latitude:Double? = null
/**
* The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.
*/
@ApiMember(DataType="Double?", Description="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", Name="Longitude", ParameterType="body")
open var Longitude:Double? = null
/**
* Address Format Id Guid - this will be determined by the service.
*/
@ApiMember(DataType="Guid", Description="Address Format Id Guid - this will be determined by the service.", Name="AddressFormatId", ParameterType="body")
open var AddressFormatId:UUID? = null
/**
* Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered.
*/
@ApiMember(DataType="Guid", Description="Suburb Id Guid - this will attempt to be determined by the SuburbName, StateShortName and Postcode entered.", Name="SuburbId", ParameterType="body")
open var SuburbId:UUID? = null
/**
* The suburb name.
*/
@ApiMember(DataType="string", Description="The suburb name.", Name="SuburbName", ParameterType="body")
open var SuburbName:String? = null
/**
* The shortened State Name e.g Vic for Victoria.
*/
@ApiMember(DataType="string", Description="The shortened State Name e.g Vic for Victoria.", Name="StateShortName", ParameterType="body")
open var StateShortName:String? = null
/**
* The suburb postcode.
*/
@ApiMember(DataType="string", Description="The suburb postcode.", Name="PostCode", ParameterType="body")
open var PostCode:String? = null
/**
* Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered.
*/
@ApiMember(DataType="Guid", Description="Country Id Guid - this will be determined by the CountrName or ISOCountryCode entered.", Name="CountryId", ParameterType="body")
open var CountryId:UUID? = null
/**
* the name of the country the address is within.
*/
@ApiMember(DataType="string", Description="the name of the country the address is within.", Name="CountryName", ParameterType="body")
open var CountryName:String? = null
/**
* ISO Country Code.
*/
@ApiMember(Description="ISO Country Code.", ParameterType="query")
open var ISOCountryCode:String? = null
/**
* The address Lot number.
*/
@ApiMember(DataType="string", Description="The address Lot number.", Name="LotNumber", ParameterType="body")
open var LotNumber:String? = null
/**
* The address Sub Unit number.
*/
@ApiMember(DataType="string", Description="The address Sub Unit number.", Name="SubUnit", ParameterType="body")
open var SubUnit:String? = null
/**
* The address building number.
*/
@ApiMember(DataType="string", Description="The address building number.", Name="BuildingNumber", ParameterType="body")
open var BuildingNumber:String? = null
/**
* The address street number.
*/
@ApiMember(DataType="string", Description="The address street number.", Name="StreetNumber", ParameterType="body")
open var StreetNumber:String? = null
/**
* The address street name including street type.
*/
@ApiMember(DataType="string", Description="The address street name including street type.", Name="StreetName", ParameterType="body")
open var StreetName:String? = null
/**
* A formatted address Line 1.
*/
@ApiMember(DataType="string", Description="A formatted address Line 1.", Name="AddressLineOne", ParameterType="body")
open var AddressLineOne:String? = null
/**
* A formatted address Line 2.
*/
@ApiMember(DataType="string", Description="A formatted address Line 2.", Name="AddressLineTwo", ParameterType="body")
open var AddressLineTwo:String? = null
/**
* The full address string.
*/
@ApiMember(DataType="string", Description="The full address string.", Name="AddressFull", ParameterType="body")
open var AddressFull:String? = null
/**
* True if the address is a physical location.
*/
@ApiMember(DataType="bool?", Description="True if the address is a physical location.", Name="IsPhysical", ParameterType="body")
open var IsPhysical:Boolean? = null
/**
* Notes about the address.
*/
@ApiMember(DataType="string", Description="Notes about the address.", Name="Notes")
open var Notes:String? = null
/**
* If true, the address is eligible for having its coordinates calculated/updated.
*/
@ApiMember(DataType="bool?", Description="If true, the address is eligible for having its coordinates calculated/updated.", Name="AutoMapCoordinates", ParameterType="body")
open var AutoMapCoordinates:Boolean? = null
/**
* Location Coordinates for the address.
*/
@ApiMember(DataType="LocationCoordinates", Description="Location Coordinates for the address.", Name="LocationCoordinates", ParameterType="body")
open var LocationCoordinates:LocationCoordinatesModel? = null
}
open class LocationCoordinatesModel
{
/**
* The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.
*/
@ApiMember(Description="The latitude of an address - geographic coordinates specifying the north-south position of a point on the Earth's surface.", ParameterType="query")
open var Latitude:Double? = null
/**
* The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.
*/
@ApiMember(Description="The longitude of an address - geographic coordinates specifying the east-west position of a point on the Earth's surface.", ParameterType="query")
open var Longitude:Double? = null
/**
* The altitude of an address - the altitude above sea level."
*/
@ApiMember(Description="The altitude of an address - the altitude above sea level.\"", ParameterType="query")
open var Altitude:Double? = null
/**
* Accuracy of the latitude and longitude.
*/
@ApiMember(Description="Accuracy of the latitude and longitude.", ParameterType="query")
open var Accuracy:Double? = null
/**
* Accurancy of the Altitude.
*/
@ApiMember(Description="Accurancy of the Altitude.", ParameterType="query")
open var AltitudeAccuracy:Double? = null
/**
* Direction you are heading.
*/
@ApiMember(Description="Direction you are heading.", ParameterType="query")
open var Heading:Double? = null
/**
* Speed you are going.
*/
@ApiMember(Description="Speed you are going.", ParameterType="query")
open var Speed:Double? = null
/**
* Speed your altitude is ascending/descending at.
*/
@ApiMember(Description="Speed your altitude is ascending/descending at.", ParameterType="query")
open var VerticalSpeed:Double? = null
}
open class PhoneModel
{
/**
* Country Code
*/
@ApiMember(DataType="string", Description="Country Code", Name="CountryCode", ParameterType="body")
open var CountryCode:String? = null
/**
* Area Code
*/
@ApiMember(DataType="string", Description="Area Code", Name="AreaCode", ParameterType="body")
open var AreaCode:String? = null
/**
* Local Number
*/
@ApiMember(DataType="string", Description="Local Number", Name="LocalNumber", ParameterType="body")
open var LocalNumber:String? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/SaveUserProfile HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"UserProfileId":"00000000-0000-0000-0000-000000000000","UserId":"00000000-0000-0000-0000-000000000000","ContactId":"00000000-0000-0000-0000-000000000000","ProfileName":"String","Title":"String","FirstName":"String","Surname":"String","Description":"String","EmploymentIndustry":"String","EmploymentRole":"String","EmploymentGeographicArea":"String","Timezone":"00000000-0000-0000-0000-000000000000","ContactDetails":[{"ContactMethodId":"00000000-0000-0000-0000-000000000000","ContactMethodName":"String","ContactAddress":{"Address":{"DistanceAway":0,"Latitude":0,"Longitude":0,"AddressFormatId":"00000000-0000-0000-0000-000000000000","SuburbId":"00000000-0000-0000-0000-000000000000","SuburbName":"String","StateShortName":"String","PostCode":"String","CountryId":"00000000-0000-0000-0000-000000000000","CountryName":"String","ISOCountryCode":"String","LotNumber":"String","SubUnit":"String","BuildingNumber":"String","StreetNumber":"String","StreetName":"String","AddressLineOne":"String","AddressLineTwo":"String","AddressFull":"String","IsPhysical":false,"Notes":"String","AutoMapCoordinates":false,"LocationCoordinates":{"Latitude":0,"Longitude":0,"Altitude":0,"Accuracy":0,"AltitudeAccuracy":0,"Heading":0,"Speed":0,"VerticalSpeed":0}},"IsPostal":false,"IsPrimaryLocation":false,"IsRegisteredLocation":false,"SuburbName":"String","StateName":"String","CountryName":"String"},"ContactPhone":{"CountryCode":"String","AreaCode":"String","LocalNumber":"String"},"CountryId":"00000000000000000000000000000000","ContactDetails":"String","Notes":"String","ContactDetailsCode":"String","OrderContactMethod":0,"IsPrimaryContactMethod":false,"IsAddress":true}],"ContactType":"00000000-0000-0000-0000-000000000000","LegalName":"String","TradingName":"String","Abn":"String","Acn":"String","Arbn":"String","GstRegistered":false,"GenderId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}