/* * FHT.Core.API 1.0 * * ̨group.apiVersion:1.0 * * OpenAPI spec version: v1 * Contact: fht@fht360.com * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; namespace IO.Swagger.Model { #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' /// /// TestSwaggerViewModel /// [DataContract] public partial class TestSwaggerViewModel : TestSwaggerViewModelBase, IEquatable, IValidatableObject //Mark 555 { /// /// FHT.Core.CommonTypes.Gender, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null /// /// FHT.Core.CommonTypes.Gender, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [DataMember(Name="NonNullableGender", EmitDefaultValue=false)] public GenderEnum? NonNullableGender { get; set; } /// /// FHT.Core.CommonTypes.Gender, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null /// /// FHT.Core.CommonTypes.Gender, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [DataMember(Name="NullableGender", EmitDefaultValue=false)] public GenderEnum? NullableGender { get; set; } /// /// FHT.Core.CommonTypes.Gender, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null /// /// FHT.Core.CommonTypes.Gender, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [DataMember(Name="Genders", EmitDefaultValue=false)] public List Genders { get; set; } /// /// 2. Initializes a new instance of the class. /// [JsonConstructorAttribute] protected TestSwaggerViewModel() { } /// /// Not Enum: Gets or Sets NonNullableInt /// [DataMember(Name="NonNullableInt", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false} public int? NonNullableInt { get; set; } /// /// Not Enum: Gets or Sets NullableInt /// [DataMember(Name="NullableInt", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=true} public int? NullableInt { get; set; } /// /// Not Enum: Gets or Sets _String /// [DataMember(Name="String", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {} public string _String { get; set; } /// /// Not Enum: Gets or Sets Child /// [DataMember(Name="Child", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {} public TestSwaggerViewModel Child { get; set; } /// /// Not Enum: Gets or Sets Children /// [DataMember(Name="Children", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {} public List Children { get; set; } /// /// Not Enum: Gets or Sets Message /// [DataMember(Name="Message", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {} public string Message { get; set; } /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); sb.Append("class TestSwaggerViewModel {\n"); sb.Append(" NonNullableInt: ").Append(NonNullableInt).Append("\n"); sb.Append(" NullableInt: ").Append(NullableInt).Append("\n"); sb.Append(" NonNullableGender: ").Append(NonNullableGender).Append("\n"); sb.Append(" NullableGender: ").Append(NullableGender).Append("\n"); sb.Append(" _String: ").Append(_String).Append("\n"); sb.Append(" Genders: ").Append(Genders).Append("\n"); sb.Append(" Child: ").Append(Child).Append("\n"); sb.Append(" Children: ").Append(Children).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object public string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean public override bool Equals(object obj) { // credit: http://stackoverflow.com/a/10454552/677735 return this.Equals(obj as TestSwaggerViewModel); } /// /// Returns true if TestSwaggerViewModel instances are equal /// /// Instance of TestSwaggerViewModel to be compared /// Boolean public bool Equals(TestSwaggerViewModel other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) return false; return ( this.NonNullableInt == other.NonNullableInt || this.NonNullableInt != null && this.NonNullableInt.Equals(other.NonNullableInt) ) && ( this.NullableInt == other.NullableInt || this.NullableInt != null && this.NullableInt.Equals(other.NullableInt) ) && ( this.NonNullableGender == other.NonNullableGender || this.NonNullableGender != null && this.NonNullableGender.Equals(other.NonNullableGender) ) && ( this.NullableGender == other.NullableGender || this.NullableGender != null && this.NullableGender.Equals(other.NullableGender) ) && ( this._String == other._String || this._String != null && this._String.Equals(other._String) ) && ( this.Genders == other.Genders || this.Genders != null && this.Genders.SequenceEqual(other.Genders) ) && ( this.Child == other.Child || this.Child != null && this.Child.Equals(other.Child) ) && ( this.Children == other.Children || this.Children != null && this.Children.SequenceEqual(other.Children) ) && ( this.Message == other.Message || this.Message != null && this.Message.Equals(other.Message) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks etc, of course :) if (this.NonNullableInt != null) hash = hash * 59 + this.NonNullableInt.GetHashCode(); if (this.NullableInt != null) hash = hash * 59 + this.NullableInt.GetHashCode(); if (this.NonNullableGender != null) hash = hash * 59 + this.NonNullableGender.GetHashCode(); if (this.NullableGender != null) hash = hash * 59 + this.NullableGender.GetHashCode(); if (this._String != null) hash = hash * 59 + this._String.GetHashCode(); if (this.Genders != null) hash = hash * 59 + this.Genders.GetHashCode(); if (this.Child != null) hash = hash * 59 + this.Child.GetHashCode(); if (this.Children != null) hash = hash * 59 + this.Children.GetHashCode(); if (this.Message != null) hash = hash * 59 + this.Message.GetHashCode(); return hash; } } public IEnumerable Validate(ValidationContext validationContext) { yield break; } } #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' }