• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import {PhoneNumBean} from '../bean/PhoneNumBean'
17import {EmailBean} from '../bean/EmailBean'
18import {AIMBean} from '../bean/AIMBean'
19import {HouseBean} from '../bean/HouseBean'
20import {GroupBean} from '../bean/GroupBean'
21import {EventBean} from '../bean/EventBean'
22import {AssociatedPersonBean} from '../bean/AssociatedPersonBean'
23
24export class ContactInfo {
25  id: string;
26  display_name: string;
27  nickname: string;
28  //  phonetic_name: string;
29  phones: PhoneNumBean[];
30  emails: EmailBean [];
31  remarks: string;
32  position: string;
33  company: string;
34  aims: AIMBean[];
35  houses: HouseBean[];
36  websites: string[];
37  relationships: AssociatedPersonBean[];
38  events: EventBean[];
39  groups: GroupBean[];
40  favorite: number;
41  constructor(id: string, display_name: string,
42              nickname: string, phones: PhoneNumBean[],
43              emails: EmailBean[], position: string, company: string, remarks: string,
44              aims: AIMBean[], houses: HouseBean[], websites: string[],
45              relationships: AssociatedPersonBean[], events: EventBean[], groups: GroupBean[], favorite: number) {
46    this.id = id;
47    this.display_name = display_name;
48    this.nickname = nickname;
49    this.phones = phones;
50    this.emails = emails;
51    this.position = position;
52    this.company = company;
53    this.remarks = remarks;
54    this.aims = aims;
55    this.houses = houses;
56    this.websites = websites;
57    this.relationships = relationships;
58    this.events = events;
59    this.groups = groups;
60    this.favorite = favorite;
61  }
62
63  setID(id: string) {
64    this.id = id;
65    return this;
66  }
67
68  setDisplayName(display_name: string) {
69    this.display_name = display_name;
70    return this;
71  }
72
73  setNickName(nickname: string) {
74    this.nickname = nickname;
75    return this;
76  }
77
78  setPhones(phones: PhoneNumBean[]) {
79    this.phones = phones;
80    return this;
81  }
82
83  setEmails(emails: EmailBean[]) {
84    this.emails = emails;
85    return this;
86  }
87
88  setRemarks(remarks: string) {
89    this.remarks = remarks;
90    return this;
91  }
92
93  setPosition(position: string) {
94    this.position = position;
95    return this;
96  }
97
98  setCompany(company: string) {
99    this.company = company;
100    return this;
101  }
102
103  setAims(aims: AIMBean[]) {
104    this.aims = aims;
105    return this;
106  }
107
108  setHouses(houses: HouseBean[]) {
109    this.houses = houses;
110    return this;
111  }
112
113  setWebsites(websites: string[]) {
114    this.websites = websites;
115    return this;
116  }
117
118  setRelationships(relationships: AssociatedPersonBean[]) {
119    this.relationships = relationships;
120    return this;
121  }
122
123  setEvents(events: EventBean[]) {
124    this.events = events;
125    return this;
126  }
127
128  setGroups(groups: GroupBean[]) {
129    this.groups = groups;
130    return this;
131  }
132}
133