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