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