-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMessageError.cs
194 lines (179 loc) · 6.93 KB
/
MessageError.cs
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
/*
* Infobip Client API Libraries OpenAPI Specification
* OpenAPI specification containing public endpoints supported in client API libraries.
*
* Contact: support@infobip.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*/
using System;
using System.Runtime.Serialization;
using System.Text;
using System.Text.Json.Serialization;
using Newtonsoft.Json;
namespace Infobip.Api.Client.Model
{
/// <summary>
/// MessageError
/// </summary>
[DataContract(Name = "MessageError")]
[JsonObject]
public class MessageError : IEquatable<MessageError>
{
/// <summary>
/// Initializes a new instance of the <see cref="MessageError" /> class.
/// </summary>
/// <param name="groupId">groupId.</param>
/// <param name="groupName">groupName.</param>
/// <param name="id">id.</param>
/// <param name="name">name.</param>
/// <param name="description">description.</param>
/// <param name="permanent">permanent.</param>
public MessageError(int groupId = default, string groupName = default, int id = default, string name = default,
string description = default, bool permanent = default)
{
GroupId = groupId;
GroupName = groupName;
Id = id;
Name = name;
Description = description;
Permanent = permanent;
}
/// <summary>
/// Gets or Sets GroupId
/// </summary>
[DataMember(Name = "groupId", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "groupId", DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonPropertyName("groupId")]
public int GroupId { get; set; }
/// <summary>
/// Gets or Sets GroupName
/// </summary>
[DataMember(Name = "groupName", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "groupName", DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonPropertyName("groupName")]
public string GroupName { get; set; }
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name = "id", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "id", DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonPropertyName("id")]
public int Id { get; set; }
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name = "name", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "name", DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// Gets or Sets Description
/// </summary>
[DataMember(Name = "description", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "description", DefaultValueHandling = DefaultValueHandling.Ignore)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// Gets or Sets Permanent
/// </summary>
[DataMember(Name = "permanent", EmitDefaultValue = true)]
[JsonProperty(PropertyName = "permanent", DefaultValueHandling = DefaultValueHandling.Include)]
[JsonPropertyName("permanent")]
public bool Permanent { get; set; }
/// <summary>
/// Returns true if MessageError instances are equal
/// </summary>
/// <param name="input">Instance of MessageError to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(MessageError input)
{
if (input == null)
return false;
return
(
GroupId == input.GroupId ||
GroupId.Equals(input.GroupId)
) &&
(
GroupName == input.GroupName ||
(GroupName != null &&
GroupName.Equals(input.GroupName))
) &&
(
Id == input.Id ||
Id.Equals(input.Id)
) &&
(
Name == input.Name ||
(Name != null &&
Name.Equals(input.Name))
) &&
(
Description == input.Description ||
(Description != null &&
Description.Equals(input.Description))
) &&
(
Permanent == input.Permanent ||
Permanent.Equals(input.Permanent)
);
}
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class MessageError {\n");
sb.Append(" GroupId: ").Append(GroupId).Append("\n");
sb.Append(" GroupName: ").Append(GroupName).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append(" Permanent: ").Append(Permanent).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 JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return Equals(input as MessageError);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
hashCode = hashCode * 59 + GroupId.GetHashCode();
if (GroupName != null)
hashCode = hashCode * 59 + GroupName.GetHashCode();
hashCode = hashCode * 59 + Id.GetHashCode();
if (Name != null)
hashCode = hashCode * 59 + Name.GetHashCode();
if (Description != null)
hashCode = hashCode * 59 + Description.GetHashCode();
hashCode = hashCode * 59 + Permanent.GetHashCode();
return hashCode;
}
}
}
}