001
002package com.commercetools.ml.models.general_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 * GeneralCategoryRecommendationPagedQueryResponse
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class GeneralCategoryRecommendationPagedQueryResponseImpl
022        implements GeneralCategoryRecommendationPagedQueryResponse, ModelBase {
023
024    private Long count;
025
026    private Long total;
027
028    private Long offset;
029
030    private java.util.List<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation> results;
031
032    /**
033     * create instance with all properties
034     */
035    @JsonCreator
036    GeneralCategoryRecommendationPagedQueryResponseImpl(@JsonProperty("count") final Long count,
037            @JsonProperty("total") final Long total, @JsonProperty("offset") final Long offset,
038            @JsonProperty("results") final java.util.List<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation> results) {
039        this.count = count;
040        this.total = total;
041        this.offset = offset;
042        this.results = results;
043    }
044
045    /**
046     * create empty instance
047     */
048    public GeneralCategoryRecommendationPagedQueryResponseImpl() {
049    }
050
051    /**
052     *
053     */
054
055    public Long getCount() {
056        return this.count;
057    }
058
059    /**
060     *
061     */
062
063    public Long getTotal() {
064        return this.total;
065    }
066
067    /**
068     *  <p>Number of elements skipped.</p>
069     */
070
071    public Long getOffset() {
072        return this.offset;
073    }
074
075    /**
076     *
077     */
078
079    public java.util.List<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation> getResults() {
080        return this.results;
081    }
082
083    public void setCount(final Long count) {
084        this.count = count;
085    }
086
087    public void setTotal(final Long total) {
088        this.total = total;
089    }
090
091    public void setOffset(final Long offset) {
092        this.offset = offset;
093    }
094
095    public void setResults(
096            final com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation... results) {
097        this.results = new ArrayList<>(Arrays.asList(results));
098    }
099
100    public void setResults(
101            final java.util.List<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation> results) {
102        this.results = results;
103    }
104
105    @Override
106    public boolean equals(Object o) {
107        if (this == o)
108            return true;
109
110        if (o == null || getClass() != o.getClass())
111            return false;
112
113        GeneralCategoryRecommendationPagedQueryResponseImpl that = (GeneralCategoryRecommendationPagedQueryResponseImpl) o;
114
115        return new EqualsBuilder().append(count, that.count)
116                .append(total, that.total)
117                .append(offset, that.offset)
118                .append(results, that.results)
119                .isEquals();
120    }
121
122    @Override
123    public int hashCode() {
124        return new HashCodeBuilder(17, 37).append(count).append(total).append(offset).append(results).toHashCode();
125    }
126
127}