18779efd5Sopenharmony_ci/**
28779efd5Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
38779efd5Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
48779efd5Sopenharmony_ci * you may not use this file except in compliance with the License.
58779efd5Sopenharmony_ci * You may obtain a copy of the License at
68779efd5Sopenharmony_ci *
78779efd5Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
88779efd5Sopenharmony_ci *
98779efd5Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
108779efd5Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
118779efd5Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128779efd5Sopenharmony_ci * See the License for the specific language governing permissions and
138779efd5Sopenharmony_ci * limitations under the License.
148779efd5Sopenharmony_ci */
158779efd5Sopenharmony_ci
168779efd5Sopenharmony_ciexport class CallBean {
178779efd5Sopenharmony_ci  readonly id: string;
188779efd5Sopenharmony_ci  phone: string;
198779efd5Sopenharmony_ci  name: string;
208779efd5Sopenharmony_ci  callTime: string;
218779efd5Sopenharmony_ci  // Call type: 1: incoming call; 2: outgoing call; 3: missed call; 5: rejected call
228779efd5Sopenharmony_ci  callType: string;
238779efd5Sopenharmony_ci  // Home area of the number
248779efd5Sopenharmony_ci  callTag: string;
258779efd5Sopenharmony_ci  // Call SIM card. 0: SIM card 1, 1: SIM card 2.
268779efd5Sopenharmony_ci  simType: string;
278779efd5Sopenharmony_ci  // Indicates whether an HD call is supported. true: HD call; false: non-HD call
288779efd5Sopenharmony_ci  isHd: string;
298779efd5Sopenharmony_ci  // Format Phone Number
308779efd5Sopenharmony_ci  formatNumber: string;
318779efd5Sopenharmony_ci  // Contact ID.
328779efd5Sopenharmony_ci  contactKey: string;
338779efd5Sopenharmony_ci  // Call Times
348779efd5Sopenharmony_ci  num: string;
358779efd5Sopenharmony_ci  // Indicates whether to be selected. The default value is false.
368779efd5Sopenharmony_ci  isChecked: boolean = false;
378779efd5Sopenharmony_ci  portraitColor: string;
388779efd5Sopenharmony_ci  suffix: string;
398779efd5Sopenharmony_ci  constructor(id: string, phone: string) {
408779efd5Sopenharmony_ci    this.id = id;
418779efd5Sopenharmony_ci    this.phone = phone;
428779efd5Sopenharmony_ci  }
438779efd5Sopenharmony_ci
448779efd5Sopenharmony_ci  setName(name: string): CallBean {
458779efd5Sopenharmony_ci    this.name = name;
468779efd5Sopenharmony_ci    return this;
478779efd5Sopenharmony_ci  }
488779efd5Sopenharmony_ci
498779efd5Sopenharmony_ci  setCallTime(callTime: string) {
508779efd5Sopenharmony_ci    this.callTime = callTime;
518779efd5Sopenharmony_ci    return this;
528779efd5Sopenharmony_ci  }
538779efd5Sopenharmony_ci
548779efd5Sopenharmony_ci  setCallType(callType: string) {
558779efd5Sopenharmony_ci    this.callType = callType;
568779efd5Sopenharmony_ci    return this;
578779efd5Sopenharmony_ci  }
588779efd5Sopenharmony_ci
598779efd5Sopenharmony_ci  setCallTag(callTag: string) {
608779efd5Sopenharmony_ci    this.callTag = callTag;
618779efd5Sopenharmony_ci    return this;
628779efd5Sopenharmony_ci  }
638779efd5Sopenharmony_ci
648779efd5Sopenharmony_ci  setSimType(simType: string) {
658779efd5Sopenharmony_ci    this.simType = simType;
668779efd5Sopenharmony_ci    return this;
678779efd5Sopenharmony_ci  }
688779efd5Sopenharmony_ci
698779efd5Sopenharmony_ci  setIsHd(isHd: string) {
708779efd5Sopenharmony_ci    this.isHd = isHd;
718779efd5Sopenharmony_ci    return this;
728779efd5Sopenharmony_ci  }
738779efd5Sopenharmony_ci
748779efd5Sopenharmony_ci  setFormatNumber(formatNumber: string) {
758779efd5Sopenharmony_ci    this.formatNumber = formatNumber;
768779efd5Sopenharmony_ci    return this;
778779efd5Sopenharmony_ci  }
788779efd5Sopenharmony_ci
798779efd5Sopenharmony_ci  setContactKey(contactKey: string) {
808779efd5Sopenharmony_ci    this.contactKey = contactKey;
818779efd5Sopenharmony_ci    return this;
828779efd5Sopenharmony_ci  }
838779efd5Sopenharmony_ci
848779efd5Sopenharmony_ci  setNum(num: string) {
858779efd5Sopenharmony_ci    this.num = num;
868779efd5Sopenharmony_ci    return this;
878779efd5Sopenharmony_ci  }
888779efd5Sopenharmony_ci
898779efd5Sopenharmony_ci  setIsChecked(isChecked: boolean) {
908779efd5Sopenharmony_ci    this.isChecked = isChecked;
918779efd5Sopenharmony_ci    return this;
928779efd5Sopenharmony_ci  }
938779efd5Sopenharmony_ci
948779efd5Sopenharmony_ci  setPortraitColor(portraitColor: string) {
958779efd5Sopenharmony_ci    this.portraitColor = portraitColor;
968779efd5Sopenharmony_ci    return this;
978779efd5Sopenharmony_ci  }
988779efd5Sopenharmony_ci
998779efd5Sopenharmony_ci  setSuffix(suffix: string) {
1008779efd5Sopenharmony_ci    this.suffix = suffix;
1018779efd5Sopenharmony_ci    return this;
1028779efd5Sopenharmony_ci  }
1038779efd5Sopenharmony_ci}