/*
* 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'
///
/// ProductRecommendViewModel
///
[DataContract]
public partial class ProductRecommendViewModel : IEquatable, IValidatableObject //Mark 555
{
///
/// 2. Initializes a new instance of the class.
///
[JsonConstructorAttribute]
protected ProductRecommendViewModel() { }
///
/// Not Enum: Gets or Sets ProductId
///
[DataMember(Name="ProductId", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public long? ProductId { get; set; }
///
/// Not Enum: Gets or Sets Title
///
[DataMember(Name="Title", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public string Title { get; set; }
///
/// Not Enum: Gets or Sets Company
///
[DataMember(Name="Company", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public CompanyDetailViewModel Company { get; set; }
///
/// Not Enum: Gets or Sets PicUrls
///
[DataMember(Name="PicUrls", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public List PicUrls { get; set; }
///
/// Not Enum: Gets or Sets ViewCountScore
///
[DataMember(Name="ViewCountScore", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public float? ViewCountScore { get; set; }
///
/// Not Enum: Gets or Sets StarCount
///
[DataMember(Name="StarCount", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public float? StarCount { get; private set; }
///
/// Returns the string presentation of the object
///
/// String presentation of the object
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class ProductRecommendViewModel {\n");
sb.Append(" ProductId: ").Append(ProductId).Append("\n");
sb.Append(" Title: ").Append(Title).Append("\n");
sb.Append(" Company: ").Append(Company).Append("\n");
sb.Append(" PicUrls: ").Append(PicUrls).Append("\n");
sb.Append(" ViewCountScore: ").Append(ViewCountScore).Append("\n");
sb.Append(" StarCount: ").Append(StarCount).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 ProductRecommendViewModel);
}
///
/// Returns true if ProductRecommendViewModel instances are equal
///
/// Instance of ProductRecommendViewModel to be compared
/// Boolean
public bool Equals(ProductRecommendViewModel other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.ProductId == other.ProductId ||
this.ProductId != null &&
this.ProductId.Equals(other.ProductId)
) &&
(
this.Title == other.Title ||
this.Title != null &&
this.Title.Equals(other.Title)
) &&
(
this.Company == other.Company ||
this.Company != null &&
this.Company.Equals(other.Company)
) &&
(
this.PicUrls == other.PicUrls ||
this.PicUrls != null &&
this.PicUrls.SequenceEqual(other.PicUrls)
) &&
(
this.ViewCountScore == other.ViewCountScore ||
this.ViewCountScore != null &&
this.ViewCountScore.Equals(other.ViewCountScore)
) &&
(
this.StarCount == other.StarCount ||
this.StarCount != null &&
this.StarCount.Equals(other.StarCount)
);
}
///
/// 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.ProductId != null)
hash = hash * 59 + this.ProductId.GetHashCode();
if (this.Title != null)
hash = hash * 59 + this.Title.GetHashCode();
if (this.Company != null)
hash = hash * 59 + this.Company.GetHashCode();
if (this.PicUrls != null)
hash = hash * 59 + this.PicUrls.GetHashCode();
if (this.ViewCountScore != null)
hash = hash * 59 + this.ViewCountScore.GetHashCode();
if (this.StarCount != null)
hash = hash * 59 + this.StarCount.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'
}