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