MeiSaiSiXieTongApi/IO.Swagger/Model/NcNewAndOldCode.cs

160 lines
5.3 KiB
C#
Raw Normal View History

2025-04-24 18:31:27 +08:00
/*
* 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
{
/// <summary>
/// NcNewAndOldCode
/// </summary>
[DataContract]
public partial class NcNewAndOldCode : IEquatable<NcNewAndOldCode>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="NcNewAndOldCode" /> class.
/// </summary>
/// <param name="newCode">新编码.</param>
/// <param name="oldCode">旧编码.</param>
/// <param name="categoryCode">分类编码.</param>
public NcNewAndOldCode(string newCode = default(string), string oldCode = default(string), string categoryCode = default(string))
{
this.NewCode = newCode;
this.OldCode = oldCode;
this.CategoryCode = categoryCode;
}
/// <summary>
/// 新编码
/// </summary>
/// <value>新编码</value>
[DataMember(Name="newCode", EmitDefaultValue=false)]
public string NewCode { get; set; }
/// <summary>
/// 旧编码
/// </summary>
/// <value>旧编码</value>
[DataMember(Name="oldCode", EmitDefaultValue=false)]
public string OldCode { get; set; }
/// <summary>
/// 分类编码
/// </summary>
/// <value>分类编码</value>
[DataMember(Name="categoryCode", EmitDefaultValue=false)]
public string CategoryCode { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as NcNewAndOldCode);
}
/// <summary>
/// Returns true if NcNewAndOldCode instances are equal
/// </summary>
/// <param name="input">Instance of NcNewAndOldCode to be compared</param>
/// <returns>Boolean</returns>
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))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
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;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}