/*
* 后台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
{
///
/// 成套件商品
///
[DataContract]
public partial class NcSuiteGoodsResp : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
///
/// 成套件编码.
/// 成套件名称.
/// 价格.
/// 条形码.
/// 明细.
public NcSuiteGoodsResp(string ctjcode = default(string), string ctjname = default(string), double? price = default(double?), string htxm = default(string), List detail = default(List))
{
this.Ctjcode = ctjcode;
this.Ctjname = ctjname;
this.Price = price;
this.Htxm = htxm;
this.Detail = detail;
}
///
/// 成套件编码
///
/// 成套件编码
[DataMember(Name="ctjcode", EmitDefaultValue=false)]
public string Ctjcode { get; set; }
///
/// 成套件名称
///
/// 成套件名称
[DataMember(Name="ctjname", EmitDefaultValue=false)]
public string Ctjname { get; set; }
///
/// 价格
///
/// 价格
[DataMember(Name="price", EmitDefaultValue=false)]
public double? Price { get; set; }
///
/// 条形码
///
/// 条形码
[DataMember(Name="htxm", EmitDefaultValue=false)]
public string Htxm { get; set; }
///
/// 明细
///
/// 明细
[DataMember(Name="detail", EmitDefaultValue=false)]
public List Detail { 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 NcSuiteGoodsResp {\n");
sb.Append(" Ctjcode: ").Append(Ctjcode).Append("\n");
sb.Append(" Ctjname: ").Append(Ctjname).Append("\n");
sb.Append(" Price: ").Append(Price).Append("\n");
sb.Append(" Htxm: ").Append(Htxm).Append("\n");
sb.Append(" Detail: ").Append(Detail).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 NcSuiteGoodsResp);
}
///
/// Returns true if NcSuiteGoodsResp instances are equal
///
/// Instance of NcSuiteGoodsResp to be compared
/// Boolean
public bool Equals(NcSuiteGoodsResp input)
{
if (input == null)
return false;
return
(
this.Ctjcode == input.Ctjcode ||
(this.Ctjcode != null &&
this.Ctjcode.Equals(input.Ctjcode))
) &&
(
this.Ctjname == input.Ctjname ||
(this.Ctjname != null &&
this.Ctjname.Equals(input.Ctjname))
) &&
(
this.Price == input.Price ||
(this.Price != null &&
this.Price.Equals(input.Price))
) &&
(
this.Htxm == input.Htxm ||
(this.Htxm != null &&
this.Htxm.Equals(input.Htxm))
) &&
(
this.Detail == input.Detail ||
this.Detail != null &&
this.Detail.SequenceEqual(input.Detail)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Ctjcode != null)
hashCode = hashCode * 59 + this.Ctjcode.GetHashCode();
if (this.Ctjname != null)
hashCode = hashCode * 59 + this.Ctjname.GetHashCode();
if (this.Price != null)
hashCode = hashCode * 59 + this.Price.GetHashCode();
if (this.Htxm != null)
hashCode = hashCode * 59 + this.Htxm.GetHashCode();
if (this.Detail != null)
hashCode = hashCode * 59 + this.Detail.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}