-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathInboundCallbackMessage.cs
More file actions
266 lines (243 loc) · 12.3 KB
/
Copy pathInboundCallbackMessage.cs
File metadata and controls
266 lines (243 loc) · 12.3 KB
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
/*
* Bandwidth
*
* Bandwidth's Communication APIs
*
* The version of the OpenAPI document: 1.0.0
* Contact: letstalk@bandwidth.com
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
namespace Bandwidth.Standard.Model
{
/// <summary>
/// InboundCallbackMessage
/// </summary>
[DataContract(Name = "inboundCallbackMessage")]
public partial class InboundCallbackMessage : IValidatableObject
{
/// <summary>
/// Gets or Sets Direction
/// </summary>
[DataMember(Name = "direction", IsRequired = true, EmitDefaultValue = true)]
public MessageDirectionEnum Direction { get; set; }
/// <summary>
/// Gets or Sets Priority
/// </summary>
[DataMember(Name = "priority", EmitDefaultValue = false)]
public PriorityEnum? Priority { get; set; }
/// <summary>
/// Gets or Sets Channel
/// </summary>
[DataMember(Name = "channel", EmitDefaultValue = false)]
public MultiChannelMessageChannelEnum? Channel { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="InboundCallbackMessage" /> class.
/// </summary>
[JsonConstructorAttribute]
protected InboundCallbackMessage() { }
/// <summary>
/// Initializes a new instance of the <see cref="InboundCallbackMessage" /> class.
/// </summary>
/// <param name="id">A unique identifier of the message. (required).</param>
/// <param name="owner">The Bandwidth phone number or alphanumeric identifier associated with the message. (required).</param>
/// <param name="applicationId">The ID of the Application your from number or senderId is associated with in the Bandwidth App. (required).</param>
/// <param name="time">time (required).</param>
/// <param name="segmentCount">The number of segments the user's message is broken into before sending over carrier networks. (required).</param>
/// <param name="direction">direction (required).</param>
/// <param name="to">The phone number recipients of the message. (required).</param>
/// <param name="from">The Bandwidth phone number or alphanumeric identifier the message was sent from. (required).</param>
/// <param name="text">text.</param>
/// <param name="tag">A custom string that will be included in callback events of the message. Max 1024 characters..</param>
/// <param name="media">Optional media, not applicable for sms.</param>
/// <param name="priority">priority.</param>
/// <param name="channel">channel.</param>
/// <param name="content">content.</param>
/// <param name="suggestionResponse">suggestionResponse.</param>
/// <param name="locationResponse">locationResponse.</param>
public InboundCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List<string> to = default(List<string>), string from = default(string), string text = default(string), string tag = default(string), List<string> media = default(List<string>), PriorityEnum? priority = default(PriorityEnum?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), MultiChannelMessageContent content = default(MultiChannelMessageContent), SuggestionResponse suggestionResponse = default(SuggestionResponse), LocationResponse locationResponse = default(LocationResponse))
{
// to ensure "id" is required (not null)
if (id == null)
{
throw new ArgumentNullException("id is a required property for InboundCallbackMessage and cannot be null");
}
this.Id = id;
// to ensure "owner" is required (not null)
if (owner == null)
{
throw new ArgumentNullException("owner is a required property for InboundCallbackMessage and cannot be null");
}
this.Owner = owner;
// to ensure "applicationId" is required (not null)
if (applicationId == null)
{
throw new ArgumentNullException("applicationId is a required property for InboundCallbackMessage and cannot be null");
}
this.ApplicationId = applicationId;
this.Time = time;
this.SegmentCount = segmentCount;
this.Direction = direction;
// to ensure "to" is required (not null)
if (to == null)
{
throw new ArgumentNullException("to is a required property for InboundCallbackMessage and cannot be null");
}
this.To = to;
// to ensure "from" is required (not null)
if (from == null)
{
throw new ArgumentNullException("from is a required property for InboundCallbackMessage and cannot be null");
}
this.From = from;
this.Text = text;
this.Tag = tag;
this.Media = media;
this.Priority = priority;
this.Channel = channel;
this.Content = content;
this.SuggestionResponse = suggestionResponse;
this.LocationResponse = locationResponse;
}
/// <summary>
/// A unique identifier of the message.
/// </summary>
/// <value>A unique identifier of the message.</value>
/// <example>1661365814859loidf7mcwd4qacn7</example>
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
public string Id { get; set; }
/// <summary>
/// The Bandwidth phone number or alphanumeric identifier associated with the message.
/// </summary>
/// <value>The Bandwidth phone number or alphanumeric identifier associated with the message.</value>
/// <example>+15553332222</example>
[DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)]
public string Owner { get; set; }
/// <summary>
/// The ID of the Application your from number or senderId is associated with in the Bandwidth App.
/// </summary>
/// <value>The ID of the Application your from number or senderId is associated with in the Bandwidth App.</value>
/// <example>93de2206-9669-4e07-948d-329f4b722ee2</example>
[DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)]
public string ApplicationId { get; set; }
/// <summary>
/// Gets or Sets Time
/// </summary>
/// <example>2024-12-02T20:15:57.666Z</example>
[DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
public DateTime Time { get; set; }
/// <summary>
/// The number of segments the user's message is broken into before sending over carrier networks.
/// </summary>
/// <value>The number of segments the user's message is broken into before sending over carrier networks.</value>
/// <example>1</example>
[DataMember(Name = "segmentCount", IsRequired = true, EmitDefaultValue = true)]
public int SegmentCount { get; set; }
/// <summary>
/// The phone number recipients of the message.
/// </summary>
/// <value>The phone number recipients of the message.</value>
/// <example>[+15552223333]</example>
[DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
public List<string> To { get; set; }
/// <summary>
/// The Bandwidth phone number or alphanumeric identifier the message was sent from.
/// </summary>
/// <value>The Bandwidth phone number or alphanumeric identifier the message was sent from.</value>
/// <example>+15553332222</example>
[DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)]
public string From { get; set; }
/// <summary>
/// Gets or Sets Text
/// </summary>
/// <example>Hello world</example>
[DataMember(Name = "text", EmitDefaultValue = false)]
public string Text { get; set; }
/// <summary>
/// A custom string that will be included in callback events of the message. Max 1024 characters.
/// </summary>
/// <value>A custom string that will be included in callback events of the message. Max 1024 characters.</value>
/// <example>custom string</example>
[DataMember(Name = "tag", EmitDefaultValue = false)]
public string Tag { get; set; }
/// <summary>
/// Optional media, not applicable for sms
/// </summary>
/// <value>Optional media, not applicable for sms</value>
/// <example>[https://dev.bandwidth.com/images/bandwidth-logo.png, https://dev.bandwidth.com/images/github_logo.png]</example>
[DataMember(Name = "media", EmitDefaultValue = false)]
public List<string> Media { get; set; }
/// <summary>
/// Gets or Sets Content
/// </summary>
[DataMember(Name = "content", EmitDefaultValue = false)]
public MultiChannelMessageContent Content { get; set; }
/// <summary>
/// Gets or Sets SuggestionResponse
/// </summary>
[DataMember(Name = "suggestionResponse", EmitDefaultValue = false)]
public SuggestionResponse SuggestionResponse { get; set; }
/// <summary>
/// Gets or Sets LocationResponse
/// </summary>
[DataMember(Name = "locationResponse", EmitDefaultValue = false)]
public LocationResponse LocationResponse { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class InboundCallbackMessage {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Owner: ").Append(Owner).Append("\n");
sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n");
sb.Append(" Time: ").Append(Time).Append("\n");
sb.Append(" SegmentCount: ").Append(SegmentCount).Append("\n");
sb.Append(" Direction: ").Append(Direction).Append("\n");
sb.Append(" To: ").Append(To).Append("\n");
sb.Append(" From: ").Append(From).Append("\n");
sb.Append(" Text: ").Append(Text).Append("\n");
sb.Append(" Tag: ").Append(Tag).Append("\n");
sb.Append(" Media: ").Append(Media).Append("\n");
sb.Append(" Priority: ").Append(Priority).Append("\n");
sb.Append(" Channel: ").Append(Channel).Append("\n");
sb.Append(" Content: ").Append(Content).Append("\n");
sb.Append(" SuggestionResponse: ").Append(SuggestionResponse).Append("\n");
sb.Append(" LocationResponse: ").Append(LocationResponse).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}