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