| | 1 | | /* |
| | 2 | | * WeShare API |
| | 3 | | * |
| | 4 | | * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
| | 5 | | * |
| | 6 | | * The version of the OpenAPI document: 1.0 |
| | 7 | | * Generated by: https://github.com/openapitools/openapi-generator.git |
| | 8 | | */ |
| | 9 | |
|
| | 10 | |
|
| | 11 | | using System; |
| | 12 | | using System.Collections; |
| | 13 | | using System.Collections.Generic; |
| | 14 | | using System.Collections.ObjectModel; |
| | 15 | | using System.Linq; |
| | 16 | | using System.IO; |
| | 17 | | using System.Runtime.Serialization; |
| | 18 | | using System.Text; |
| | 19 | | using System.Text.RegularExpressions; |
| | 20 | | using Newtonsoft.Json; |
| | 21 | | using Newtonsoft.Json.Converters; |
| | 22 | | using Newtonsoft.Json.Linq; |
| | 23 | | using System.ComponentModel.DataAnnotations; |
| | 24 | | using OpenAPIDateConverter = Applications.WeShare.Swagger.Client.OpenAPIDateConverter; |
| | 25 | |
|
| | 26 | | namespace Applications.WeShare.Swagger.Model |
| | 27 | | { |
| | 28 | | /// <summary> |
| | 29 | | /// ExpenseDTO |
| | 30 | | /// </summary> |
| | 31 | | [DataContract(Name = "ExpenseDTO")] |
| | 32 | | public partial class ExpenseDTO : IEquatable<ExpenseDTO>, IValidatableObject |
| | 33 | | { |
| | 34 | | /// <summary> |
| | 35 | | /// Initializes a new instance of the <see cref="ExpenseDTO" /> class. |
| | 36 | | /// </summary> |
| | 37 | | [JsonConstructorAttribute] |
| 42 | 38 | | protected ExpenseDTO() { } |
| | 39 | | /// <summary> |
| | 40 | | /// Initializes a new instance of the <see cref="ExpenseDTO" /> class. |
| | 41 | | /// </summary> |
| | 42 | | /// <param name="expenseId">expenseId.</param> |
| | 43 | | /// <param name="personId">personId.</param> |
| | 44 | | /// <param name="date">date.</param> |
| | 45 | | /// <param name="description">description.</param> |
| | 46 | | /// <param name="amount">amount (required).</param> |
| | 47 | | /// <param name="totalPaymentsRequested">totalPaymentsRequested (required).</param> |
| | 48 | | /// <param name="totalPaymentsReceived">totalPaymentsReceived (required).</param> |
| | 49 | | /// <param name="nettAmount">nettAmount (required).</param> |
| 0 | 50 | | public ExpenseDTO(int expenseId = default(int), int personId = default(int), string date = default(string), stri |
| 0 | 51 | | { |
| 0 | 52 | | this.Amount = amount; |
| 0 | 53 | | this.TotalPaymentsRequested = totalPaymentsRequested; |
| 0 | 54 | | this.TotalPaymentsReceived = totalPaymentsReceived; |
| 0 | 55 | | this.NettAmount = nettAmount; |
| 0 | 56 | | this.ExpenseId = expenseId; |
| 0 | 57 | | this.PersonId = personId; |
| 0 | 58 | | this.Date = date; |
| 0 | 59 | | this.Description = description; |
| 0 | 60 | | } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// Gets or Sets ExpenseId |
| | 64 | | /// </summary> |
| | 65 | | [DataMember(Name = "expenseId", EmitDefaultValue = false)] |
| 16 | 66 | | public int ExpenseId { get; set; } |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// Gets or Sets PersonId |
| | 70 | | /// </summary> |
| | 71 | | [DataMember(Name = "personId", EmitDefaultValue = false)] |
| 17 | 72 | | public int PersonId { get; set; } |
| | 73 | |
|
| | 74 | | /// <summary> |
| | 75 | | /// Gets or Sets Date |
| | 76 | | /// </summary> |
| | 77 | | [DataMember(Name = "date", EmitDefaultValue = false)] |
| 17 | 78 | | public string Date { get; set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Gets or Sets Description |
| | 82 | | /// </summary> |
| | 83 | | [DataMember(Name = "description", EmitDefaultValue = false)] |
| 17 | 84 | | public string Description { get; set; } |
| | 85 | |
|
| | 86 | | /// <summary> |
| | 87 | | /// Gets or Sets Amount |
| | 88 | | /// </summary> |
| | 89 | | [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] |
| 17 | 90 | | public long Amount { get; set; } |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets or Sets TotalPaymentsRequested |
| | 94 | | /// </summary> |
| | 95 | | [DataMember(Name = "totalPaymentsRequested", IsRequired = true, EmitDefaultValue = true)] |
| 16 | 96 | | public long TotalPaymentsRequested { get; set; } |
| | 97 | |
|
| | 98 | | /// <summary> |
| | 99 | | /// Gets or Sets TotalPaymentsReceived |
| | 100 | | /// </summary> |
| | 101 | | [DataMember(Name = "totalPaymentsReceived", IsRequired = true, EmitDefaultValue = true)] |
| 16 | 102 | | public long TotalPaymentsReceived { get; set; } |
| | 103 | |
|
| | 104 | | /// <summary> |
| | 105 | | /// Gets or Sets NettAmount |
| | 106 | | /// </summary> |
| | 107 | | [DataMember(Name = "nettAmount", IsRequired = true, EmitDefaultValue = true)] |
| 16 | 108 | | public long NettAmount { get; set; } |
| | 109 | |
|
| | 110 | | /// <summary> |
| | 111 | | /// Returns the string presentation of the object |
| | 112 | | /// </summary> |
| | 113 | | /// <returns>String presentation of the object</returns> |
| | 114 | | public override string ToString() |
| 0 | 115 | | { |
| 0 | 116 | | StringBuilder sb = new StringBuilder(); |
| 0 | 117 | | sb.Append("class ExpenseDTO {\n"); |
| 0 | 118 | | sb.Append(" ExpenseId: ").Append(ExpenseId).Append("\n"); |
| 0 | 119 | | sb.Append(" PersonId: ").Append(PersonId).Append("\n"); |
| 0 | 120 | | sb.Append(" Date: ").Append(Date).Append("\n"); |
| 0 | 121 | | sb.Append(" Description: ").Append(Description).Append("\n"); |
| 0 | 122 | | sb.Append(" Amount: ").Append(Amount).Append("\n"); |
| 0 | 123 | | sb.Append(" TotalPaymentsRequested: ").Append(TotalPaymentsRequested).Append("\n"); |
| 0 | 124 | | sb.Append(" TotalPaymentsReceived: ").Append(TotalPaymentsReceived).Append("\n"); |
| 0 | 125 | | sb.Append(" NettAmount: ").Append(NettAmount).Append("\n"); |
| 0 | 126 | | sb.Append("}\n"); |
| 0 | 127 | | return sb.ToString(); |
| 0 | 128 | | } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Returns the JSON string presentation of the object |
| | 132 | | /// </summary> |
| | 133 | | /// <returns>JSON string presentation of the object</returns> |
| | 134 | | public virtual string ToJson() |
| 0 | 135 | | { |
| 0 | 136 | | return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 0 | 137 | | } |
| | 138 | |
|
| | 139 | | /// <summary> |
| | 140 | | /// Returns true if objects are equal |
| | 141 | | /// </summary> |
| | 142 | | /// <param name="input">Object to be compared</param> |
| | 143 | | /// <returns>Boolean</returns> |
| | 144 | | public override bool Equals(object input) |
| 0 | 145 | | { |
| 0 | 146 | | return this.Equals(input as ExpenseDTO); |
| 0 | 147 | | } |
| | 148 | |
|
| | 149 | | /// <summary> |
| | 150 | | /// Returns true if ExpenseDTO instances are equal |
| | 151 | | /// </summary> |
| | 152 | | /// <param name="input">Instance of ExpenseDTO to be compared</param> |
| | 153 | | /// <returns>Boolean</returns> |
| | 154 | | public bool Equals(ExpenseDTO input) |
| 0 | 155 | | { |
| 0 | 156 | | if (input == null) |
| 0 | 157 | | { |
| 0 | 158 | | return false; |
| | 159 | | } |
| 0 | 160 | | return |
| 0 | 161 | | ( |
| 0 | 162 | | this.ExpenseId == input.ExpenseId || |
| 0 | 163 | | this.ExpenseId.Equals(input.ExpenseId) |
| 0 | 164 | | ) && |
| 0 | 165 | | ( |
| 0 | 166 | | this.PersonId == input.PersonId || |
| 0 | 167 | | this.PersonId.Equals(input.PersonId) |
| 0 | 168 | | ) && |
| 0 | 169 | | ( |
| 0 | 170 | | this.Date == input.Date || |
| 0 | 171 | | (this.Date != null && |
| 0 | 172 | | this.Date.Equals(input.Date)) |
| 0 | 173 | | ) && |
| 0 | 174 | | ( |
| 0 | 175 | | this.Description == input.Description || |
| 0 | 176 | | (this.Description != null && |
| 0 | 177 | | this.Description.Equals(input.Description)) |
| 0 | 178 | | ) && |
| 0 | 179 | | ( |
| 0 | 180 | | this.Amount == input.Amount || |
| 0 | 181 | | this.Amount.Equals(input.Amount) |
| 0 | 182 | | ) && |
| 0 | 183 | | ( |
| 0 | 184 | | this.TotalPaymentsRequested == input.TotalPaymentsRequested || |
| 0 | 185 | | this.TotalPaymentsRequested.Equals(input.TotalPaymentsRequested) |
| 0 | 186 | | ) && |
| 0 | 187 | | ( |
| 0 | 188 | | this.TotalPaymentsReceived == input.TotalPaymentsReceived || |
| 0 | 189 | | this.TotalPaymentsReceived.Equals(input.TotalPaymentsReceived) |
| 0 | 190 | | ) && |
| 0 | 191 | | ( |
| 0 | 192 | | this.NettAmount == input.NettAmount || |
| 0 | 193 | | this.NettAmount.Equals(input.NettAmount) |
| 0 | 194 | | ); |
| 0 | 195 | | } |
| | 196 | |
|
| | 197 | | /// <summary> |
| | 198 | | /// Gets the hash code |
| | 199 | | /// </summary> |
| | 200 | | /// <returns>Hash code</returns> |
| | 201 | | public override int GetHashCode() |
| 0 | 202 | | { |
| | 203 | | unchecked // Overflow is fine, just wrap |
| 0 | 204 | | { |
| 0 | 205 | | int hashCode = 41; |
| 0 | 206 | | hashCode = (hashCode * 59) + this.ExpenseId.GetHashCode(); |
| 0 | 207 | | hashCode = (hashCode * 59) + this.PersonId.GetHashCode(); |
| 0 | 208 | | if (this.Date != null) |
| 0 | 209 | | { |
| 0 | 210 | | hashCode = (hashCode * 59) + this.Date.GetHashCode(); |
| 0 | 211 | | } |
| 0 | 212 | | if (this.Description != null) |
| 0 | 213 | | { |
| 0 | 214 | | hashCode = (hashCode * 59) + this.Description.GetHashCode(); |
| 0 | 215 | | } |
| 0 | 216 | | hashCode = (hashCode * 59) + this.Amount.GetHashCode(); |
| 0 | 217 | | hashCode = (hashCode * 59) + this.TotalPaymentsRequested.GetHashCode(); |
| 0 | 218 | | hashCode = (hashCode * 59) + this.TotalPaymentsReceived.GetHashCode(); |
| 0 | 219 | | hashCode = (hashCode * 59) + this.NettAmount.GetHashCode(); |
| 0 | 220 | | return hashCode; |
| | 221 | | } |
| 0 | 222 | | } |
| | 223 | |
|
| | 224 | | /// <summary> |
| | 225 | | /// To validate all properties of the instance |
| | 226 | | /// </summary> |
| | 227 | | /// <param name="validationContext">Validation context</param> |
| | 228 | | /// <returns>Validation Result</returns> |
| | 229 | | public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation |
| 0 | 230 | | { |
| 0 | 231 | | yield break; |
| | 232 | | } |
| | 233 | | } |
| | 234 | |
|
| | 235 | | } |