| | 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 | | /// PaymentRequestDTO |
| | 30 | | /// </summary> |
| | 31 | | [DataContract(Name = "PaymentRequestDTO")] |
| | 32 | | public partial class PaymentRequestDTO : IEquatable<PaymentRequestDTO>, IValidatableObject |
| | 33 | | { |
| | 34 | | /// <summary> |
| | 35 | | /// Initializes a new instance of the <see cref="PaymentRequestDTO" /> class. |
| | 36 | | /// </summary> |
| | 37 | | [JsonConstructorAttribute] |
| 24 | 38 | | protected PaymentRequestDTO() { } |
| | 39 | | /// <summary> |
| | 40 | | /// Initializes a new instance of the <see cref="PaymentRequestDTO" /> class. |
| | 41 | | /// </summary> |
| | 42 | | /// <param name="id">id.</param> |
| | 43 | | /// <param name="expenseId">expenseId.</param> |
| | 44 | | /// <param name="fromPersonId">fromPersonId.</param> |
| | 45 | | /// <param name="toPersonId">toPersonId.</param> |
| | 46 | | /// <param name="date">date.</param> |
| | 47 | | /// <param name="amount">amount (required).</param> |
| | 48 | | /// <param name="paid">paid (required).</param> |
| 12 | 49 | | public PaymentRequestDTO(int id = default(int), int expenseId = default(int), int fromPersonId = default(int), i |
| 12 | 50 | | { |
| 12 | 51 | | this.Amount = amount; |
| 12 | 52 | | this.Paid = paid; |
| 12 | 53 | | this.Id = id; |
| 12 | 54 | | this.ExpenseId = expenseId; |
| 12 | 55 | | this.FromPersonId = fromPersonId; |
| 12 | 56 | | this.ToPersonId = toPersonId; |
| 12 | 57 | | this.Date = date; |
| 12 | 58 | | } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets or Sets Id |
| | 62 | | /// </summary> |
| | 63 | | [DataMember(Name = "id", EmitDefaultValue = false)] |
| 26 | 64 | | public int Id { get; set; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets or Sets ExpenseId |
| | 68 | | /// </summary> |
| | 69 | | [DataMember(Name = "expenseId", EmitDefaultValue = false)] |
| 26 | 70 | | public int ExpenseId { get; set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets or Sets FromPersonId |
| | 74 | | /// </summary> |
| | 75 | | [DataMember(Name = "fromPersonId", EmitDefaultValue = false)] |
| 26 | 76 | | public int FromPersonId { get; set; } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Gets or Sets ToPersonId |
| | 80 | | /// </summary> |
| | 81 | | [DataMember(Name = "toPersonId", EmitDefaultValue = false)] |
| 26 | 82 | | public int ToPersonId { get; set; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets or Sets Date |
| | 86 | | /// </summary> |
| | 87 | | [DataMember(Name = "date", EmitDefaultValue = false)] |
| 23 | 88 | | public string Date { get; set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets or Sets Amount |
| | 92 | | /// </summary> |
| | 93 | | [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] |
| 26 | 94 | | public long Amount { get; set; } |
| | 95 | |
|
| | 96 | | /// <summary> |
| | 97 | | /// Gets or Sets Paid |
| | 98 | | /// </summary> |
| | 99 | | [DataMember(Name = "paid", IsRequired = true, EmitDefaultValue = true)] |
| 20 | 100 | | public bool Paid { get; set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Returns the string presentation of the object |
| | 104 | | /// </summary> |
| | 105 | | /// <returns>String presentation of the object</returns> |
| | 106 | | public override string ToString() |
| 0 | 107 | | { |
| 0 | 108 | | StringBuilder sb = new StringBuilder(); |
| 0 | 109 | | sb.Append("class PaymentRequestDTO {\n"); |
| 0 | 110 | | sb.Append(" Id: ").Append(Id).Append("\n"); |
| 0 | 111 | | sb.Append(" ExpenseId: ").Append(ExpenseId).Append("\n"); |
| 0 | 112 | | sb.Append(" FromPersonId: ").Append(FromPersonId).Append("\n"); |
| 0 | 113 | | sb.Append(" ToPersonId: ").Append(ToPersonId).Append("\n"); |
| 0 | 114 | | sb.Append(" Date: ").Append(Date).Append("\n"); |
| 0 | 115 | | sb.Append(" Amount: ").Append(Amount).Append("\n"); |
| 0 | 116 | | sb.Append(" Paid: ").Append(Paid).Append("\n"); |
| 0 | 117 | | sb.Append("}\n"); |
| 0 | 118 | | return sb.ToString(); |
| 0 | 119 | | } |
| | 120 | |
|
| | 121 | | /// <summary> |
| | 122 | | /// Returns the JSON string presentation of the object |
| | 123 | | /// </summary> |
| | 124 | | /// <returns>JSON string presentation of the object</returns> |
| | 125 | | public virtual string ToJson() |
| 0 | 126 | | { |
| 0 | 127 | | return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 0 | 128 | | } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Returns true if objects are equal |
| | 132 | | /// </summary> |
| | 133 | | /// <param name="input">Object to be compared</param> |
| | 134 | | /// <returns>Boolean</returns> |
| | 135 | | public override bool Equals(object input) |
| 0 | 136 | | { |
| 0 | 137 | | return this.Equals(input as PaymentRequestDTO); |
| 0 | 138 | | } |
| | 139 | |
|
| | 140 | | /// <summary> |
| | 141 | | /// Returns true if PaymentRequestDTO instances are equal |
| | 142 | | /// </summary> |
| | 143 | | /// <param name="input">Instance of PaymentRequestDTO to be compared</param> |
| | 144 | | /// <returns>Boolean</returns> |
| | 145 | | public bool Equals(PaymentRequestDTO input) |
| 0 | 146 | | { |
| 0 | 147 | | if (input == null) |
| 0 | 148 | | { |
| 0 | 149 | | return false; |
| | 150 | | } |
| 0 | 151 | | return |
| 0 | 152 | | ( |
| 0 | 153 | | this.Id == input.Id || |
| 0 | 154 | | this.Id.Equals(input.Id) |
| 0 | 155 | | ) && |
| 0 | 156 | | ( |
| 0 | 157 | | this.ExpenseId == input.ExpenseId || |
| 0 | 158 | | this.ExpenseId.Equals(input.ExpenseId) |
| 0 | 159 | | ) && |
| 0 | 160 | | ( |
| 0 | 161 | | this.FromPersonId == input.FromPersonId || |
| 0 | 162 | | this.FromPersonId.Equals(input.FromPersonId) |
| 0 | 163 | | ) && |
| 0 | 164 | | ( |
| 0 | 165 | | this.ToPersonId == input.ToPersonId || |
| 0 | 166 | | this.ToPersonId.Equals(input.ToPersonId) |
| 0 | 167 | | ) && |
| 0 | 168 | | ( |
| 0 | 169 | | this.Date == input.Date || |
| 0 | 170 | | (this.Date != null && |
| 0 | 171 | | this.Date.Equals(input.Date)) |
| 0 | 172 | | ) && |
| 0 | 173 | | ( |
| 0 | 174 | | this.Amount == input.Amount || |
| 0 | 175 | | this.Amount.Equals(input.Amount) |
| 0 | 176 | | ) && |
| 0 | 177 | | ( |
| 0 | 178 | | this.Paid == input.Paid || |
| 0 | 179 | | this.Paid.Equals(input.Paid) |
| 0 | 180 | | ); |
| 0 | 181 | | } |
| | 182 | |
|
| | 183 | | /// <summary> |
| | 184 | | /// Gets the hash code |
| | 185 | | /// </summary> |
| | 186 | | /// <returns>Hash code</returns> |
| | 187 | | public override int GetHashCode() |
| 0 | 188 | | { |
| | 189 | | unchecked // Overflow is fine, just wrap |
| 0 | 190 | | { |
| 0 | 191 | | int hashCode = 41; |
| 0 | 192 | | hashCode = (hashCode * 59) + this.Id.GetHashCode(); |
| 0 | 193 | | hashCode = (hashCode * 59) + this.ExpenseId.GetHashCode(); |
| 0 | 194 | | hashCode = (hashCode * 59) + this.FromPersonId.GetHashCode(); |
| 0 | 195 | | hashCode = (hashCode * 59) + this.ToPersonId.GetHashCode(); |
| 0 | 196 | | if (this.Date != null) |
| 0 | 197 | | { |
| 0 | 198 | | hashCode = (hashCode * 59) + this.Date.GetHashCode(); |
| 0 | 199 | | } |
| 0 | 200 | | hashCode = (hashCode * 59) + this.Amount.GetHashCode(); |
| 0 | 201 | | hashCode = (hashCode * 59) + this.Paid.GetHashCode(); |
| 0 | 202 | | return hashCode; |
| | 203 | | } |
| 0 | 204 | | } |
| | 205 | |
|
| | 206 | | /// <summary> |
| | 207 | | /// To validate all properties of the instance |
| | 208 | | /// </summary> |
| | 209 | | /// <param name="validationContext">Validation context</param> |
| | 210 | | /// <returns>Validation Result</returns> |
| | 211 | | public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validation |
| 0 | 212 | | { |
| 0 | 213 | | yield break; |
| | 214 | | } |
| | 215 | | } |
| | 216 | |
|
| | 217 | | } |