@asposecloud/aspose-email-cloud
Version:
Aspose.Email Cloud Node.js SDK
568 lines (564 loc) • 16.1 kB
JavaScript
"use strict";
/*
* MIT License
* Copyright (c) 2018-2020 Aspose Pty Ltd
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContactDtoBuilder = exports.ContactDto = void 0;
/**
* VCard document representation.
*/
class ContactDto {
/**
* VCard document representation.
* @param associatedPersons Associated persons.
* @param attachments Document attachments.
* @param companyName Company name.
* @param computerNetworkName Computer network.
* @param customerId Customer id.
* @param departmentName Department name.
* @param displayName Display name.
* @param emailAddresses Person's email addresses.
* @param events Person's events.
* @param fileAs A name used for sorting.
* @param fileAsMapping Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None
* @param freeBusyLocation URL path from which a client can retrieve free/busy information for the contact as an iCal file.
* @param gender Enum defines gender of a person. Enum, available values: Unspecified, Female, Male
* @param givenName Person's given name.
* @param governmentIdNumber Government id number.
* @param hobbies Person's hobbies.
* @param initials Person's initials.
* @param instantMessengers Person's instant messenger addresses.
* @param jobTitle Person's job title.
* @param language Language.
* @param location Person's location.
* @param middleName Person's middle name.
* @param nickname Person's nickname.
* @param notes Notes.
* @param notesFormat Defines format of a text. Enum, available values: Text, Html
* @param officeLocation Office location.
* @param organizationalIdNumber Contains an identifier for the mail user used within the mail user's organization.
* @param phoneNumbers Person's phone numbers.
* @param photo Person's photo.
* @param physicalAddresses Person's physical addresses.
* @param preferredTextEncoding Encoding for all text properties.
* @param prefix A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.
* @param profession A job position of a person in a company.
* @param suffix A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.
* @param surname Person's surname.
* @param urls Person's urls.
*/
constructor(associatedPersons, attachments, companyName, computerNetworkName, customerId, departmentName, displayName, emailAddresses, events, fileAs, fileAsMapping, freeBusyLocation, gender, givenName, governmentIdNumber, hobbies, initials, instantMessengers, jobTitle, language, location, middleName, nickname, notes, notesFormat, officeLocation, organizationalIdNumber, phoneNumbers, photo, physicalAddresses, preferredTextEncoding, prefix, profession, suffix, surname, urls) {
this.associatedPersons = associatedPersons;
this.attachments = attachments;
this.companyName = companyName;
this.computerNetworkName = computerNetworkName;
this.customerId = customerId;
this.departmentName = departmentName;
this.displayName = displayName;
this.emailAddresses = emailAddresses;
this.events = events;
this.fileAs = fileAs;
this.fileAsMapping = fileAsMapping;
this.freeBusyLocation = freeBusyLocation;
this.gender = gender;
this.givenName = givenName;
this.governmentIdNumber = governmentIdNumber;
this.hobbies = hobbies;
this.initials = initials;
this.instantMessengers = instantMessengers;
this.jobTitle = jobTitle;
this.language = language;
this.location = location;
this.middleName = middleName;
this.nickname = nickname;
this.notes = notes;
this.notesFormat = notesFormat;
this.officeLocation = officeLocation;
this.organizationalIdNumber = organizationalIdNumber;
this.phoneNumbers = phoneNumbers;
this.photo = photo;
this.physicalAddresses = physicalAddresses;
this.preferredTextEncoding = preferredTextEncoding;
this.prefix = prefix;
this.profession = profession;
this.suffix = suffix;
this.surname = surname;
this.urls = urls;
}
/**
* Returns attribute type map
*/
static getAttributeTypeMap() {
return ContactDto.attributeTypeMap;
}
}
exports.ContactDto = ContactDto;
/**
* Attribute type map
*/
ContactDto.attributeTypeMap = [
{
name: "associatedPersons",
baseName: "associatedPersons",
type: "Array<AssociatedPerson>",
},
{
name: "attachments",
baseName: "attachments",
type: "Array<Attachment>",
},
{
name: "companyName",
baseName: "companyName",
type: "string",
},
{
name: "computerNetworkName",
baseName: "computerNetworkName",
type: "string",
},
{
name: "customerId",
baseName: "customerId",
type: "string",
},
{
name: "departmentName",
baseName: "departmentName",
type: "string",
},
{
name: "displayName",
baseName: "displayName",
type: "string",
},
{
name: "emailAddresses",
baseName: "emailAddresses",
type: "Array<EmailAddress>",
},
{
name: "events",
baseName: "events",
type: "Array<CustomerEvent>",
},
{
name: "fileAs",
baseName: "fileAs",
type: "string",
},
{
name: "fileAsMapping",
baseName: "fileAsMapping",
type: "string",
},
{
name: "freeBusyLocation",
baseName: "freeBusyLocation",
type: "string",
},
{
name: "gender",
baseName: "gender",
type: "string",
},
{
name: "givenName",
baseName: "givenName",
type: "string",
},
{
name: "governmentIdNumber",
baseName: "governmentIdNumber",
type: "string",
},
{
name: "hobbies",
baseName: "hobbies",
type: "string",
},
{
name: "initials",
baseName: "initials",
type: "string",
},
{
name: "instantMessengers",
baseName: "instantMessengers",
type: "Array<InstantMessengerAddress>",
},
{
name: "jobTitle",
baseName: "jobTitle",
type: "string",
},
{
name: "language",
baseName: "language",
type: "string",
},
{
name: "location",
baseName: "location",
type: "string",
},
{
name: "middleName",
baseName: "middleName",
type: "string",
},
{
name: "nickname",
baseName: "nickname",
type: "string",
},
{
name: "notes",
baseName: "notes",
type: "string",
},
{
name: "notesFormat",
baseName: "notesFormat",
type: "string",
},
{
name: "officeLocation",
baseName: "officeLocation",
type: "string",
},
{
name: "organizationalIdNumber",
baseName: "organizationalIdNumber",
type: "string",
},
{
name: "phoneNumbers",
baseName: "phoneNumbers",
type: "Array<PhoneNumber>",
},
{
name: "photo",
baseName: "photo",
type: "ContactPhoto",
},
{
name: "physicalAddresses",
baseName: "physicalAddresses",
type: "Array<PostalAddress>",
},
{
name: "preferredTextEncoding",
baseName: "preferredTextEncoding",
type: "string",
},
{
name: "prefix",
baseName: "prefix",
type: "string",
},
{
name: "profession",
baseName: "profession",
type: "string",
},
{
name: "suffix",
baseName: "suffix",
type: "string",
},
{
name: "surname",
baseName: "surname",
type: "string",
},
{
name: "urls",
baseName: "urls",
type: "Array<Url>",
}
];
/**
* ContactDto model builder
*/
class ContactDtoBuilder {
constructor(model) {
this.model = model;
}
/**
* Build model.
*/
build() {
return this.model;
}
/**
* Associated persons.
*/
associatedPersons(associatedPersons) {
this.model.associatedPersons = associatedPersons;
return this;
}
/**
* Document attachments.
*/
attachments(attachments) {
this.model.attachments = attachments;
return this;
}
/**
* Company name.
*/
companyName(companyName) {
this.model.companyName = companyName;
return this;
}
/**
* Computer network.
*/
computerNetworkName(computerNetworkName) {
this.model.computerNetworkName = computerNetworkName;
return this;
}
/**
* Customer id.
*/
customerId(customerId) {
this.model.customerId = customerId;
return this;
}
/**
* Department name.
*/
departmentName(departmentName) {
this.model.departmentName = departmentName;
return this;
}
/**
* Display name.
*/
displayName(displayName) {
this.model.displayName = displayName;
return this;
}
/**
* Person's email addresses.
*/
emailAddresses(emailAddresses) {
this.model.emailAddresses = emailAddresses;
return this;
}
/**
* Person's events.
*/
events(events) {
this.model.events = events;
return this;
}
/**
* A name used for sorting.
*/
fileAs(fileAs) {
this.model.fileAs = fileAs;
return this;
}
/**
* Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None
*/
fileAsMapping(fileAsMapping) {
this.model.fileAsMapping = fileAsMapping;
return this;
}
/**
* URL path from which a client can retrieve free/busy information for the contact as an iCal file.
*/
freeBusyLocation(freeBusyLocation) {
this.model.freeBusyLocation = freeBusyLocation;
return this;
}
/**
* Enum defines gender of a person. Enum, available values: Unspecified, Female, Male
*/
gender(gender) {
this.model.gender = gender;
return this;
}
/**
* Person's given name.
*/
givenName(givenName) {
this.model.givenName = givenName;
return this;
}
/**
* Government id number.
*/
governmentIdNumber(governmentIdNumber) {
this.model.governmentIdNumber = governmentIdNumber;
return this;
}
/**
* Person's hobbies.
*/
hobbies(hobbies) {
this.model.hobbies = hobbies;
return this;
}
/**
* Person's initials.
*/
initials(initials) {
this.model.initials = initials;
return this;
}
/**
* Person's instant messenger addresses.
*/
instantMessengers(instantMessengers) {
this.model.instantMessengers = instantMessengers;
return this;
}
/**
* Person's job title.
*/
jobTitle(jobTitle) {
this.model.jobTitle = jobTitle;
return this;
}
/**
* Language.
*/
language(language) {
this.model.language = language;
return this;
}
/**
* Person's location.
*/
location(location) {
this.model.location = location;
return this;
}
/**
* Person's middle name.
*/
middleName(middleName) {
this.model.middleName = middleName;
return this;
}
/**
* Person's nickname.
*/
nickname(nickname) {
this.model.nickname = nickname;
return this;
}
/**
* Notes.
*/
notes(notes) {
this.model.notes = notes;
return this;
}
/**
* Defines format of a text. Enum, available values: Text, Html
*/
notesFormat(notesFormat) {
this.model.notesFormat = notesFormat;
return this;
}
/**
* Office location.
*/
officeLocation(officeLocation) {
this.model.officeLocation = officeLocation;
return this;
}
/**
* Contains an identifier for the mail user used within the mail user's organization.
*/
organizationalIdNumber(organizationalIdNumber) {
this.model.organizationalIdNumber = organizationalIdNumber;
return this;
}
/**
* Person's phone numbers.
*/
phoneNumbers(phoneNumbers) {
this.model.phoneNumbers = phoneNumbers;
return this;
}
/**
* Person's photo.
*/
photo(photo) {
this.model.photo = photo;
return this;
}
/**
* Person's physical addresses.
*/
physicalAddresses(physicalAddresses) {
this.model.physicalAddresses = physicalAddresses;
return this;
}
/**
* Encoding for all text properties.
*/
preferredTextEncoding(preferredTextEncoding) {
this.model.preferredTextEncoding = preferredTextEncoding;
return this;
}
/**
* A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.
*/
prefix(prefix) {
this.model.prefix = prefix;
return this;
}
/**
* A job position of a person in a company.
*/
profession(profession) {
this.model.profession = profession;
return this;
}
/**
* A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.
*/
suffix(suffix) {
this.model.suffix = suffix;
return this;
}
/**
* Person's surname.
*/
surname(surname) {
this.model.surname = surname;
return this;
}
/**
* Person's urls.
*/
urls(urls) {
this.model.urls = urls;
return this;
}
}
exports.ContactDtoBuilder = ContactDtoBuilder;
//# sourceMappingURL=contact-dto.js.map