• 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  constructor(id: string, display_name: string,
41              nickname: string, phones: PhoneNumBean[],
42              emails: EmailBean[], position: string, company: string, remarks: string,
43              aims: AIMBean[], houses: HouseBean[], websites: string[],
44              relationships: AssociatedPersonBean[], events: EventBean[], groups: GroupBean[]) {
45    this.id = id;
46    this.display_name = display_name;
47    this.nickname = nickname;
48    this.phones = phones;
49    this.emails = emails;
50    this.position = position;
51    this.company = company;
52    this.remarks = remarks;
53    this.aims = aims;
54    this.houses = houses;
55    this.websites = websites;
56    this.relationships = relationships;
57    this.events = events;
58    this.groups = groups;
59  }
60
61  setID(id: string) {
62    this.id = id;
63    return this;
64  }
65
66  setDisplayName(display_name: string) {
67    this.display_name = display_name;
68    return this;
69  }
70
71  setNickName(nickname: string) {
72    this.nickname = nickname;
73    return this;
74  }
75
76  setPhones(phones: PhoneNumBean[]) {
77    this.phones = phones;
78    return this;
79  }
80
81  setEmails(emails: EmailBean[]) {
82    this.emails = emails;
83    return this;
84  }
85
86  setRemarks(remarks: string) {
87    this.remarks = remarks;
88    return this;
89  }
90
91  setPosition(position: string) {
92    this.position = position;
93    return this;
94  }
95
96  setCompany(company: string) {
97    this.company = company;
98    return this;
99  }
100
101  setAims(aims: AIMBean[]) {
102    this.aims = aims;
103    return this;
104  }
105
106  setHouses(houses: HouseBean[]) {
107    this.houses = houses;
108    return this;
109  }
110
111  setWebsites(websites: string[]) {
112    this.websites = websites;
113    return this;
114  }
115
116  setRelationships(relationships: AssociatedPersonBean[]) {
117    this.relationships = relationships;
118    return this;
119  }
120
121  setEvents(events: EventBean[]) {
122    this.events = events;
123    return this;
124  }
125
126  setGroups(groups: GroupBean[]) {
127    this.groups = groups;
128    return this;
129  }
130}
131