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