-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRbmSuggestionResponse.cs
More file actions
113 lines (102 loc) · 4.23 KB
/
Copy pathRbmSuggestionResponse.cs
File metadata and controls
113 lines (102 loc) · 4.23 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
/*
* 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>
/// RbmSuggestionResponse
/// </summary>
[DataContract(Name = "rbmSuggestionResponse")]
public partial class RbmSuggestionResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RbmSuggestionResponse" /> class.
/// </summary>
/// <param name="text">The text associated with the suggestion response..</param>
/// <param name="postbackData">Base64 payload the customer receives when the reply is clicked..</param>
/// <param name="pairedMessageId">Corresponding parent message ID (MT)..</param>
public RbmSuggestionResponse(string text = default(string), byte[] postbackData = default(byte[]), string pairedMessageId = default(string))
{
this.Text = text;
this.PostbackData = postbackData;
this.PairedMessageId = pairedMessageId;
}
/// <summary>
/// The text associated with the suggestion response.
/// </summary>
/// <value>The text associated with the suggestion response.</value>
/// <example>Yes, I would like to proceed</example>
[DataMember(Name = "text", EmitDefaultValue = false)]
public string Text { get; set; }
/// <summary>
/// Base64 payload the customer receives when the reply is clicked.
/// </summary>
/// <value>Base64 payload the customer receives when the reply is clicked.</value>
/// <example>[B@50841932</example>
[DataMember(Name = "postbackData", EmitDefaultValue = false)]
public byte[] PostbackData { get; set; }
/// <summary>
/// Corresponding parent message ID (MT).
/// </summary>
/// <value>Corresponding parent message ID (MT).</value>
/// <example>1752697342534u24xerqdukke523x</example>
[DataMember(Name = "pairedMessageId", EmitDefaultValue = true)]
public string PairedMessageId { 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 RbmSuggestionResponse {\n");
sb.Append(" Text: ").Append(Text).Append("\n");
sb.Append(" PostbackData: ").Append(PostbackData).Append("\n");
sb.Append(" PairedMessageId: ").Append(PairedMessageId).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)
{
// PostbackData (byte[]) maxLength
if (this.PostbackData != null && this.PostbackData.Length > 2048)
{
yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" });
}
yield break;
}
}
}