/* * 后台API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: Admin * * 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; using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; namespace IO.Swagger.Model { /// /// GoodsSearchRequest /// [DataContract] public partial class GoodsSearchRequest : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// /// 款号. /// 编码. /// 商品名. public GoodsSearchRequest(string kh = default(string), string code = default(string), string name = default(string)) { this.Kh = kh; this.Code = code; this.Name = name; } /// /// 款号 /// /// 款号 [DataMember(Name="kh", EmitDefaultValue=false)] public string Kh { get; set; } /// /// 编码 /// /// 编码 [DataMember(Name="code", EmitDefaultValue=false)] public string Code { get; set; } /// /// 商品名 /// /// 商品名 [DataMember(Name="name", EmitDefaultValue=false)] public string Name { 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 GoodsSearchRequest {\n"); sb.Append(" Kh: ").Append(Kh).Append("\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object public virtual string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean public override bool Equals(object input) { return this.Equals(input as GoodsSearchRequest); } /// /// Returns true if GoodsSearchRequest instances are equal /// /// Instance of GoodsSearchRequest to be compared /// Boolean public bool Equals(GoodsSearchRequest input) { if (input == null) return false; return ( this.Kh == input.Kh || (this.Kh != null && this.Kh.Equals(input.Kh)) ) && ( this.Code == input.Code || (this.Code != null && this.Code.Equals(input.Code)) ) && ( this.Name == input.Name || (this.Name != null && this.Name.Equals(input.Name)) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (this.Kh != null) hashCode = hashCode * 59 + this.Kh.GetHashCode(); if (this.Code != null) hashCode = hashCode * 59 + this.Code.GetHashCode(); if (this.Name != null) hashCode = hashCode * 59 + this.Name.GetHashCode(); return hashCode; } } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } } }