-
Notifications
You must be signed in to change notification settings - Fork 20
/
WhatsAppWebhookInboundMessageResult.java
232 lines (212 loc) · 6.57 KB
/
WhatsAppWebhookInboundMessageResult.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/*
* This class is auto generated from the Infobip OpenAPI specification
* through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
* powered by the OpenAPI Generator (https://openapi-generator.tech).
*
* Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
* or contact us @ [email protected].
*/
package com.infobip.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* Represents WhatsAppWebhookInboundMessageResult model.
*/
public class WhatsAppWebhookInboundMessageResult {
private List<WhatsAppWebhookInboundMessageData> results = new ArrayList<>();
private Integer messageCount;
private Integer pendingMessageCount;
/**
* Sets results.
* <p>
* Field description:
* Collection of reports, one per every received message.
* <p>
* The field is required.
*
* @param results
* @return This {@link WhatsAppWebhookInboundMessageResult instance}.
*/
public WhatsAppWebhookInboundMessageResult results(List<WhatsAppWebhookInboundMessageData> results) {
this.results = results;
return this;
}
/**
* Adds and item into results.
* <p>
* Field description:
* Collection of reports, one per every received message.
* <p>
* The field is required.
*
* @param resultsItem The item to be added to the list.
* @return This {@link WhatsAppWebhookInboundMessageResult instance}.
*/
public WhatsAppWebhookInboundMessageResult addResultsItem(WhatsAppWebhookInboundMessageData resultsItem) {
if (this.results == null) {
this.results = new ArrayList<>();
}
this.results.add(resultsItem);
return this;
}
/**
* Returns results.
* <p>
* Field description:
* Collection of reports, one per every received message.
* <p>
* The field is required.
*
* @return results
*/
@JsonProperty("results")
public List<WhatsAppWebhookInboundMessageData> getResults() {
return results;
}
/**
* Sets results.
* <p>
* Field description:
* Collection of reports, one per every received message.
* <p>
* The field is required.
*
* @param results
*/
@JsonProperty("results")
public void setResults(List<WhatsAppWebhookInboundMessageData> results) {
this.results = results;
}
/**
* Sets messageCount.
* <p>
* Field description:
* The number of messages returned in the results array.
* <p>
* The field is required.
*
* @param messageCount
* @return This {@link WhatsAppWebhookInboundMessageResult instance}.
*/
public WhatsAppWebhookInboundMessageResult messageCount(Integer messageCount) {
this.messageCount = messageCount;
return this;
}
/**
* Returns messageCount.
* <p>
* Field description:
* The number of messages returned in the results array.
* <p>
* The field is required.
*
* @return messageCount
*/
@JsonProperty("messageCount")
public Integer getMessageCount() {
return messageCount;
}
/**
* Sets messageCount.
* <p>
* Field description:
* The number of messages returned in the results array.
* <p>
* The field is required.
*
* @param messageCount
*/
@JsonProperty("messageCount")
public void setMessageCount(Integer messageCount) {
this.messageCount = messageCount;
}
/**
* Sets pendingMessageCount.
* <p>
* Field description:
* The number of messages that have not been pulled in.
* <p>
* The field is required.
*
* @param pendingMessageCount
* @return This {@link WhatsAppWebhookInboundMessageResult instance}.
*/
public WhatsAppWebhookInboundMessageResult pendingMessageCount(Integer pendingMessageCount) {
this.pendingMessageCount = pendingMessageCount;
return this;
}
/**
* Returns pendingMessageCount.
* <p>
* Field description:
* The number of messages that have not been pulled in.
* <p>
* The field is required.
*
* @return pendingMessageCount
*/
@JsonProperty("pendingMessageCount")
public Integer getPendingMessageCount() {
return pendingMessageCount;
}
/**
* Sets pendingMessageCount.
* <p>
* Field description:
* The number of messages that have not been pulled in.
* <p>
* The field is required.
*
* @param pendingMessageCount
*/
@JsonProperty("pendingMessageCount")
public void setPendingMessageCount(Integer pendingMessageCount) {
this.pendingMessageCount = pendingMessageCount;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WhatsAppWebhookInboundMessageResult whatsAppWebhookInboundMessageResult =
(WhatsAppWebhookInboundMessageResult) o;
return Objects.equals(this.results, whatsAppWebhookInboundMessageResult.results)
&& Objects.equals(this.messageCount, whatsAppWebhookInboundMessageResult.messageCount)
&& Objects.equals(this.pendingMessageCount, whatsAppWebhookInboundMessageResult.pendingMessageCount);
}
@Override
public int hashCode() {
return Objects.hash(results, messageCount, pendingMessageCount);
}
@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class WhatsAppWebhookInboundMessageResult {")
.append(newLine)
.append(" results: ")
.append(toIndentedString(results))
.append(newLine)
.append(" messageCount: ")
.append(toIndentedString(messageCount))
.append(newLine)
.append(" pendingMessageCount: ")
.append(toIndentedString(pendingMessageCount))
.append(newLine)
.append("}")
.toString();
}
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
String lineSeparator = System.lineSeparator();
String lineSeparatorFollowedByIndentation = lineSeparator + " ";
return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
}
}