001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026
002/*
003 * Copyright (c) 2010-2026 Mark Allen, Norbert Bartels.
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023package com.restfb.types.whatsapp;
024
025import com.restfb.Facebook;
026import com.restfb.JsonMapper.JsonMappingCompleted;
027import com.restfb.types.AbstractFacebookType;
028import java.util.Date;
029
030/**
031 * Represents the <a href=
032 * "https://developers.facebook.com/docs/graph-api/reference/whats-app-business-account-to-number-current-status#fields">
033 * WhatsApp Business Phone Number</a>
034 */
035public class WhatsAppBusinessPhoneNumber extends AbstractFacebookType {
036  private static final long serialVersionUID = 1L;
037  // WhatsApp business phone number ID
038  @Facebook
039  private String id;
040  // The account mode of the phone number
041  @Facebook("account_mode")
042  private AccountMode accountMode;
043  // The certificate of the WhatsApp business phone number
044  @Facebook
045  private String certificate;
046  // The verification status of the phone number's OTP (One-Time Password) (Default)
047  @Facebook("code_verification_status")
048  private CodeVerificationStatus codeVerificationStatus;
049  // Configuration for WhatsApp Business conversational automation
050  @Facebook("conversational_automation")
051  private WhatsAppBusinessConversationalComponent conversationAutomation;
052  // WhatsApp business phone number in international format (Default)
053  @Facebook("display_phone_number")
054  private String displayPhoneNumber;
055  // Status of eligibility in the API Business Global Search
056  @Facebook("eligibility_for_api_business_global_search")
057  private String eligibilityForApiBusinessGlobalSearch;
058  // Health status of the WhatsApp Business number (used for messaging diagnostics)
059  @Facebook("health_status")
060  private WhatsAppBusinessHealthStatus healthStatus;
061  // Indicates if the phone number is associated with an Official Business Account
062  @Facebook("is_official_business_account")
063  private Boolean isOfficialBusinessAccount;
064  // Indicates if the phone number is used in the WhatsApp Business app
065  @Facebook("is_on_biz_app")
066  private Boolean isOnBizApp;
067  // Indicates if two-step verification is enabled for this phone number
068  @Facebook("is_pin_enabled")
069  private Boolean isPinEnabled;
070  // Indicates if the phone number is pre-verified
071  @Facebook("is_preverified_number")
072  private Boolean isPreverifiedNumber;
073  // The date and time when the phone number was added to the WhatsApp Business Account (Default)
074  @Facebook("last_onboarded_time")
075  private Date lastOnboardedTime;
076  // The messaging limit tier assigned to the phone number
077  @Facebook("messaging_limit_tier")
078  private MessagingLimitTier messagingLimitTier;
079  // The status of the phone number’s display name review
080  @Facebook("name_status")
081  private NameStatus nameStatus;
082  // The certificate of the newly requested name
083  @Facebook("new_certificate")
084  private String newCertificate;
085  // The status of the review of the new requested name
086  @Facebook("new_name_status")
087  private NameStatus newNameStatus;
088  // The platform where the business phone number is registered (Default)
089  @Facebook("platform_type")
090  private PlatformType platformType;
091  // The quality rating of the WhatsApp business phone number
092  @Facebook("quality_score")
093  private WhatsAppPhoneQualityScoreShape qualityScore;
094  // The availability of the phone number in WhatsApp Business Search
095  @Facebook("search_visibility")
096  private String searchVisibility;
097  // The operational status of the phone number
098  @Facebook
099  private Status status;
100  // The throughput level for Cloud API (Default)
101  @Facebook
102  private Throughput throughput;
103  // The verified name that appears in WhatsApp Manager and client chat headers (Default)
104  @Facebook("verified_name")
105  private String verifiedName;
106  @Facebook("quality_rating")
107  private String qualityRating;
108
109  @JsonMappingCompleted
110  protected void fillQualityScore() {
111    if (this.qualityScore != null || this.qualityRating == null) return;
112    WhatsAppPhoneQualityScoreShape qualityScore = new WhatsAppPhoneQualityScoreShape();
113    qualityScore.setScore(this.qualityRating);
114    this.qualityScore = qualityScore;
115  }
116
117
118  public enum AccountMode {
119    SANDBOX, LIVE;
120  }
121
122
123  public enum CodeVerificationStatus {
124    NOT_VERIFIED, VERIFIED, EXPIRED;
125  }
126
127
128  public enum Status {
129    PENDING, DELETED, MIGRATED, BANNED, RESTRICTED, RATE_LIMITED, FLAGGED, CONNECTED, DISCONNECTED, UNKNOWN, UNVERIFIED;
130  }
131
132
133  public enum MessagingLimitTier {
134    TIER_50, TIER_250, TIER_1K, TIER_10K, TIER_100K, TIER_UNLIMITED;
135  }
136
137
138  public enum NameStatus {
139    NONE, NON_EXISTS, PENDING_REVIEW, AVAILABLE_WITHOUT_REVIEW, EXPIRED, APPROVED, DECLINED;
140  }
141
142
143  public enum PlatformType {
144    CLOUD_API, ON_PREMISE, NOT_APPLICABLE;
145  }
146
147
148  public static class Throughput {
149    // Error code representing the specific issue
150    @Facebook
151    private Level level;
152
153
154    public enum Level {
155      STANDARD, HIGH, NOT_APPLICABLE;
156    }
157
158    @java.lang.SuppressWarnings("all")
159    @lombok.Generated
160    public Level getLevel() {
161      return this.level;
162    }
163
164    @java.lang.SuppressWarnings("all")
165    @lombok.Generated
166    public void setLevel(final Level level) {
167      this.level = level;
168    }
169  }
170
171  @java.lang.SuppressWarnings("all")
172  @lombok.Generated
173  public String getId() {
174    return this.id;
175  }
176
177  @java.lang.SuppressWarnings("all")
178  @lombok.Generated
179  public void setId(final String id) {
180    this.id = id;
181  }
182
183  @java.lang.SuppressWarnings("all")
184  @lombok.Generated
185  public AccountMode getAccountMode() {
186    return this.accountMode;
187  }
188
189  @java.lang.SuppressWarnings("all")
190  @lombok.Generated
191  public void setAccountMode(final AccountMode accountMode) {
192    this.accountMode = accountMode;
193  }
194
195  @java.lang.SuppressWarnings("all")
196  @lombok.Generated
197  public String getCertificate() {
198    return this.certificate;
199  }
200
201  @java.lang.SuppressWarnings("all")
202  @lombok.Generated
203  public void setCertificate(final String certificate) {
204    this.certificate = certificate;
205  }
206
207  @java.lang.SuppressWarnings("all")
208  @lombok.Generated
209  public CodeVerificationStatus getCodeVerificationStatus() {
210    return this.codeVerificationStatus;
211  }
212
213  @java.lang.SuppressWarnings("all")
214  @lombok.Generated
215  public void setCodeVerificationStatus(final CodeVerificationStatus codeVerificationStatus) {
216    this.codeVerificationStatus = codeVerificationStatus;
217  }
218
219  @java.lang.SuppressWarnings("all")
220  @lombok.Generated
221  public WhatsAppBusinessConversationalComponent getConversationAutomation() {
222    return this.conversationAutomation;
223  }
224
225  @java.lang.SuppressWarnings("all")
226  @lombok.Generated
227  public void setConversationAutomation(final WhatsAppBusinessConversationalComponent conversationAutomation) {
228    this.conversationAutomation = conversationAutomation;
229  }
230
231  @java.lang.SuppressWarnings("all")
232  @lombok.Generated
233  public String getDisplayPhoneNumber() {
234    return this.displayPhoneNumber;
235  }
236
237  @java.lang.SuppressWarnings("all")
238  @lombok.Generated
239  public void setDisplayPhoneNumber(final String displayPhoneNumber) {
240    this.displayPhoneNumber = displayPhoneNumber;
241  }
242
243  @java.lang.SuppressWarnings("all")
244  @lombok.Generated
245  public String getEligibilityForApiBusinessGlobalSearch() {
246    return this.eligibilityForApiBusinessGlobalSearch;
247  }
248
249  @java.lang.SuppressWarnings("all")
250  @lombok.Generated
251  public void setEligibilityForApiBusinessGlobalSearch(final String eligibilityForApiBusinessGlobalSearch) {
252    this.eligibilityForApiBusinessGlobalSearch = eligibilityForApiBusinessGlobalSearch;
253  }
254
255  @java.lang.SuppressWarnings("all")
256  @lombok.Generated
257  public WhatsAppBusinessHealthStatus getHealthStatus() {
258    return this.healthStatus;
259  }
260
261  @java.lang.SuppressWarnings("all")
262  @lombok.Generated
263  public void setHealthStatus(final WhatsAppBusinessHealthStatus healthStatus) {
264    this.healthStatus = healthStatus;
265  }
266
267  @java.lang.SuppressWarnings("all")
268  @lombok.Generated
269  public Boolean getIsOfficialBusinessAccount() {
270    return this.isOfficialBusinessAccount;
271  }
272
273  @java.lang.SuppressWarnings("all")
274  @lombok.Generated
275  public void setIsOfficialBusinessAccount(final Boolean isOfficialBusinessAccount) {
276    this.isOfficialBusinessAccount = isOfficialBusinessAccount;
277  }
278
279  @java.lang.SuppressWarnings("all")
280  @lombok.Generated
281  public Boolean getIsOnBizApp() {
282    return this.isOnBizApp;
283  }
284
285  @java.lang.SuppressWarnings("all")
286  @lombok.Generated
287  public void setIsOnBizApp(final Boolean isOnBizApp) {
288    this.isOnBizApp = isOnBizApp;
289  }
290
291  @java.lang.SuppressWarnings("all")
292  @lombok.Generated
293  public Boolean getIsPinEnabled() {
294    return this.isPinEnabled;
295  }
296
297  @java.lang.SuppressWarnings("all")
298  @lombok.Generated
299  public void setIsPinEnabled(final Boolean isPinEnabled) {
300    this.isPinEnabled = isPinEnabled;
301  }
302
303  @java.lang.SuppressWarnings("all")
304  @lombok.Generated
305  public Boolean getIsPreverifiedNumber() {
306    return this.isPreverifiedNumber;
307  }
308
309  @java.lang.SuppressWarnings("all")
310  @lombok.Generated
311  public void setIsPreverifiedNumber(final Boolean isPreverifiedNumber) {
312    this.isPreverifiedNumber = isPreverifiedNumber;
313  }
314
315  @java.lang.SuppressWarnings("all")
316  @lombok.Generated
317  public Date getLastOnboardedTime() {
318    return this.lastOnboardedTime;
319  }
320
321  @java.lang.SuppressWarnings("all")
322  @lombok.Generated
323  public void setLastOnboardedTime(final Date lastOnboardedTime) {
324    this.lastOnboardedTime = lastOnboardedTime;
325  }
326
327  @java.lang.SuppressWarnings("all")
328  @lombok.Generated
329  public MessagingLimitTier getMessagingLimitTier() {
330    return this.messagingLimitTier;
331  }
332
333  @java.lang.SuppressWarnings("all")
334  @lombok.Generated
335  public void setMessagingLimitTier(final MessagingLimitTier messagingLimitTier) {
336    this.messagingLimitTier = messagingLimitTier;
337  }
338
339  @java.lang.SuppressWarnings("all")
340  @lombok.Generated
341  public NameStatus getNameStatus() {
342    return this.nameStatus;
343  }
344
345  @java.lang.SuppressWarnings("all")
346  @lombok.Generated
347  public void setNameStatus(final NameStatus nameStatus) {
348    this.nameStatus = nameStatus;
349  }
350
351  @java.lang.SuppressWarnings("all")
352  @lombok.Generated
353  public String getNewCertificate() {
354    return this.newCertificate;
355  }
356
357  @java.lang.SuppressWarnings("all")
358  @lombok.Generated
359  public void setNewCertificate(final String newCertificate) {
360    this.newCertificate = newCertificate;
361  }
362
363  @java.lang.SuppressWarnings("all")
364  @lombok.Generated
365  public NameStatus getNewNameStatus() {
366    return this.newNameStatus;
367  }
368
369  @java.lang.SuppressWarnings("all")
370  @lombok.Generated
371  public void setNewNameStatus(final NameStatus newNameStatus) {
372    this.newNameStatus = newNameStatus;
373  }
374
375  @java.lang.SuppressWarnings("all")
376  @lombok.Generated
377  public PlatformType getPlatformType() {
378    return this.platformType;
379  }
380
381  @java.lang.SuppressWarnings("all")
382  @lombok.Generated
383  public void setPlatformType(final PlatformType platformType) {
384    this.platformType = platformType;
385  }
386
387  @java.lang.SuppressWarnings("all")
388  @lombok.Generated
389  public WhatsAppPhoneQualityScoreShape getQualityScore() {
390    return this.qualityScore;
391  }
392
393  @java.lang.SuppressWarnings("all")
394  @lombok.Generated
395  public void setQualityScore(final WhatsAppPhoneQualityScoreShape qualityScore) {
396    this.qualityScore = qualityScore;
397  }
398
399  @java.lang.SuppressWarnings("all")
400  @lombok.Generated
401  public String getSearchVisibility() {
402    return this.searchVisibility;
403  }
404
405  @java.lang.SuppressWarnings("all")
406  @lombok.Generated
407  public void setSearchVisibility(final String searchVisibility) {
408    this.searchVisibility = searchVisibility;
409  }
410
411  @java.lang.SuppressWarnings("all")
412  @lombok.Generated
413  public Status getStatus() {
414    return this.status;
415  }
416
417  @java.lang.SuppressWarnings("all")
418  @lombok.Generated
419  public void setStatus(final Status status) {
420    this.status = status;
421  }
422
423  @java.lang.SuppressWarnings("all")
424  @lombok.Generated
425  public Throughput getThroughput() {
426    return this.throughput;
427  }
428
429  @java.lang.SuppressWarnings("all")
430  @lombok.Generated
431  public void setThroughput(final Throughput throughput) {
432    this.throughput = throughput;
433  }
434
435  @java.lang.SuppressWarnings("all")
436  @lombok.Generated
437  public String getVerifiedName() {
438    return this.verifiedName;
439  }
440
441  @java.lang.SuppressWarnings("all")
442  @lombok.Generated
443  public void setVerifiedName(final String verifiedName) {
444    this.verifiedName = verifiedName;
445  }
446}