/*
* 后台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
{
///
/// NcNewAndOldCode
///
[DataContract]
public partial class NcNewAndOldCode : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
///
/// 新编码.
/// 旧编码.
/// 分类编码.
public NcNewAndOldCode(string newCode = default(string), string oldCode = default(string), string categoryCode = default(string))
{
this.NewCode = newCode;
this.OldCode = oldCode;
this.CategoryCode = categoryCode;
}
///
/// 新编码
///
/// 新编码
[DataMember(Name="newCode", EmitDefaultValue=false)]
public string NewCode { get; set; }
///
/// 旧编码
///
/// 旧编码
[DataMember(Name="oldCode", EmitDefaultValue=false)]
public string OldCode { get; set; }
///
/// 分类编码
///
/// 分类编码
[DataMember(Name="categoryCode", EmitDefaultValue=false)]
public string CategoryCode { 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 NcNewAndOldCode {\n");
sb.Append(" NewCode: ").Append(NewCode).Append("\n");
sb.Append(" OldCode: ").Append(OldCode).Append("\n");
sb.Append(" CategoryCode: ").Append(CategoryCode).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 NcNewAndOldCode);
}
///
/// Returns true if NcNewAndOldCode instances are equal
///
/// Instance of NcNewAndOldCode to be compared
/// Boolean
public bool Equals(NcNewAndOldCode input)
{
if (input == null)
return false;
return
(
this.NewCode == input.NewCode ||
(this.NewCode != null &&
this.NewCode.Equals(input.NewCode))
) &&
(
this.OldCode == input.OldCode ||
(this.OldCode != null &&
this.OldCode.Equals(input.OldCode))
) &&
(
this.CategoryCode == input.CategoryCode ||
(this.CategoryCode != null &&
this.CategoryCode.Equals(input.CategoryCode))
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.NewCode != null)
hashCode = hashCode * 59 + this.NewCode.GetHashCode();
if (this.OldCode != null)
hashCode = hashCode * 59 + this.OldCode.GetHashCode();
if (this.CategoryCode != null)
hashCode = hashCode * 59 + this.CategoryCode.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}