001 002package com.commercetools.ml.models.category_recommendations; 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 * ProjectCategoryRecommendationMeta 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ProjectCategoryRecommendationMetaImpl implements ProjectCategoryRecommendationMeta, ModelBase { 022 023 private String productName; 024 025 private String productImageUrl; 026 027 private java.util.List<String> generalCategoryNames; 028 029 /** 030 * create instance with all properties 031 */ 032 @JsonCreator 033 ProjectCategoryRecommendationMetaImpl(@JsonProperty("productName") final String productName, 034 @JsonProperty("productImageUrl") final String productImageUrl, 035 @JsonProperty("generalCategoryNames") final java.util.List<String> generalCategoryNames) { 036 this.productName = productName; 037 this.productImageUrl = productImageUrl; 038 this.generalCategoryNames = generalCategoryNames; 039 } 040 041 /** 042 * create empty instance 043 */ 044 public ProjectCategoryRecommendationMetaImpl() { 045 } 046 047 /** 048 * <p>The product name that was used to generate recommendations.</p> 049 */ 050 051 public String getProductName() { 052 return this.productName; 053 } 054 055 /** 056 * <p>The product image that was used to generate recommendations.</p> 057 */ 058 059 public String getProductImageUrl() { 060 return this.productImageUrl; 061 } 062 063 /** 064 * <p>Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.</p> 065 */ 066 067 public java.util.List<String> getGeneralCategoryNames() { 068 return this.generalCategoryNames; 069 } 070 071 public void setProductName(final String productName) { 072 this.productName = productName; 073 } 074 075 public void setProductImageUrl(final String productImageUrl) { 076 this.productImageUrl = productImageUrl; 077 } 078 079 public void setGeneralCategoryNames(final String... generalCategoryNames) { 080 this.generalCategoryNames = new ArrayList<>(Arrays.asList(generalCategoryNames)); 081 } 082 083 public void setGeneralCategoryNames(final java.util.List<String> generalCategoryNames) { 084 this.generalCategoryNames = generalCategoryNames; 085 } 086 087 @Override 088 public boolean equals(Object o) { 089 if (this == o) 090 return true; 091 092 if (o == null || getClass() != o.getClass()) 093 return false; 094 095 ProjectCategoryRecommendationMetaImpl that = (ProjectCategoryRecommendationMetaImpl) o; 096 097 return new EqualsBuilder().append(productName, that.productName) 098 .append(productImageUrl, that.productImageUrl) 099 .append(generalCategoryNames, that.generalCategoryNames) 100 .isEquals(); 101 } 102 103 @Override 104 public int hashCode() { 105 return new HashCodeBuilder(17, 37).append(productName) 106 .append(productImageUrl) 107 .append(generalCategoryNames) 108 .toHashCode(); 109 } 110 111}