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