/
model_sms_inbound_message.go
446 lines (381 loc) · 11.6 KB
/
model_sms_inbound_message.go
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
/*
* Infobip Client API Libraries OpenAPI Specification
*
* OpenAPI specification containing public endpoints supported in client API libraries.
*
* Contact: support@infobip.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package infobip
import (
"encoding/json"
)
// SmsInboundMessage struct for SmsInboundMessage
type SmsInboundMessage struct {
// Custom callback data sent over the notifyUrl.
CallbackData *string `json:"callbackData,omitempty"`
// Content of the message without a keyword (if a keyword was sent).
CleanText *string `json:"cleanText,omitempty"`
// Sender ID that can be alphanumeric or numeric.
From *string `json:"from,omitempty"`
// Keyword extracted from the message content.
Keyword *string `json:"keyword,omitempty"`
// Unique message ID.
MessageId *string `json:"messageId,omitempty"`
Price *SmsPrice `json:"price,omitempty"`
// Indicates when the Infobip platform received the message. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.
ReceivedAt *Time `json:"receivedAt,omitempty"`
// The number of characters within a message
SmsCount *int32 `json:"smsCount,omitempty"`
// Full content of the message.
Text *string `json:"text,omitempty"`
// The destination address of the message.
To *string `json:"to,omitempty"`
}
// NewSmsInboundMessage instantiates a new SmsInboundMessage object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewSmsInboundMessage() *SmsInboundMessage {
this := SmsInboundMessage{}
return &this
}
// NewSmsInboundMessageWithDefaults instantiates a new SmsInboundMessage object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewSmsInboundMessageWithDefaults() *SmsInboundMessage {
this := SmsInboundMessage{}
return &this
}
// GetCallbackData returns the CallbackData field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetCallbackData() string {
if o == nil || o.CallbackData == nil {
var ret string
return ret
}
return *o.CallbackData
}
// GetCallbackDataOk returns a tuple with the CallbackData field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetCallbackDataOk() (*string, bool) {
if o == nil || o.CallbackData == nil {
return nil, false
}
return o.CallbackData, true
}
// HasCallbackData returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasCallbackData() bool {
if o != nil && o.CallbackData != nil {
return true
}
return false
}
// SetCallbackData gets a reference to the given string and assigns it to the CallbackData field.
func (o *SmsInboundMessage) SetCallbackData(v string) {
o.CallbackData = &v
}
// GetCleanText returns the CleanText field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetCleanText() string {
if o == nil || o.CleanText == nil {
var ret string
return ret
}
return *o.CleanText
}
// GetCleanTextOk returns a tuple with the CleanText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetCleanTextOk() (*string, bool) {
if o == nil || o.CleanText == nil {
return nil, false
}
return o.CleanText, true
}
// HasCleanText returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasCleanText() bool {
if o != nil && o.CleanText != nil {
return true
}
return false
}
// SetCleanText gets a reference to the given string and assigns it to the CleanText field.
func (o *SmsInboundMessage) SetCleanText(v string) {
o.CleanText = &v
}
// GetFrom returns the From field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetFrom() string {
if o == nil || o.From == nil {
var ret string
return ret
}
return *o.From
}
// GetFromOk returns a tuple with the From field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetFromOk() (*string, bool) {
if o == nil || o.From == nil {
return nil, false
}
return o.From, true
}
// HasFrom returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasFrom() bool {
if o != nil && o.From != nil {
return true
}
return false
}
// SetFrom gets a reference to the given string and assigns it to the From field.
func (o *SmsInboundMessage) SetFrom(v string) {
o.From = &v
}
// GetKeyword returns the Keyword field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetKeyword() string {
if o == nil || o.Keyword == nil {
var ret string
return ret
}
return *o.Keyword
}
// GetKeywordOk returns a tuple with the Keyword field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetKeywordOk() (*string, bool) {
if o == nil || o.Keyword == nil {
return nil, false
}
return o.Keyword, true
}
// HasKeyword returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasKeyword() bool {
if o != nil && o.Keyword != nil {
return true
}
return false
}
// SetKeyword gets a reference to the given string and assigns it to the Keyword field.
func (o *SmsInboundMessage) SetKeyword(v string) {
o.Keyword = &v
}
// GetMessageId returns the MessageId field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetMessageId() string {
if o == nil || o.MessageId == nil {
var ret string
return ret
}
return *o.MessageId
}
// GetMessageIdOk returns a tuple with the MessageId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetMessageIdOk() (*string, bool) {
if o == nil || o.MessageId == nil {
return nil, false
}
return o.MessageId, true
}
// HasMessageId returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasMessageId() bool {
if o != nil && o.MessageId != nil {
return true
}
return false
}
// SetMessageId gets a reference to the given string and assigns it to the MessageId field.
func (o *SmsInboundMessage) SetMessageId(v string) {
o.MessageId = &v
}
// GetPrice returns the Price field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetPrice() SmsPrice {
if o == nil || o.Price == nil {
var ret SmsPrice
return ret
}
return *o.Price
}
// GetPriceOk returns a tuple with the Price field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetPriceOk() (*SmsPrice, bool) {
if o == nil || o.Price == nil {
return nil, false
}
return o.Price, true
}
// HasPrice returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasPrice() bool {
if o != nil && o.Price != nil {
return true
}
return false
}
// SetPrice gets a reference to the given SmsPrice and assigns it to the Price field.
func (o *SmsInboundMessage) SetPrice(v SmsPrice) {
o.Price = &v
}
// GetReceivedAt returns the ReceivedAt field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetReceivedAt() Time {
if o == nil || o.ReceivedAt == nil {
var ret Time
return ret
}
return *o.ReceivedAt
}
// GetReceivedAtOk returns a tuple with the ReceivedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetReceivedAtOk() (*Time, bool) {
if o == nil || o.ReceivedAt == nil {
return nil, false
}
return o.ReceivedAt, true
}
// HasReceivedAt returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasReceivedAt() bool {
if o != nil && o.ReceivedAt != nil {
return true
}
return false
}
// SetReceivedAt gets a reference to the given Time and assigns it to the ReceivedAt field.
func (o *SmsInboundMessage) SetReceivedAt(v Time) {
o.ReceivedAt = &v
}
// GetSmsCount returns the SmsCount field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetSmsCount() int32 {
if o == nil || o.SmsCount == nil {
var ret int32
return ret
}
return *o.SmsCount
}
// GetSmsCountOk returns a tuple with the SmsCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetSmsCountOk() (*int32, bool) {
if o == nil || o.SmsCount == nil {
return nil, false
}
return o.SmsCount, true
}
// HasSmsCount returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasSmsCount() bool {
if o != nil && o.SmsCount != nil {
return true
}
return false
}
// SetSmsCount gets a reference to the given int32 and assigns it to the SmsCount field.
func (o *SmsInboundMessage) SetSmsCount(v int32) {
o.SmsCount = &v
}
// GetText returns the Text field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetText() string {
if o == nil || o.Text == nil {
var ret string
return ret
}
return *o.Text
}
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetTextOk() (*string, bool) {
if o == nil || o.Text == nil {
return nil, false
}
return o.Text, true
}
// HasText returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasText() bool {
if o != nil && o.Text != nil {
return true
}
return false
}
// SetText gets a reference to the given string and assigns it to the Text field.
func (o *SmsInboundMessage) SetText(v string) {
o.Text = &v
}
// GetTo returns the To field value if set, zero value otherwise.
func (o *SmsInboundMessage) GetTo() string {
if o == nil || o.To == nil {
var ret string
return ret
}
return *o.To
}
// GetToOk returns a tuple with the To field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SmsInboundMessage) GetToOk() (*string, bool) {
if o == nil || o.To == nil {
return nil, false
}
return o.To, true
}
// HasTo returns a boolean if a field has been set.
func (o *SmsInboundMessage) HasTo() bool {
if o != nil && o.To != nil {
return true
}
return false
}
// SetTo gets a reference to the given string and assigns it to the To field.
func (o *SmsInboundMessage) SetTo(v string) {
o.To = &v
}
func (o SmsInboundMessage) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.CallbackData != nil {
toSerialize["callbackData"] = o.CallbackData
}
if o.CleanText != nil {
toSerialize["cleanText"] = o.CleanText
}
if o.From != nil {
toSerialize["from"] = o.From
}
if o.Keyword != nil {
toSerialize["keyword"] = o.Keyword
}
if o.MessageId != nil {
toSerialize["messageId"] = o.MessageId
}
if o.Price != nil {
toSerialize["price"] = o.Price
}
if o.ReceivedAt != nil {
toSerialize["receivedAt"] = o.ReceivedAt
}
if o.SmsCount != nil {
toSerialize["smsCount"] = o.SmsCount
}
if o.Text != nil {
toSerialize["text"] = o.Text
}
if o.To != nil {
toSerialize["to"] = o.To
}
return json.Marshal(toSerialize)
}
type NullableSmsInboundMessage struct {
value *SmsInboundMessage
isSet bool
}
func (v NullableSmsInboundMessage) Get() *SmsInboundMessage {
return v.value
}
func (v *NullableSmsInboundMessage) Set(val *SmsInboundMessage) {
v.value = val
v.isSet = true
}
func (v NullableSmsInboundMessage) IsSet() bool {
return v.isSet
}
func (v *NullableSmsInboundMessage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSmsInboundMessage(val *SmsInboundMessage) *NullableSmsInboundMessage {
return &NullableSmsInboundMessage{value: val, isSet: true}
}
func (v NullableSmsInboundMessage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSmsInboundMessage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}