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.types.AbstractFacebookType;
027import java.util.ArrayList;
028import java.util.List;
029
030/**
031 * Represents the <a href="https://developers.facebook.com/docs/whatsapp/cloud-api/health-status/#response-contents">
032 * Messaging Health Status</a>
033 */
034public class WhatsAppBusinessHealthStatus extends AbstractFacebookType {
035  private static final long serialVersionUID = 1L;
036  // Indicates the overall messaging capability of the business phone number
037  @Facebook("can_send_message")
038  private CanSendMessageStatus canSendMessage;
039  // List of entities and their messaging status
040  @Facebook
041  private List<EntityStatus> entities = new ArrayList<>();
042
043
044  public enum CanSendMessageStatus {
045    AVAILABLE, LIMITED, BLOCKED;
046  }
047
048
049  public enum EntityType {
050    PHONE_NUMBER, WABA, BUSINESS, APP, MESSAGE_TEMPLATE;
051  }
052
053
054  public static class EntityStatus {
055    // Type of entity (PHONE_NUMBER, WABA, BUSINESS, APP, MESSAGE_TEMPLATE)
056    @Facebook("entity_type")
057    private EntityType entityType;
058    // ID of the entity
059    @Facebook
060    private String id;
061    // Messaging capability status of the entity
062    @Facebook("can_send_message")
063    private CanSendMessageStatus canSendMessage;
064    // Additional information about messaging limitations
065    @Facebook("additional_info")
066    private List<String> additionalInfo = new ArrayList<>();
067    // List of errors if the entity is blocked from sending messages
068    @Facebook
069    private List<ErrorDetail> errors = new ArrayList<>();
070
071    @java.lang.SuppressWarnings("all")
072    @lombok.Generated
073    public EntityType getEntityType() {
074      return this.entityType;
075    }
076
077    @java.lang.SuppressWarnings("all")
078    @lombok.Generated
079    public void setEntityType(final EntityType entityType) {
080      this.entityType = entityType;
081    }
082
083    @java.lang.SuppressWarnings("all")
084    @lombok.Generated
085    public String getId() {
086      return this.id;
087    }
088
089    @java.lang.SuppressWarnings("all")
090    @lombok.Generated
091    public void setId(final String id) {
092      this.id = id;
093    }
094
095    @java.lang.SuppressWarnings("all")
096    @lombok.Generated
097    public CanSendMessageStatus getCanSendMessage() {
098      return this.canSendMessage;
099    }
100
101    @java.lang.SuppressWarnings("all")
102    @lombok.Generated
103    public void setCanSendMessage(final CanSendMessageStatus canSendMessage) {
104      this.canSendMessage = canSendMessage;
105    }
106
107    @java.lang.SuppressWarnings("all")
108    @lombok.Generated
109    public List<String> getAdditionalInfo() {
110      return this.additionalInfo;
111    }
112
113    @java.lang.SuppressWarnings("all")
114    @lombok.Generated
115    public void setAdditionalInfo(final List<String> additionalInfo) {
116      this.additionalInfo = additionalInfo;
117    }
118
119    @java.lang.SuppressWarnings("all")
120    @lombok.Generated
121    public List<ErrorDetail> getErrors() {
122      return this.errors;
123    }
124
125    @java.lang.SuppressWarnings("all")
126    @lombok.Generated
127    public void setErrors(final List<ErrorDetail> errors) {
128      this.errors = errors;
129    }
130  }
131
132
133  public static class ErrorDetail {
134    // Error code representing the specific issue
135    @Facebook("error_code")
136    private int errorCode;
137    // Description of the error
138    @Facebook("error_description")
139    private String errorDescription;
140    // Suggested solution for resolving the error
141    @Facebook("possible_solution")
142    private String possibleSolution;
143
144    @java.lang.SuppressWarnings("all")
145    @lombok.Generated
146    public int getErrorCode() {
147      return this.errorCode;
148    }
149
150    @java.lang.SuppressWarnings("all")
151    @lombok.Generated
152    public void setErrorCode(final int errorCode) {
153      this.errorCode = errorCode;
154    }
155
156    @java.lang.SuppressWarnings("all")
157    @lombok.Generated
158    public String getErrorDescription() {
159      return this.errorDescription;
160    }
161
162    @java.lang.SuppressWarnings("all")
163    @lombok.Generated
164    public void setErrorDescription(final String errorDescription) {
165      this.errorDescription = errorDescription;
166    }
167
168    @java.lang.SuppressWarnings("all")
169    @lombok.Generated
170    public String getPossibleSolution() {
171      return this.possibleSolution;
172    }
173
174    @java.lang.SuppressWarnings("all")
175    @lombok.Generated
176    public void setPossibleSolution(final String possibleSolution) {
177      this.possibleSolution = possibleSolution;
178    }
179  }
180
181  @java.lang.SuppressWarnings("all")
182  @lombok.Generated
183  public CanSendMessageStatus getCanSendMessage() {
184    return this.canSendMessage;
185  }
186
187  @java.lang.SuppressWarnings("all")
188  @lombok.Generated
189  public void setCanSendMessage(final CanSendMessageStatus canSendMessage) {
190    this.canSendMessage = canSendMessage;
191  }
192
193  @java.lang.SuppressWarnings("all")
194  @lombok.Generated
195  public List<EntityStatus> getEntities() {
196    return this.entities;
197  }
198
199  @java.lang.SuppressWarnings("all")
200  @lombok.Generated
201  public void setEntities(final List<EntityStatus> entities) {
202    this.entities = entities;
203  }
204}