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