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    @JsonCreator
030    ProjectCategoryRecommendationMetaImpl(@JsonProperty("productName") final String productName,
031            @JsonProperty("productImageUrl") final String productImageUrl,
032            @JsonProperty("generalCategoryNames") final java.util.List<String> generalCategoryNames) {
033        this.productName = productName;
034        this.productImageUrl = productImageUrl;
035        this.generalCategoryNames = generalCategoryNames;
036    }
037
038    public ProjectCategoryRecommendationMetaImpl() {
039    }
040
041    /**
042     *  <p>The product name that was used to generate recommendations.</p>
043     */
044
045    public String getProductName() {
046        return this.productName;
047    }
048
049    /**
050     *  <p>The product image that was used to generate recommendations.</p>
051     */
052
053    public String getProductImageUrl() {
054        return this.productImageUrl;
055    }
056
057    /**
058     *  <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>
059     */
060
061    public java.util.List<String> getGeneralCategoryNames() {
062        return this.generalCategoryNames;
063    }
064
065    public void setProductName(final String productName) {
066        this.productName = productName;
067    }
068
069    public void setProductImageUrl(final String productImageUrl) {
070        this.productImageUrl = productImageUrl;
071    }
072
073    public void setGeneralCategoryNames(final String... generalCategoryNames) {
074        this.generalCategoryNames = new ArrayList<>(Arrays.asList(generalCategoryNames));
075    }
076
077    public void setGeneralCategoryNames(final java.util.List<String> generalCategoryNames) {
078        this.generalCategoryNames = generalCategoryNames;
079    }
080
081    @Override
082    public boolean equals(Object o) {
083        if (this == o)
084            return true;
085
086        if (o == null || getClass() != o.getClass())
087            return false;
088
089        ProjectCategoryRecommendationMetaImpl that = (ProjectCategoryRecommendationMetaImpl) o;
090
091        return new EqualsBuilder().append(productName, that.productName)
092                .append(productImageUrl, that.productImageUrl)
093                .append(generalCategoryNames, that.generalCategoryNames)
094                .isEquals();
095    }
096
097    @Override
098    public int hashCode() {
099        return new HashCodeBuilder(17, 37).append(productName)
100                .append(productImageUrl)
101                .append(generalCategoryNames)
102                .toHashCode();
103    }
104
105}