| All Verbs | /api/contactgroup/{ContactGroupId} |
|---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class UserProfileSummaryModel implements JsonSerializable
{
public function __construct(
/** @description User Profile Id */
// @ApiMember(DataType="Guid", Description="User Profile Id", Name="UserProfileId")
/** @var string */
public string $UserProfileId='',
/** @description User linked to the profile */
// @ApiMember(DataType="Guid", Description="User linked to the profile", Name="UserId")
/** @var string */
public string $UserId='',
/** @description Contact linked to the profile */
// @ApiMember(DataType="Guid", Description="Contact linked to the profile", Name="ContactId")
/** @var string */
public string $ContactId='',
/** @description User linked to the profile */
// @ApiMember(DataType="string", Description="User linked to the profile", Name="UserName")
/** @var string|null */
public ?string $UserName=null,
/** @description User Profile Name */
// @ApiMember(DataType="string", Description="User Profile Name", Name="ProfileName")
/** @var string|null */
public ?string $ProfileName=null,
/** @description Full name of the contact linked to the profile */
// @ApiMember(DataType="string", Description="Full name of the contact linked to the profile", Name="ContactFullName")
/** @var string|null */
public ?string $ContactFullName=null,
/** @description Email Address of the contact linked to the profile */
// @ApiMember(DataType="string", Description="Email Address of the contact linked to the profile", Name="EmailAddress")
/** @var string|null */
public ?string $EmailAddress=null,
/** @description Email signature of the contact linked to the profile */
// @ApiMember(DataType="string", Description="Email signature of the contact linked to the profile", Name="EmailSignature")
/** @var string|null */
public ?string $EmailSignature=null,
/** @description Mobile number of the contact linked to the profile */
// @ApiMember(DataType="string", Description="Mobile number of the contact linked to the profile", Name="MobileNumber")
/** @var string|null */
public ?string $MobileNumber=null,
/** @description Phone number of the contact linked to the profile */
// @ApiMember(DataType="string", Description="Phone number of the contact linked to the profile", Name="PhoneNumber")
/** @var string|null */
public ?string $PhoneNumber=null,
/** @description 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")
/** @var string */
public string $ContactTypeId='',
/** @description 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")
/** @var string|null */
public ?string $ContactTypeName=null,
/** @description First name of the contact linked to the profile */
// @ApiMember(DataType="string", Description="First name of the contact linked to the profile", Name="FirstName")
/** @var string|null */
public ?string $FirstName=null,
/** @description Surname of the contact linked to the profile */
// @ApiMember(DataType="string", Description="Surname of the contact linked to the profile", Name="Surname")
/** @var string|null */
public ?string $Surname=null,
/** @description Title of contact linked to the profile */
// @ApiMember(DataType="string", Description="Title of contact linked to the profile", Name="Title")
/** @var string|null */
public ?string $Title=null,
/** @description Legal name of contact linked to the profile */
// @ApiMember(DataType="string", Description="Legal name of contact linked to the profile", Name="LegalName")
/** @var string|null */
public ?string $LegalName=null,
/** @description Trading name of contact linked to the profile */
// @ApiMember(DataType="string", Description="Trading name of contact linked to the profile", Name="TradingName")
/** @var string|null */
public ?string $TradingName=null,
/** @description Australian Business Number */
// @ApiMember(DataType="string", Description="Australian Business Number", Name="Abn", ParameterType="query")
/** @var string|null */
public ?string $Abn=null,
/** @description Australian Company Number */
// @ApiMember(DataType="string", Description="Australian Company Number", Name="Acn", ParameterType="query")
/** @var string|null */
public ?string $Acn=null,
/** @description Australian Registered Body Number */
// @ApiMember(DataType="string", Description="Australian Registered Body Number", Name="Arbn", ParameterType="query")
/** @var string|null */
public ?string $Arbn=null,
/** @description Indicates if the Contact is registered for GST. */
// @ApiMember(DataType="bool", Description="Indicates if the Contact is registered for GST.", Name="GstRegistered", ParameterType="query")
/** @var bool|null */
public ?bool $GstRegistered=null,
/** @description 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")
/** @var bool|null */
public ?bool $ESL=null,
/** @description 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")
/** @var string|null */
public ?string $Language=null,
/** @description True if an interpreter is required. */
// @ApiMember(DataType="bool", Description="True if an interpreter is required.", Name="InterpreterRequired", ParameterType="query")
/** @var bool|null */
public ?bool $InterpreterRequired=null,
/** @description Licensee specific notes about the contact. */
// @ApiMember(DataType="string", Description="Licensee specific notes about the contact.", Name="LicenseeNotes", ParameterType="query")
/** @var string|null */
public ?string $LicenseeNotes=null,
/** @description Profile photo of contact linked to the profile */
// @ApiMember(DataType="string", Description="Profile photo of contact linked to the profile", Name="ProfilePhotoUrl")
/** @var string|null */
public ?string $ProfilePhotoUrl=null,
/** @description Thumbnail photo of contact linked to the profile */
// @ApiMember(DataType="string", Description="Thumbnail photo of contact linked to the profile", Name="ProfilePhotoThumbnailUrl")
/** @var string|null */
public ?string $ProfilePhotoThumbnailUrl=null,
/** @description Profile photo id of contact linked to the profile */
// @ApiMember(DataType="Guid", Description="Profile photo id of contact linked to the profile", Name="ProfileImageId")
/** @var string */
public string $ProfileImageId='',
/** @description Profile description */
// @ApiMember(DataType="string", Description="Profile description", Name="Description")
/** @var string|null */
public ?string $Description=null,
/** @description Employment Industry */
// @ApiMember(DataType="string", Description="Employment Industry", Name="EmploymentIndustry")
/** @var string|null */
public ?string $EmploymentIndustry=null,
/** @description Employment Role */
// @ApiMember(DataType="string", Description="Employment Role", Name="EmploymentRole")
/** @var string|null */
public ?string $EmploymentRole=null,
/** @description Areas of Work */
// @ApiMember(DataType="string", Description="Areas of Work", Name="EmploymentGeographicArea")
/** @var string|null */
public ?string $EmploymentGeographicArea=null,
/** @description The contacts timezone. */
// @ApiMember(DataType="Guid", Description="The contacts timezone.", Name="Timezone", ParameterType="query")
/** @var string */
public string $Timezone='',
/** @description Timezone Name */
// @ApiMember(DataType="string", Description="Timezone Name", Name="TimezoneName", ParameterType="query")
/** @var string|null */
public ?string $TimezoneName=null,
/** @description The primary address of the contact */
// @ApiMember(DataType="string", Description="The primary address of the contact", Name="PrimaryAddress", ParameterType="query")
/** @var string|null */
public ?string $PrimaryAddress=null,
/** @description 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")
/** @var bool|null */
public ?bool $IsActiveContact=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['UserProfileId'])) $this->UserProfileId = $o['UserProfileId'];
if (isset($o['UserId'])) $this->UserId = $o['UserId'];
if (isset($o['ContactId'])) $this->ContactId = $o['ContactId'];
if (isset($o['UserName'])) $this->UserName = $o['UserName'];
if (isset($o['ProfileName'])) $this->ProfileName = $o['ProfileName'];
if (isset($o['ContactFullName'])) $this->ContactFullName = $o['ContactFullName'];
if (isset($o['EmailAddress'])) $this->EmailAddress = $o['EmailAddress'];
if (isset($o['EmailSignature'])) $this->EmailSignature = $o['EmailSignature'];
if (isset($o['MobileNumber'])) $this->MobileNumber = $o['MobileNumber'];
if (isset($o['PhoneNumber'])) $this->PhoneNumber = $o['PhoneNumber'];
if (isset($o['ContactTypeId'])) $this->ContactTypeId = $o['ContactTypeId'];
if (isset($o['ContactTypeName'])) $this->ContactTypeName = $o['ContactTypeName'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['Surname'])) $this->Surname = $o['Surname'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['LegalName'])) $this->LegalName = $o['LegalName'];
if (isset($o['TradingName'])) $this->TradingName = $o['TradingName'];
if (isset($o['Abn'])) $this->Abn = $o['Abn'];
if (isset($o['Acn'])) $this->Acn = $o['Acn'];
if (isset($o['Arbn'])) $this->Arbn = $o['Arbn'];
if (isset($o['GstRegistered'])) $this->GstRegistered = $o['GstRegistered'];
if (isset($o['ESL'])) $this->ESL = $o['ESL'];
if (isset($o['Language'])) $this->Language = $o['Language'];
if (isset($o['InterpreterRequired'])) $this->InterpreterRequired = $o['InterpreterRequired'];
if (isset($o['LicenseeNotes'])) $this->LicenseeNotes = $o['LicenseeNotes'];
if (isset($o['ProfilePhotoUrl'])) $this->ProfilePhotoUrl = $o['ProfilePhotoUrl'];
if (isset($o['ProfilePhotoThumbnailUrl'])) $this->ProfilePhotoThumbnailUrl = $o['ProfilePhotoThumbnailUrl'];
if (isset($o['ProfileImageId'])) $this->ProfileImageId = $o['ProfileImageId'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['EmploymentIndustry'])) $this->EmploymentIndustry = $o['EmploymentIndustry'];
if (isset($o['EmploymentRole'])) $this->EmploymentRole = $o['EmploymentRole'];
if (isset($o['EmploymentGeographicArea'])) $this->EmploymentGeographicArea = $o['EmploymentGeographicArea'];
if (isset($o['Timezone'])) $this->Timezone = $o['Timezone'];
if (isset($o['TimezoneName'])) $this->TimezoneName = $o['TimezoneName'];
if (isset($o['PrimaryAddress'])) $this->PrimaryAddress = $o['PrimaryAddress'];
if (isset($o['IsActiveContact'])) $this->IsActiveContact = $o['IsActiveContact'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->UserProfileId)) $o['UserProfileId'] = $this->UserProfileId;
if (isset($this->UserId)) $o['UserId'] = $this->UserId;
if (isset($this->ContactId)) $o['ContactId'] = $this->ContactId;
if (isset($this->UserName)) $o['UserName'] = $this->UserName;
if (isset($this->ProfileName)) $o['ProfileName'] = $this->ProfileName;
if (isset($this->ContactFullName)) $o['ContactFullName'] = $this->ContactFullName;
if (isset($this->EmailAddress)) $o['EmailAddress'] = $this->EmailAddress;
if (isset($this->EmailSignature)) $o['EmailSignature'] = $this->EmailSignature;
if (isset($this->MobileNumber)) $o['MobileNumber'] = $this->MobileNumber;
if (isset($this->PhoneNumber)) $o['PhoneNumber'] = $this->PhoneNumber;
if (isset($this->ContactTypeId)) $o['ContactTypeId'] = $this->ContactTypeId;
if (isset($this->ContactTypeName)) $o['ContactTypeName'] = $this->ContactTypeName;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->Surname)) $o['Surname'] = $this->Surname;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->LegalName)) $o['LegalName'] = $this->LegalName;
if (isset($this->TradingName)) $o['TradingName'] = $this->TradingName;
if (isset($this->Abn)) $o['Abn'] = $this->Abn;
if (isset($this->Acn)) $o['Acn'] = $this->Acn;
if (isset($this->Arbn)) $o['Arbn'] = $this->Arbn;
if (isset($this->GstRegistered)) $o['GstRegistered'] = $this->GstRegistered;
if (isset($this->ESL)) $o['ESL'] = $this->ESL;
if (isset($this->Language)) $o['Language'] = $this->Language;
if (isset($this->InterpreterRequired)) $o['InterpreterRequired'] = $this->InterpreterRequired;
if (isset($this->LicenseeNotes)) $o['LicenseeNotes'] = $this->LicenseeNotes;
if (isset($this->ProfilePhotoUrl)) $o['ProfilePhotoUrl'] = $this->ProfilePhotoUrl;
if (isset($this->ProfilePhotoThumbnailUrl)) $o['ProfilePhotoThumbnailUrl'] = $this->ProfilePhotoThumbnailUrl;
if (isset($this->ProfileImageId)) $o['ProfileImageId'] = $this->ProfileImageId;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->EmploymentIndustry)) $o['EmploymentIndustry'] = $this->EmploymentIndustry;
if (isset($this->EmploymentRole)) $o['EmploymentRole'] = $this->EmploymentRole;
if (isset($this->EmploymentGeographicArea)) $o['EmploymentGeographicArea'] = $this->EmploymentGeographicArea;
if (isset($this->Timezone)) $o['Timezone'] = $this->Timezone;
if (isset($this->TimezoneName)) $o['TimezoneName'] = $this->TimezoneName;
if (isset($this->PrimaryAddress)) $o['PrimaryAddress'] = $this->PrimaryAddress;
if (isset($this->IsActiveContact)) $o['IsActiveContact'] = $this->IsActiveContact;
return empty($o) ? new class(){} : $o;
}
}
class RoleModel implements JsonSerializable
{
public function __construct(
/** @description Role Id */
// @ApiMember(DataType="Guid", Description="Role Id", IsRequired=true, Name="RoleId")
/** @var string */
public string $RoleId='',
/** @description Role Name */
// @ApiMember(DataType="string", Description="Role Name", Name="RoleName")
/** @var string|null */
public ?string $RoleName=null,
/** @description Is the role a licensee role? */
// @ApiMember(DataType="bool", Description="Is the role a licensee role?", Name="IsLicensee")
/** @var bool|null */
public ?bool $IsLicenseeRole=null,
/** @description Is manage contacts role? */
// @ApiMember(DataType="bool", Description="Is manage contacts role?", Name="IsManageContacts")
/** @var bool|null */
public ?bool $IsManageContacts=null,
/** @description Is the role a Platform role? */
// @ApiMember(DataType="bool", Description="Is the role a Platform role?", Name="IsPlatformRole")
/** @var bool|null */
public ?bool $IsPlatformRole=null,
/** @description Is the role a services role? */
// @ApiMember(DataType="bool", Description="Is the role a services role?", Name="IsServiceRole")
/** @var bool|null */
public ?bool $IsServiceRole=null,
/** @description Is the role a customer role? */
// @ApiMember(DataType="bool", Description="Is the role a customer role?", Name="IsCustomerRole")
/** @var bool|null */
public ?bool $IsCustomerRole=null,
/** @description Is the role a functional role? */
// @ApiMember(DataType="bool", Description="Is the role a functional role?", Name="IsFunctionalRole")
/** @var bool|null */
public ?bool $IsFunctionalRole=null,
/** @description Is the role an auto-accept role? */
// @ApiMember(DataType="bool", Description="Is the role an auto-accept role?", Name="IsRequestAutoAccepted")
/** @var bool|null */
public ?bool $IsRequestAutoAccepted=null,
/** @description Suite that the role belongs to */
// @ApiMember(DataType="Guid", Description="Suite that the role belongs to", Name="SuiteId")
/** @var string */
public string $SuiteId='',
/** @description Suite that the role belongs to */
// @ApiMember(DataType="string", Description="Suite that the role belongs to", Name="SuiteName")
/** @var string|null */
public ?string $SuiteName=null,
/** @description 'A' (Active) or 'I' (Inactive) */
// @ApiMember(DataType="string", Description="'A' (Active) or 'I' (Inactive)", Name="RecordStatus")
/** @var string|null */
public ?string $RecordStatus=null,
/** @description Object Connection Id, which is populated when the roles are returned based on those that are connected to an object. */
// @ApiMember(DataType="Guid", Description="Object Connection Id, which is populated when the roles are returned based on those that are connected to an object.", Name="ObjectConnectionId")
/** @var string */
public string $ObjectConnectionId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RoleId'])) $this->RoleId = $o['RoleId'];
if (isset($o['RoleName'])) $this->RoleName = $o['RoleName'];
if (isset($o['IsLicenseeRole'])) $this->IsLicenseeRole = $o['IsLicenseeRole'];
if (isset($o['IsManageContacts'])) $this->IsManageContacts = $o['IsManageContacts'];
if (isset($o['IsPlatformRole'])) $this->IsPlatformRole = $o['IsPlatformRole'];
if (isset($o['IsServiceRole'])) $this->IsServiceRole = $o['IsServiceRole'];
if (isset($o['IsCustomerRole'])) $this->IsCustomerRole = $o['IsCustomerRole'];
if (isset($o['IsFunctionalRole'])) $this->IsFunctionalRole = $o['IsFunctionalRole'];
if (isset($o['IsRequestAutoAccepted'])) $this->IsRequestAutoAccepted = $o['IsRequestAutoAccepted'];
if (isset($o['SuiteId'])) $this->SuiteId = $o['SuiteId'];
if (isset($o['SuiteName'])) $this->SuiteName = $o['SuiteName'];
if (isset($o['RecordStatus'])) $this->RecordStatus = $o['RecordStatus'];
if (isset($o['ObjectConnectionId'])) $this->ObjectConnectionId = $o['ObjectConnectionId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RoleId)) $o['RoleId'] = $this->RoleId;
if (isset($this->RoleName)) $o['RoleName'] = $this->RoleName;
if (isset($this->IsLicenseeRole)) $o['IsLicenseeRole'] = $this->IsLicenseeRole;
if (isset($this->IsManageContacts)) $o['IsManageContacts'] = $this->IsManageContacts;
if (isset($this->IsPlatformRole)) $o['IsPlatformRole'] = $this->IsPlatformRole;
if (isset($this->IsServiceRole)) $o['IsServiceRole'] = $this->IsServiceRole;
if (isset($this->IsCustomerRole)) $o['IsCustomerRole'] = $this->IsCustomerRole;
if (isset($this->IsFunctionalRole)) $o['IsFunctionalRole'] = $this->IsFunctionalRole;
if (isset($this->IsRequestAutoAccepted)) $o['IsRequestAutoAccepted'] = $this->IsRequestAutoAccepted;
if (isset($this->SuiteId)) $o['SuiteId'] = $this->SuiteId;
if (isset($this->SuiteName)) $o['SuiteName'] = $this->SuiteName;
if (isset($this->RecordStatus)) $o['RecordStatus'] = $this->RecordStatus;
if (isset($this->ObjectConnectionId)) $o['ObjectConnectionId'] = $this->ObjectConnectionId;
return empty($o) ? new class(){} : $o;
}
}
class ContactGroupConnectionModel extends UserProfileSummaryModel implements JsonSerializable
{
/**
* @param string $UserProfileId
* @param string $UserId
* @param string $ContactId
* @param string|null $UserName
* @param string|null $ProfileName
* @param string|null $ContactFullName
* @param string|null $EmailAddress
* @param string|null $EmailSignature
* @param string|null $MobileNumber
* @param string|null $PhoneNumber
* @param string $ContactTypeId
* @param string|null $ContactTypeName
* @param string|null $FirstName
* @param string|null $Surname
* @param string|null $Title
* @param string|null $LegalName
* @param string|null $TradingName
* @param string|null $Abn
* @param string|null $Acn
* @param string|null $Arbn
* @param bool|null $GstRegistered
* @param bool|null $ESL
* @param string|null $Language
* @param bool|null $InterpreterRequired
* @param string|null $LicenseeNotes
* @param string|null $ProfilePhotoUrl
* @param string|null $ProfilePhotoThumbnailUrl
* @param string $ProfileImageId
* @param string|null $Description
* @param string|null $EmploymentIndustry
* @param string|null $EmploymentRole
* @param string|null $EmploymentGeographicArea
* @param string $Timezone
* @param string|null $TimezoneName
* @param string|null $PrimaryAddress
* @param bool|null $IsActiveContact
*/
public function __construct(
string $UserProfileId='',
string $UserId='',
string $ContactId='',
?string $UserName=null,
?string $ProfileName=null,
?string $ContactFullName=null,
?string $EmailAddress=null,
?string $EmailSignature=null,
?string $MobileNumber=null,
?string $PhoneNumber=null,
string $ContactTypeId='',
?string $ContactTypeName=null,
?string $FirstName=null,
?string $Surname=null,
?string $Title=null,
?string $LegalName=null,
?string $TradingName=null,
?string $Abn=null,
?string $Acn=null,
?string $Arbn=null,
?bool $GstRegistered=null,
?bool $ESL=null,
?string $Language=null,
?bool $InterpreterRequired=null,
?string $LicenseeNotes=null,
?string $ProfilePhotoUrl=null,
?string $ProfilePhotoThumbnailUrl=null,
string $ProfileImageId='',
?string $Description=null,
?string $EmploymentIndustry=null,
?string $EmploymentRole=null,
?string $EmploymentGeographicArea=null,
string $Timezone='',
?string $TimezoneName=null,
?string $PrimaryAddress=null,
?bool $IsActiveContact=null,
/** @description Contact Group Id */
// @ApiMember(DataType="Guid", Description="Contact Group Id", Name="ContactGroupId")
/** @var string */
public string $ContactGroupId='',
/** @description Connection id of the contact in the group */
// @ApiMember(DataType="string", Description="Connection id of the contact in the group", Name="ContactGroupConnectionId")
/** @var string */
public string $ContactGroupConnectionId='',
/** @description The Id of the Role this contact is connected to the group with. */
// @ApiMember(DataType="string", Description="The Id of the Role this contact is connected to the group with.", Name="ConnectionRoleId")
/** @var string */
public string $ConnectionRoleId='',
/** @description Order of contacts within a group, the primary contact will have an index of 1. */
// @ApiMember(DataType="int", Description="Order of contacts within a group, the primary contact will have an index of 1.", Name="Index")
/** @var int */
public int $Index=0,
/** @description List of roles that the contact in the contact group has across appliances for e.g. Platform Customer, Nexus customer etc. */
// @ApiMember(DataType="string", Description="List of roles that the contact in the contact group has across appliances for e.g. Platform Customer, Nexus customer etc.", Name="ContactRoles")
/** @var array<RoleModel>|null */
public ?array $ContactRoles=null
) {
parent::__construct($UserProfileId,$UserId,$ContactId,$UserName,$ProfileName,$ContactFullName,$EmailAddress,$EmailSignature,$MobileNumber,$PhoneNumber,$ContactTypeId,$ContactTypeName,$FirstName,$Surname,$Title,$LegalName,$TradingName,$Abn,$Acn,$Arbn,$GstRegistered,$ESL,$Language,$InterpreterRequired,$LicenseeNotes,$ProfilePhotoUrl,$ProfilePhotoThumbnailUrl,$ProfileImageId,$Description,$EmploymentIndustry,$EmploymentRole,$EmploymentGeographicArea,$Timezone,$TimezoneName,$PrimaryAddress,$IsActiveContact);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['ContactGroupId'])) $this->ContactGroupId = $o['ContactGroupId'];
if (isset($o['ContactGroupConnectionId'])) $this->ContactGroupConnectionId = $o['ContactGroupConnectionId'];
if (isset($o['ConnectionRoleId'])) $this->ConnectionRoleId = $o['ConnectionRoleId'];
if (isset($o['Index'])) $this->Index = $o['Index'];
if (isset($o['ContactRoles'])) $this->ContactRoles = JsonConverters::fromArray('RoleModel', $o['ContactRoles']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->ContactGroupId)) $o['ContactGroupId'] = $this->ContactGroupId;
if (isset($this->ContactGroupConnectionId)) $o['ContactGroupConnectionId'] = $this->ContactGroupConnectionId;
if (isset($this->ConnectionRoleId)) $o['ConnectionRoleId'] = $this->ConnectionRoleId;
if (isset($this->Index)) $o['Index'] = $this->Index;
if (isset($this->ContactRoles)) $o['ContactRoles'] = JsonConverters::toArray('RoleModel', $this->ContactRoles);
return empty($o) ? new class(){} : $o;
}
}
class CustomerProjectModel implements JsonSerializable
{
public function __construct(
/** @var string */
public string $ProjectId='',
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $ProjectAddress=null,
/** @var string|null */
public ?string $ManagerContactId=null,
/** @var string|null */
public ?string $ManagerContactName=null,
/** @var string|null */
public ?string $ManagerProfilePhotoUrl=null,
/** @var string|null */
public ?string $ManagerProfilePhotoThumbnailUrl=null,
/** @var string|null */
public ?string $SupervisorContactId=null,
/** @var string|null */
public ?string $SupervisorContactName=null,
/** @var string|null */
public ?string $SupervisorProfilePhotoUrl=null,
/** @var string|null */
public ?string $SupervisorProfilePhotoThumbnailUrl=null,
/** @var string|null */
public ?string $CustomerServiceContactId=null,
/** @var string|null */
public ?string $CustomerServiceContactName=null,
/** @var string|null */
public ?string $CustomerServiceProfilePhotoUrl=null,
/** @var string|null */
public ?string $CustomerServiceProfilePhotoThumbnail=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectId'])) $this->ProjectId = $o['ProjectId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['ProjectAddress'])) $this->ProjectAddress = $o['ProjectAddress'];
if (isset($o['ManagerContactId'])) $this->ManagerContactId = $o['ManagerContactId'];
if (isset($o['ManagerContactName'])) $this->ManagerContactName = $o['ManagerContactName'];
if (isset($o['ManagerProfilePhotoUrl'])) $this->ManagerProfilePhotoUrl = $o['ManagerProfilePhotoUrl'];
if (isset($o['ManagerProfilePhotoThumbnailUrl'])) $this->ManagerProfilePhotoThumbnailUrl = $o['ManagerProfilePhotoThumbnailUrl'];
if (isset($o['SupervisorContactId'])) $this->SupervisorContactId = $o['SupervisorContactId'];
if (isset($o['SupervisorContactName'])) $this->SupervisorContactName = $o['SupervisorContactName'];
if (isset($o['SupervisorProfilePhotoUrl'])) $this->SupervisorProfilePhotoUrl = $o['SupervisorProfilePhotoUrl'];
if (isset($o['SupervisorProfilePhotoThumbnailUrl'])) $this->SupervisorProfilePhotoThumbnailUrl = $o['SupervisorProfilePhotoThumbnailUrl'];
if (isset($o['CustomerServiceContactId'])) $this->CustomerServiceContactId = $o['CustomerServiceContactId'];
if (isset($o['CustomerServiceContactName'])) $this->CustomerServiceContactName = $o['CustomerServiceContactName'];
if (isset($o['CustomerServiceProfilePhotoUrl'])) $this->CustomerServiceProfilePhotoUrl = $o['CustomerServiceProfilePhotoUrl'];
if (isset($o['CustomerServiceProfilePhotoThumbnail'])) $this->CustomerServiceProfilePhotoThumbnail = $o['CustomerServiceProfilePhotoThumbnail'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectId)) $o['ProjectId'] = $this->ProjectId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->ProjectAddress)) $o['ProjectAddress'] = $this->ProjectAddress;
if (isset($this->ManagerContactId)) $o['ManagerContactId'] = $this->ManagerContactId;
if (isset($this->ManagerContactName)) $o['ManagerContactName'] = $this->ManagerContactName;
if (isset($this->ManagerProfilePhotoUrl)) $o['ManagerProfilePhotoUrl'] = $this->ManagerProfilePhotoUrl;
if (isset($this->ManagerProfilePhotoThumbnailUrl)) $o['ManagerProfilePhotoThumbnailUrl'] = $this->ManagerProfilePhotoThumbnailUrl;
if (isset($this->SupervisorContactId)) $o['SupervisorContactId'] = $this->SupervisorContactId;
if (isset($this->SupervisorContactName)) $o['SupervisorContactName'] = $this->SupervisorContactName;
if (isset($this->SupervisorProfilePhotoUrl)) $o['SupervisorProfilePhotoUrl'] = $this->SupervisorProfilePhotoUrl;
if (isset($this->SupervisorProfilePhotoThumbnailUrl)) $o['SupervisorProfilePhotoThumbnailUrl'] = $this->SupervisorProfilePhotoThumbnailUrl;
if (isset($this->CustomerServiceContactId)) $o['CustomerServiceContactId'] = $this->CustomerServiceContactId;
if (isset($this->CustomerServiceContactName)) $o['CustomerServiceContactName'] = $this->CustomerServiceContactName;
if (isset($this->CustomerServiceProfilePhotoUrl)) $o['CustomerServiceProfilePhotoUrl'] = $this->CustomerServiceProfilePhotoUrl;
if (isset($this->CustomerServiceProfilePhotoThumbnail)) $o['CustomerServiceProfilePhotoThumbnail'] = $this->CustomerServiceProfilePhotoThumbnail;
return empty($o) ? new class(){} : $o;
}
}
class ContactGroupModel implements JsonSerializable
{
public function __construct(
/** @description Contact Group Id */
// @ApiMember(DataType="Guid", Description="Contact Group Id", Name="ContactGroupId")
/** @var string */
public string $ContactGroupId='',
/** @description Contact Group Name */
// @ApiMember(DataType="string", Description="Contact Group Name", Name="Name")
/** @var string|null */
public ?string $Name=null,
/** @description Contact Group Reference */
// @ApiMember(DataType="string", Description="Contact Group Reference", Name="Reference")
/** @var string|null */
public ?string $Reference=null,
/** @description Group Role Id for e.g. Customer */
// @ApiMember(DataType="Guid", Description="Group Role Id for e.g. Customer", Name="GroupRoleId")
/** @var string */
public string $GroupRoleId='',
/** @description Primary contact in the group */
// @ApiMember(DataType="string", Description="Primary contact in the group", Name="PrimaryContactName")
/** @var string|null */
public ?string $PrimaryContactName=null,
/** @description Contact Id of the primary contact in the group */
// @ApiMember(DataType="Guid", Description="Contact Id of the primary contact in the group", Name="PrimaryContactId")
/** @var string */
public string $PrimaryContactId='',
/** @description Profile photo url of the primary contact in the group */
// @ApiMember(DataType="string", Description="Profile photo url of the primary contact in the group", Name="PrimaryContactPhotoUrl")
/** @var string|null */
public ?string $PrimaryContactPhotoUrl=null,
/** @description Profile photo thumbnail url of the primary contact in the group */
// @ApiMember(DataType="string", Description="Profile photo thumbnail url of the primary contact in the group", Name="PrimaryContactThumbnailUrl")
/** @var string|null */
public ?string $PrimaryContactThumbnailUrl=null,
/** @description Number of contacts in the group */
// @ApiMember(DataType="int", Description="Number of contacts in the group", Name="NumberOfContacts")
/** @var int */
public int $NumberOfContacts=0,
/** @description Record Status of contact group */
// @ApiMember(DataType="string", Description="Record Status of contact group", Name="RecordStatus")
/** @var string|null */
public ?string $RecordStatus=null,
/** @description Details of contact in the contact group */
// @ApiMember(DataType="List", Description="Details of contact in the contact group", Name="Contacts")
/** @var array<ContactGroupConnectionModel>|null */
public ?array $Contacts=null,
/** @description Details of projects for the contact group */
// @ApiMember(DataType="List", Description="Details of projects for the contact group", Name="Projects")
/** @var array<CustomerProjectModel>|null */
public ?array $Projects=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactGroupId'])) $this->ContactGroupId = $o['ContactGroupId'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['Reference'])) $this->Reference = $o['Reference'];
if (isset($o['GroupRoleId'])) $this->GroupRoleId = $o['GroupRoleId'];
if (isset($o['PrimaryContactName'])) $this->PrimaryContactName = $o['PrimaryContactName'];
if (isset($o['PrimaryContactId'])) $this->PrimaryContactId = $o['PrimaryContactId'];
if (isset($o['PrimaryContactPhotoUrl'])) $this->PrimaryContactPhotoUrl = $o['PrimaryContactPhotoUrl'];
if (isset($o['PrimaryContactThumbnailUrl'])) $this->PrimaryContactThumbnailUrl = $o['PrimaryContactThumbnailUrl'];
if (isset($o['NumberOfContacts'])) $this->NumberOfContacts = $o['NumberOfContacts'];
if (isset($o['RecordStatus'])) $this->RecordStatus = $o['RecordStatus'];
if (isset($o['Contacts'])) $this->Contacts = JsonConverters::fromArray('ContactGroupConnectionModel', $o['Contacts']);
if (isset($o['Projects'])) $this->Projects = JsonConverters::fromArray('CustomerProjectModel', $o['Projects']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactGroupId)) $o['ContactGroupId'] = $this->ContactGroupId;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->Reference)) $o['Reference'] = $this->Reference;
if (isset($this->GroupRoleId)) $o['GroupRoleId'] = $this->GroupRoleId;
if (isset($this->PrimaryContactName)) $o['PrimaryContactName'] = $this->PrimaryContactName;
if (isset($this->PrimaryContactId)) $o['PrimaryContactId'] = $this->PrimaryContactId;
if (isset($this->PrimaryContactPhotoUrl)) $o['PrimaryContactPhotoUrl'] = $this->PrimaryContactPhotoUrl;
if (isset($this->PrimaryContactThumbnailUrl)) $o['PrimaryContactThumbnailUrl'] = $this->PrimaryContactThumbnailUrl;
if (isset($this->NumberOfContacts)) $o['NumberOfContacts'] = $this->NumberOfContacts;
if (isset($this->RecordStatus)) $o['RecordStatus'] = $this->RecordStatus;
if (isset($this->Contacts)) $o['Contacts'] = JsonConverters::toArray('ContactGroupConnectionModel', $this->Contacts);
if (isset($this->Projects)) $o['Projects'] = JsonConverters::toArray('CustomerProjectModel', $this->Projects);
return empty($o) ? new class(){} : $o;
}
}
// @ApiResponse(Description="Get contact group and details of contacts in the contact group for e.g. contacts in a customer group and response status")
class GetContactGroupResponse implements JsonSerializable
{
public function __construct(
/** @var ContactGroupModel|null */
public ?ContactGroupModel $ContactGroup=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactGroup'])) $this->ContactGroup = JsonConverters::from('ContactGroupModel', $o['ContactGroup']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactGroup)) $o['ContactGroup'] = JsonConverters::to('ContactGroupModel', $this->ContactGroup);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
/** @description Get details of the specified contact group */
// @Api(Description="Get details of the specified contact group")
class GetContactGroup implements JsonSerializable
{
public function __construct(
/** @description Get details of the specified contact group including details of contacts in the group */
// @ApiMember(Description="Get details of the specified contact group including details of contacts in the group", Name="ContactGroupId")
/** @var string */
public string $ContactGroupId='',
/** @description The type of ContactGroup to get. */
// @ApiMember(Description="The type of ContactGroup to get.", Name="ContactGroupRoleId")
/** @var string */
public string $ContactGroupRoleId='',
/** @description Include projects linked to the contact group? */
// @ApiMember(Description="Include projects linked to the contact group?", Name="IncludeProjects")
/** @var bool|null */
public ?bool $IncludeProjects=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ContactGroupId'])) $this->ContactGroupId = $o['ContactGroupId'];
if (isset($o['ContactGroupRoleId'])) $this->ContactGroupRoleId = $o['ContactGroupRoleId'];
if (isset($o['IncludeProjects'])) $this->IncludeProjects = $o['IncludeProjects'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ContactGroupId)) $o['ContactGroupId'] = $this->ContactGroupId;
if (isset($this->ContactGroupRoleId)) $o['ContactGroupRoleId'] = $this->ContactGroupRoleId;
if (isset($this->IncludeProjects)) $o['IncludeProjects'] = $this->IncludeProjects;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/contactgroup/{ContactGroupId} HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetContactGroup xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ContactGroupId>00000000-0000-0000-0000-000000000000</ContactGroupId>
<ContactGroupRoleId>00000000-0000-0000-0000-000000000000</ContactGroupRoleId>
<IncludeProjects>false</IncludeProjects>
</GetContactGroup>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetContactGroupResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ContactGroup xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.WebAPIModel.Models">
<d2p1:ContactGroupId>00000000-0000-0000-0000-000000000000</d2p1:ContactGroupId>
<d2p1:Contacts>
<d2p1:ContactGroupConnectionModel>
<d2p1:Abn>String</d2p1:Abn>
<d2p1:Acn>String</d2p1:Acn>
<d2p1:Arbn>String</d2p1:Arbn>
<d2p1:ContactFullName>String</d2p1:ContactFullName>
<d2p1:ContactId>00000000-0000-0000-0000-000000000000</d2p1:ContactId>
<d2p1:ContactTypeId>00000000-0000-0000-0000-000000000000</d2p1:ContactTypeId>
<d2p1:ContactTypeName>String</d2p1:ContactTypeName>
<d2p1:Description>String</d2p1:Description>
<d2p1:ESL>false</d2p1:ESL>
<d2p1:EmailAddress>String</d2p1:EmailAddress>
<d2p1:EmailSignature>String</d2p1:EmailSignature>
<d2p1:EmploymentGeographicArea>String</d2p1:EmploymentGeographicArea>
<d2p1:EmploymentIndustry>String</d2p1:EmploymentIndustry>
<d2p1:EmploymentRole>String</d2p1:EmploymentRole>
<d2p1:FirstName>String</d2p1:FirstName>
<d2p1:GstRegistered>false</d2p1:GstRegistered>
<d2p1:InterpreterRequired>false</d2p1:InterpreterRequired>
<d2p1:IsActiveContact>false</d2p1:IsActiveContact>
<d2p1:Language>String</d2p1:Language>
<d2p1:LegalName>String</d2p1:LegalName>
<d2p1:LicenseeNotes>String</d2p1:LicenseeNotes>
<d2p1:MobileNumber>String</d2p1:MobileNumber>
<d2p1:PhoneNumber>String</d2p1:PhoneNumber>
<d2p1:PrimaryAddress>String</d2p1:PrimaryAddress>
<d2p1:ProfileImageId>00000000-0000-0000-0000-000000000000</d2p1:ProfileImageId>
<d2p1:ProfileName>String</d2p1:ProfileName>
<d2p1:ProfilePhotoThumbnailUrl>String</d2p1:ProfilePhotoThumbnailUrl>
<d2p1:ProfilePhotoUrl>String</d2p1:ProfilePhotoUrl>
<d2p1:Surname>String</d2p1:Surname>
<d2p1:Timezone>00000000-0000-0000-0000-000000000000</d2p1:Timezone>
<d2p1:TimezoneName>String</d2p1:TimezoneName>
<d2p1:Title>String</d2p1:Title>
<d2p1:TradingName>String</d2p1:TradingName>
<d2p1:UserId>00000000-0000-0000-0000-000000000000</d2p1:UserId>
<d2p1:UserName>String</d2p1:UserName>
<d2p1:UserProfileId>00000000-0000-0000-0000-000000000000</d2p1:UserProfileId>
<d2p1:ConnectionRoleId>00000000-0000-0000-0000-000000000000</d2p1:ConnectionRoleId>
<d2p1:ContactGroupConnectionId>00000000-0000-0000-0000-000000000000</d2p1:ContactGroupConnectionId>
<d2p1:ContactGroupId>00000000-0000-0000-0000-000000000000</d2p1:ContactGroupId>
<d2p1:ContactRoles>
<d2p1:RoleModel>
<d2p1:IsCustomerRole>false</d2p1:IsCustomerRole>
<d2p1:IsFunctionalRole>false</d2p1:IsFunctionalRole>
<d2p1:IsLicenseeRole>false</d2p1:IsLicenseeRole>
<d2p1:IsManageContacts>false</d2p1:IsManageContacts>
<d2p1:IsPlatformRole>false</d2p1:IsPlatformRole>
<d2p1:IsRequestAutoAccepted>false</d2p1:IsRequestAutoAccepted>
<d2p1:IsServiceRole>false</d2p1:IsServiceRole>
<d2p1:ObjectConnectionId>00000000-0000-0000-0000-000000000000</d2p1:ObjectConnectionId>
<d2p1:RecordStatus>String</d2p1:RecordStatus>
<d2p1:RoleId>00000000-0000-0000-0000-000000000000</d2p1:RoleId>
<d2p1:RoleName>String</d2p1:RoleName>
<d2p1:SuiteId>00000000-0000-0000-0000-000000000000</d2p1:SuiteId>
<d2p1:SuiteName>String</d2p1:SuiteName>
</d2p1:RoleModel>
</d2p1:ContactRoles>
<d2p1:Index>0</d2p1:Index>
</d2p1:ContactGroupConnectionModel>
</d2p1:Contacts>
<d2p1:GroupRoleId>00000000-0000-0000-0000-000000000000</d2p1:GroupRoleId>
<d2p1:Name>String</d2p1:Name>
<d2p1:NumberOfContacts>0</d2p1:NumberOfContacts>
<d2p1:PrimaryContactId>00000000-0000-0000-0000-000000000000</d2p1:PrimaryContactId>
<d2p1:PrimaryContactName>String</d2p1:PrimaryContactName>
<d2p1:PrimaryContactPhotoUrl>String</d2p1:PrimaryContactPhotoUrl>
<d2p1:PrimaryContactThumbnailUrl>String</d2p1:PrimaryContactThumbnailUrl>
<d2p1:Projects>
<d2p1:CustomerProjectModel>
<d2p1:CustomerServiceContactId>00000000-0000-0000-0000-000000000000</d2p1:CustomerServiceContactId>
<d2p1:CustomerServiceContactName>String</d2p1:CustomerServiceContactName>
<d2p1:CustomerServiceProfilePhotoThumbnail>String</d2p1:CustomerServiceProfilePhotoThumbnail>
<d2p1:CustomerServiceProfilePhotoUrl>String</d2p1:CustomerServiceProfilePhotoUrl>
<d2p1:ManagerContactId>00000000-0000-0000-0000-000000000000</d2p1:ManagerContactId>
<d2p1:ManagerContactName>String</d2p1:ManagerContactName>
<d2p1:ManagerProfilePhotoThumbnailUrl>String</d2p1:ManagerProfilePhotoThumbnailUrl>
<d2p1:ManagerProfilePhotoUrl>String</d2p1:ManagerProfilePhotoUrl>
<d2p1:Name>String</d2p1:Name>
<d2p1:ProjectAddress>String</d2p1:ProjectAddress>
<d2p1:ProjectId>00000000-0000-0000-0000-000000000000</d2p1:ProjectId>
<d2p1:SupervisorContactId>00000000-0000-0000-0000-000000000000</d2p1:SupervisorContactId>
<d2p1:SupervisorContactName>String</d2p1:SupervisorContactName>
<d2p1:SupervisorProfilePhotoThumbnailUrl>String</d2p1:SupervisorProfilePhotoThumbnailUrl>
<d2p1:SupervisorProfilePhotoUrl>String</d2p1:SupervisorProfilePhotoUrl>
</d2p1:CustomerProjectModel>
</d2p1:Projects>
<d2p1:RecordStatus>String</d2p1:RecordStatus>
<d2p1:Reference>String</d2p1:Reference>
</ContactGroup>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</GetContactGroupResponse>