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