001 002package com.commercetools.ml.models.similar_products; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * <p>Specify which ProductData attributes to use for estimating similarity and how to weigh them. An attribute's weight can be any whole positive integer, starting with 0. The larger the integer, the higher its weight.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class SimilarityMeasuresImpl implements SimilarityMeasures, ModelBase { 022 023 private Long name; 024 025 private Long description; 026 027 private Long attribute; 028 029 private Long variantCount; 030 031 private Long price; 032 033 @JsonCreator 034 SimilarityMeasuresImpl(@JsonProperty("name") final Long name, @JsonProperty("description") final Long description, 035 @JsonProperty("attribute") final Long attribute, @JsonProperty("variantCount") final Long variantCount, 036 @JsonProperty("price") final Long price) { 037 this.name = name; 038 this.description = description; 039 this.attribute = attribute; 040 this.variantCount = variantCount; 041 this.price = price; 042 } 043 044 public SimilarityMeasuresImpl() { 045 } 046 047 /** 048 * <p>Importance of the <code>name</code> attribute in overall similarity.</p> 049 */ 050 051 public Long getName() { 052 return this.name; 053 } 054 055 /** 056 * <p>Importance of the <code>description</code> attribute in overall similarity.</p> 057 */ 058 059 public Long getDescription() { 060 return this.description; 061 } 062 063 /** 064 * <p>Importance of the <code>description</code> attribute in overall similarity.</p> 065 */ 066 067 public Long getAttribute() { 068 return this.attribute; 069 } 070 071 /** 072 * <p>Importance of the number of product variants in overall similarity.</p> 073 */ 074 075 public Long getVariantCount() { 076 return this.variantCount; 077 } 078 079 /** 080 * <p>Importance of the <code>price</code> attribute in overall similarity.</p> 081 */ 082 083 public Long getPrice() { 084 return this.price; 085 } 086 087 public void setName(final Long name) { 088 this.name = name; 089 } 090 091 public void setDescription(final Long description) { 092 this.description = description; 093 } 094 095 public void setAttribute(final Long attribute) { 096 this.attribute = attribute; 097 } 098 099 public void setVariantCount(final Long variantCount) { 100 this.variantCount = variantCount; 101 } 102 103 public void setPrice(final Long price) { 104 this.price = price; 105 } 106 107 @Override 108 public boolean equals(Object o) { 109 if (this == o) 110 return true; 111 112 if (o == null || getClass() != o.getClass()) 113 return false; 114 115 SimilarityMeasuresImpl that = (SimilarityMeasuresImpl) o; 116 117 return new EqualsBuilder().append(name, that.name) 118 .append(description, that.description) 119 .append(attribute, that.attribute) 120 .append(variantCount, that.variantCount) 121 .append(price, that.price) 122 .isEquals(); 123 } 124 125 @Override 126 public int hashCode() { 127 return new HashCodeBuilder(17, 37).append(name) 128 .append(description) 129 .append(attribute) 130 .append(variantCount) 131 .append(price) 132 .toHashCode(); 133 } 134 135}