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 * ProjectCategoryRecommendationPagedQueryResponse
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class ProjectCategoryRecommendationPagedQueryResponseImpl
022        implements ProjectCategoryRecommendationPagedQueryResponse, 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.category_recommendations.ProjectCategoryRecommendation> results;
031
032    private com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta;
033
034    /**
035     * create instance with all properties
036     */
037    @JsonCreator
038    ProjectCategoryRecommendationPagedQueryResponseImpl(@JsonProperty("count") final Long count,
039            @JsonProperty("total") final Long total, @JsonProperty("offset") final Long offset,
040            @JsonProperty("results") final java.util.List<com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation> results,
041            @JsonProperty("meta") final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta) {
042        this.count = count;
043        this.total = total;
044        this.offset = offset;
045        this.results = results;
046        this.meta = meta;
047    }
048
049    /**
050     * create empty instance
051     */
052    public ProjectCategoryRecommendationPagedQueryResponseImpl() {
053    }
054
055    /**
056     *
057     */
058
059    public Long getCount() {
060        return this.count;
061    }
062
063    /**
064     *
065     */
066
067    public Long getTotal() {
068        return this.total;
069    }
070
071    /**
072     *  <p>Number of elements skipped.</p>
073     */
074
075    public Long getOffset() {
076        return this.offset;
077    }
078
079    /**
080     *
081     */
082
083    public java.util.List<com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation> getResults() {
084        return this.results;
085    }
086
087    /**
088     *
089     */
090
091    public com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta getMeta() {
092        return this.meta;
093    }
094
095    public void setCount(final Long count) {
096        this.count = count;
097    }
098
099    public void setTotal(final Long total) {
100        this.total = total;
101    }
102
103    public void setOffset(final Long offset) {
104        this.offset = offset;
105    }
106
107    public void setResults(
108            final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation... results) {
109        this.results = new ArrayList<>(Arrays.asList(results));
110    }
111
112    public void setResults(
113            final java.util.List<com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation> results) {
114        this.results = results;
115    }
116
117    public void setMeta(
118            final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta) {
119        this.meta = meta;
120    }
121
122    @Override
123    public boolean equals(Object o) {
124        if (this == o)
125            return true;
126
127        if (o == null || getClass() != o.getClass())
128            return false;
129
130        ProjectCategoryRecommendationPagedQueryResponseImpl that = (ProjectCategoryRecommendationPagedQueryResponseImpl) o;
131
132        return new EqualsBuilder().append(count, that.count)
133                .append(total, that.total)
134                .append(offset, that.offset)
135                .append(results, that.results)
136                .append(meta, that.meta)
137                .append(count, that.count)
138                .append(total, that.total)
139                .append(offset, that.offset)
140                .append(results, that.results)
141                .append(meta, that.meta)
142                .isEquals();
143    }
144
145    @Override
146    public int hashCode() {
147        return new HashCodeBuilder(17, 37).append(count)
148                .append(total)
149                .append(offset)
150                .append(results)
151                .append(meta)
152                .toHashCode();
153    }
154
155}