using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Eros.Subtle.Canvara.WebAPIModel.ServiceModel;
namespace Eros.Subtle.Canvara.WebAPIModel.ServiceModel
{
public partial class ContactEmailAddress
{
///<summary>
///The Contact Id of the contact.
///</summary>
[ApiMember(DataType="Guid", Description="The Contact Id of the contact.", Name="ContactId", ParameterType="query")]
public virtual Guid ContactId { get; set; }
///<summary>
///The Contact Full Name
///</summary>
[ApiMember(DataType="string", Description="The Contact Full Name", Name="ContactName", ParameterType="query")]
public virtual string ContactName { get; set; }
///<summary>
///The Contact Email Address.
///</summary>
[ApiMember(DataType="string", Description="The Contact Email Address.", Name="EmailAddress", ParameterType="query")]
public virtual string EmailAddress { get; set; }
///<summary>
///The Contact Photo URL
///</summary>
[ApiMember(DataType="string", Description="The Contact Photo URL", Name="ContactPhotoURL", ParameterType="query")]
public virtual string ContactPhotoURL { get; set; }
}
///<summary>
///Returns a list of contacts connected to a user profiles' contact.
///</summary>
[Api(Description="Returns a list of contacts connected to a user profiles' contact.")]
public partial class GetConnectedContacts
{
///<summary>
///The user's Guid. Contacts retrieved will be connected to this user.
///</summary>
[ApiMember(DataType="Guid", Description="The user's Guid. Contacts retrieved will be connected to this user.", IsRequired=true, Name="UserId", ParameterType="query")]
public virtual Guid UserId { get; set; }
///<summary>
///The user profiles Contact Guid. Contacts connected to the user will be filted by this profiles contact ID.
///</summary>
[ApiMember(DataType="Guid", Description="The user profiles Contact Guid. Contacts connected to the user will be filted by this profiles contact ID.", IsRequired=true, Name="ContactId", ParameterType="query")]
public virtual Guid ContactId { get; set; }
///<summary>
///The suite id list. Gets contacts connected to the user filted by the suite IDs in this list..
///</summary>
[ApiMember(DataType="List<Guid>", Description="The suite id list. Gets contacts connected to the user filted by the suite IDs in this list..", Name="SuiteIds", ParameterType="query")]
public virtual List<Guid> SuiteIds { get; set; }
}
public partial class UserContactConnectionModel
{
///<summary>
///The Contact Role Id, that links the Contact to their role.
///</summary>
[ApiMember(DataType="Guid", Description="The Contact Role Id, that links the Contact to their role.", Name="ContactRoleId", ParameterType="query")]
public virtual Guid ContactRoleId { get; set; }
///<summary>
///The role name.
///</summary>
[ApiMember(DataType="string", Description="The role name.", Name="ContactRoleName", ParameterType="query")]
public virtual string ContactRoleName { get; set; }
///<summary>
///The list item role Id.
///</summary>
[ApiMember(DataType="Guid", Description="The list item role Id.", Name="ContactListItemRoleId", ParameterType="query")]
public virtual Guid ContactListItemRoleId { get; set; }
///<summary>
///The URL of the contact role's image icon.
///</summary>
[ApiMember(DataType="string", Description="The URL of the contact role's image icon.", Name="ContactRolePrimaryImageURL", ParameterType="query")]
public virtual string ContactRolePrimaryImageURL { get; set; }
///<summary>
///The URL of the contact role's thumbnail image icon.
///</summary>
[ApiMember(DataType="string", Description="The URL of the contact role's thumbnail image icon.", Name="ContactRolePrimaryImageThumbnailURL", ParameterType="query")]
public virtual string ContactRolePrimaryImageThumbnailURL { get; set; }
///<summary>
///The Guid of the contact role's media file containing the image icon details.
///</summary>
[ApiMember(DataType="string", Description="The Guid of the contact role's media file containing the image icon details.", Name="ContactRolePrimaryImageId", ParameterType="query")]
public virtual Guid ContactRolePrimaryImageId { get; set; }
///<summary>
///The connected contacts Id. (licensee)
///</summary>
[ApiMember(DataType="string", Description="The connected contacts Id. (licensee)", Name="ConnectionContactId", ParameterType="query")]
public virtual Guid ConnectionContactId { get; set; }
///<summary>
///The connected contacts Full Name.
///</summary>
[ApiMember(DataType="string", Description="The connected contacts Full Name.", Name="ConnectionContactName", ParameterType="query")]
public virtual string ConnectionContactName { get; set; }
///<summary>
///The connected contacts role.
///</summary>
[ApiMember(DataType="string", Description="The connected contacts role.", Name="ConnectionContactRoleName", ParameterType="query")]
public virtual string ConnectionContactRoleName { get; set; }
///<summary>
///The connected contacts role Id.
///</summary>
[ApiMember(DataType="Guid", Description="The connected contacts role Id.", Name="ConnectionContactRoleId", ParameterType="query")]
public virtual Guid ConnectionContactRoleId { get; set; }
///<summary>
///The connected contacts list item role Id.
///</summary>
[ApiMember(DataType="Guid", Description="The connected contacts list item role Id.", Name="ConnectionContactListItemRoleId", ParameterType="query")]
public virtual Guid ConnectionContactListItemRoleId { get; set; }
///<summary>
///The Contacts Type.
///</summary>
[ApiMember(DataType="string", Description="The Contacts Type.", Name="ContactTypeName", ParameterType="query")]
public virtual string ContactTypeName { get; set; }
///<summary>
///The URL to the Connected Contacts Photo.
///</summary>
[ApiMember(DataType="string", Description="The URL to the Connected Contacts Photo.", Name="ConnectionContactPhotoURL", ParameterType="query")]
public virtual string ConnectionContactPhotoURL { get; set; }
///<summary>
///.
///</summary>
[ApiMember(DataType="bool", Description=".", Name="IsContactLicenseeRole", ParameterType="query")]
public virtual bool IsContactLicenseeRole { get; set; }
///<summary>
///If the connection is as a licensee this is true.
///</summary>
[ApiMember(DataType="bool", Description="If the connection is as a licensee this is true.", Name="IsConnectionLicenseeRole", ParameterType="query")]
public virtual bool IsConnectionLicenseeRole { get; set; }
///<summary>
///The status of the connection with the contact.
///</summary>
[ApiMember(DataType="string", Description="The status of the connection with the contact.", Name="ConnectionStatusName", ParameterType="query")]
public virtual string ConnectionStatusName { get; set; }
///<summary>
///The status Id of the connection with the contact.
///</summary>
[ApiMember(DataType="Guid", Description="The status Id of the connection with the contact.", Name="ConnectionStatusId", ParameterType="query")]
public virtual Guid ConnectionStatusId { get; set; }
///<summary>
///The ContactRoleConnectionId of an active connection with the contact.
///</summary>
[ApiMember(DataType="Guid", Description="The ContactRoleConnectionId of an active connection with the contact.", Name="ConnectionId", ParameterType="query")]
public virtual Guid ConnectionId { get; set; }
///<summary>
///The ContactRoleConnectionRequest of a pending connection with the contact.
///</summary>
[ApiMember(DataType="Guid", Description="The ContactRoleConnectionRequest of a pending connection with the contact.", Name="ConnectionRequestId", ParameterType="query")]
public virtual Guid ConnectionRequestId { get; set; }
}
public partial class UserContacts
{
///<summary>
///A list of contact connections assigned to the user.
///</summary>
[ApiMember(DataType="List<UserContactConnectionModel>", Description="A list of contact connections assigned to the user.", Name="ContactConnections", ParameterType="query")]
public virtual List<UserContactConnectionModel> ContactConnections { get; set; }
///<summary>
///A list of connected contacts and their email addresses.
///</summary>
[ApiMember(DataType="List<ContactEmailAddressBook>", Description="A list of connected contacts and their email addresses.", Name="EmailAddressBook", ParameterType="query")]
public virtual List<ContactEmailAddress> EmailAddressBook { get; set; }
}
}
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 /xml/reply/GetConnectedContacts HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetConnectedContacts xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ContactId>00000000-0000-0000-0000-000000000000</ContactId>
<SuiteIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</SuiteIds>
<UserId>00000000-0000-0000-0000-000000000000</UserId>
</GetConnectedContacts>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<UserContacts xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ContactConnections>
<UserContactConnectionModel>
<ConnectionContactId>00000000-0000-0000-0000-000000000000</ConnectionContactId>
<ConnectionContactListItemRoleId>00000000-0000-0000-0000-000000000000</ConnectionContactListItemRoleId>
<ConnectionContactName>String</ConnectionContactName>
<ConnectionContactPhotoURL>String</ConnectionContactPhotoURL>
<ConnectionContactRoleId>00000000-0000-0000-0000-000000000000</ConnectionContactRoleId>
<ConnectionContactRoleName>String</ConnectionContactRoleName>
<ConnectionId>00000000-0000-0000-0000-000000000000</ConnectionId>
<ConnectionRequestId>00000000-0000-0000-0000-000000000000</ConnectionRequestId>
<ConnectionStatusId>00000000-0000-0000-0000-000000000000</ConnectionStatusId>
<ConnectionStatusName>String</ConnectionStatusName>
<ContactListItemRoleId>00000000-0000-0000-0000-000000000000</ContactListItemRoleId>
<ContactRoleId>00000000-0000-0000-0000-000000000000</ContactRoleId>
<ContactRoleName>String</ContactRoleName>
<ContactRolePrimaryImageId>00000000-0000-0000-0000-000000000000</ContactRolePrimaryImageId>
<ContactRolePrimaryImageThumbnailURL>String</ContactRolePrimaryImageThumbnailURL>
<ContactRolePrimaryImageURL>String</ContactRolePrimaryImageURL>
<ContactTypeName>String</ContactTypeName>
<IsConnectionLicenseeRole>false</IsConnectionLicenseeRole>
<IsContactLicenseeRole>false</IsContactLicenseeRole>
</UserContactConnectionModel>
</ContactConnections>
<EmailAddressBook>
<ContactEmailAddress>
<ContactId>00000000-0000-0000-0000-000000000000</ContactId>
<ContactName>String</ContactName>
<ContactPhotoURL>String</ContactPhotoURL>
<EmailAddress>String</EmailAddress>
</ContactEmailAddress>
</EmailAddressBook>
</UserContacts>