001// Generated by delombok at Fri Feb 21 00:22:14 UTC 2025 002/* 003 * Copyright (c) 2010-2025 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 032 * <a href="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 public Level getLevel() { 160 return this.level; 161 } 162 163 @java.lang.SuppressWarnings("all") 164 public void setLevel(final Level level) { 165 this.level = level; 166 } 167 } 168 169 @java.lang.SuppressWarnings("all") 170 public String getId() { 171 return this.id; 172 } 173 174 @java.lang.SuppressWarnings("all") 175 public void setId(final String id) { 176 this.id = id; 177 } 178 179 @java.lang.SuppressWarnings("all") 180 public AccountMode getAccountMode() { 181 return this.accountMode; 182 } 183 184 @java.lang.SuppressWarnings("all") 185 public void setAccountMode(final AccountMode accountMode) { 186 this.accountMode = accountMode; 187 } 188 189 @java.lang.SuppressWarnings("all") 190 public String getCertificate() { 191 return this.certificate; 192 } 193 194 @java.lang.SuppressWarnings("all") 195 public void setCertificate(final String certificate) { 196 this.certificate = certificate; 197 } 198 199 @java.lang.SuppressWarnings("all") 200 public CodeVerificationStatus getCodeVerificationStatus() { 201 return this.codeVerificationStatus; 202 } 203 204 @java.lang.SuppressWarnings("all") 205 public void setCodeVerificationStatus(final CodeVerificationStatus codeVerificationStatus) { 206 this.codeVerificationStatus = codeVerificationStatus; 207 } 208 209 @java.lang.SuppressWarnings("all") 210 public WhatsAppBusinessConversationalComponent getConversationAutomation() { 211 return this.conversationAutomation; 212 } 213 214 @java.lang.SuppressWarnings("all") 215 public void setConversationAutomation(final WhatsAppBusinessConversationalComponent conversationAutomation) { 216 this.conversationAutomation = conversationAutomation; 217 } 218 219 @java.lang.SuppressWarnings("all") 220 public String getDisplayPhoneNumber() { 221 return this.displayPhoneNumber; 222 } 223 224 @java.lang.SuppressWarnings("all") 225 public void setDisplayPhoneNumber(final String displayPhoneNumber) { 226 this.displayPhoneNumber = displayPhoneNumber; 227 } 228 229 @java.lang.SuppressWarnings("all") 230 public String getEligibilityForApiBusinessGlobalSearch() { 231 return this.eligibilityForApiBusinessGlobalSearch; 232 } 233 234 @java.lang.SuppressWarnings("all") 235 public void setEligibilityForApiBusinessGlobalSearch(final String eligibilityForApiBusinessGlobalSearch) { 236 this.eligibilityForApiBusinessGlobalSearch = eligibilityForApiBusinessGlobalSearch; 237 } 238 239 @java.lang.SuppressWarnings("all") 240 public WhatsAppBusinessHealthStatus getHealthStatus() { 241 return this.healthStatus; 242 } 243 244 @java.lang.SuppressWarnings("all") 245 public void setHealthStatus(final WhatsAppBusinessHealthStatus healthStatus) { 246 this.healthStatus = healthStatus; 247 } 248 249 @java.lang.SuppressWarnings("all") 250 public Boolean getIsOfficialBusinessAccount() { 251 return this.isOfficialBusinessAccount; 252 } 253 254 @java.lang.SuppressWarnings("all") 255 public void setIsOfficialBusinessAccount(final Boolean isOfficialBusinessAccount) { 256 this.isOfficialBusinessAccount = isOfficialBusinessAccount; 257 } 258 259 @java.lang.SuppressWarnings("all") 260 public Boolean getIsOnBizApp() { 261 return this.isOnBizApp; 262 } 263 264 @java.lang.SuppressWarnings("all") 265 public void setIsOnBizApp(final Boolean isOnBizApp) { 266 this.isOnBizApp = isOnBizApp; 267 } 268 269 @java.lang.SuppressWarnings("all") 270 public Boolean getIsPinEnabled() { 271 return this.isPinEnabled; 272 } 273 274 @java.lang.SuppressWarnings("all") 275 public void setIsPinEnabled(final Boolean isPinEnabled) { 276 this.isPinEnabled = isPinEnabled; 277 } 278 279 @java.lang.SuppressWarnings("all") 280 public Boolean getIsPreverifiedNumber() { 281 return this.isPreverifiedNumber; 282 } 283 284 @java.lang.SuppressWarnings("all") 285 public void setIsPreverifiedNumber(final Boolean isPreverifiedNumber) { 286 this.isPreverifiedNumber = isPreverifiedNumber; 287 } 288 289 @java.lang.SuppressWarnings("all") 290 public Date getLastOnboardedTime() { 291 return this.lastOnboardedTime; 292 } 293 294 @java.lang.SuppressWarnings("all") 295 public void setLastOnboardedTime(final Date lastOnboardedTime) { 296 this.lastOnboardedTime = lastOnboardedTime; 297 } 298 299 @java.lang.SuppressWarnings("all") 300 public MessagingLimitTier getMessagingLimitTier() { 301 return this.messagingLimitTier; 302 } 303 304 @java.lang.SuppressWarnings("all") 305 public void setMessagingLimitTier(final MessagingLimitTier messagingLimitTier) { 306 this.messagingLimitTier = messagingLimitTier; 307 } 308 309 @java.lang.SuppressWarnings("all") 310 public NameStatus getNameStatus() { 311 return this.nameStatus; 312 } 313 314 @java.lang.SuppressWarnings("all") 315 public void setNameStatus(final NameStatus nameStatus) { 316 this.nameStatus = nameStatus; 317 } 318 319 @java.lang.SuppressWarnings("all") 320 public String getNewCertificate() { 321 return this.newCertificate; 322 } 323 324 @java.lang.SuppressWarnings("all") 325 public void setNewCertificate(final String newCertificate) { 326 this.newCertificate = newCertificate; 327 } 328 329 @java.lang.SuppressWarnings("all") 330 public NameStatus getNewNameStatus() { 331 return this.newNameStatus; 332 } 333 334 @java.lang.SuppressWarnings("all") 335 public void setNewNameStatus(final NameStatus newNameStatus) { 336 this.newNameStatus = newNameStatus; 337 } 338 339 @java.lang.SuppressWarnings("all") 340 public PlatformType getPlatformType() { 341 return this.platformType; 342 } 343 344 @java.lang.SuppressWarnings("all") 345 public void setPlatformType(final PlatformType platformType) { 346 this.platformType = platformType; 347 } 348 349 @java.lang.SuppressWarnings("all") 350 public WhatsAppPhoneQualityScoreShape getQualityScore() { 351 return this.qualityScore; 352 } 353 354 @java.lang.SuppressWarnings("all") 355 public void setQualityScore(final WhatsAppPhoneQualityScoreShape qualityScore) { 356 this.qualityScore = qualityScore; 357 } 358 359 @java.lang.SuppressWarnings("all") 360 public String getSearchVisibility() { 361 return this.searchVisibility; 362 } 363 364 @java.lang.SuppressWarnings("all") 365 public void setSearchVisibility(final String searchVisibility) { 366 this.searchVisibility = searchVisibility; 367 } 368 369 @java.lang.SuppressWarnings("all") 370 public Status getStatus() { 371 return this.status; 372 } 373 374 @java.lang.SuppressWarnings("all") 375 public void setStatus(final Status status) { 376 this.status = status; 377 } 378 379 @java.lang.SuppressWarnings("all") 380 public Throughput getThroughput() { 381 return this.throughput; 382 } 383 384 @java.lang.SuppressWarnings("all") 385 public void setThroughput(final Throughput throughput) { 386 this.throughput = throughput; 387 } 388 389 @java.lang.SuppressWarnings("all") 390 public String getVerifiedName() { 391 return this.verifiedName; 392 } 393 394 @java.lang.SuppressWarnings("all") 395 public void setVerifiedName(final String verifiedName) { 396 this.verifiedName = verifiedName; 397 } 398}