001 002package com.commercetools.api.models.zone; 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 Zone.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ZonePagedQueryResponseImpl implements ZonePagedQueryResponse, ModelBase { 022 023 private Long limit; 024 025 private Long offset; 026 027 private Long count; 028 029 private Long total; 030 031 private java.util.List<com.commercetools.api.models.zone.Zone> results; 032 033 /** 034 * create instance with all properties 035 */ 036 @JsonCreator 037 ZonePagedQueryResponseImpl(@JsonProperty("limit") final Long limit, @JsonProperty("offset") final Long offset, 038 @JsonProperty("count") final Long count, @JsonProperty("total") final Long total, 039 @JsonProperty("results") final java.util.List<com.commercetools.api.models.zone.Zone> results) { 040 this.limit = limit; 041 this.offset = offset; 042 this.count = count; 043 this.total = total; 044 this.results = results; 045 } 046 047 /** 048 * create empty instance 049 */ 050 public ZonePagedQueryResponseImpl() { 051 } 052 053 /** 054 * <p>Number of results requested.</p> 055 */ 056 057 public Long getLimit() { 058 return this.limit; 059 } 060 061 /** 062 * <p>Number of elements skipped.</p> 063 */ 064 065 public Long getOffset() { 066 return this.offset; 067 } 068 069 /** 070 * <p>Actual number of results returned.</p> 071 */ 072 073 public Long getCount() { 074 return this.count; 075 } 076 077 /** 078 * <p>Total number of results matching the query. This number is an estimation that is not strongly consistent. This field is returned by default. For improved performance, calculating this field can be deactivated by using the query parameter <code>withTotal=false</code>. When the results are filtered with a Query Predicate, <code>total</code> is subject to a limit.</p> 079 */ 080 081 public Long getTotal() { 082 return this.total; 083 } 084 085 /** 086 * <p>Zones matching the query.</p> 087 */ 088 089 public java.util.List<com.commercetools.api.models.zone.Zone> getResults() { 090 return this.results; 091 } 092 093 public void setLimit(final Long limit) { 094 this.limit = limit; 095 } 096 097 public void setOffset(final Long offset) { 098 this.offset = offset; 099 } 100 101 public void setCount(final Long count) { 102 this.count = count; 103 } 104 105 public void setTotal(final Long total) { 106 this.total = total; 107 } 108 109 public void setResults(final com.commercetools.api.models.zone.Zone... results) { 110 this.results = new ArrayList<>(Arrays.asList(results)); 111 } 112 113 public void setResults(final java.util.List<com.commercetools.api.models.zone.Zone> 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 ZonePagedQueryResponseImpl that = (ZonePagedQueryResponseImpl) o; 126 127 return new EqualsBuilder().append(limit, that.limit) 128 .append(offset, that.offset) 129 .append(count, that.count) 130 .append(total, that.total) 131 .append(results, that.results) 132 .isEquals(); 133 } 134 135 @Override 136 public int hashCode() { 137 return new HashCodeBuilder(17, 37).append(limit) 138 .append(offset) 139 .append(count) 140 .append(total) 141 .append(results) 142 .toHashCode(); 143 } 144 145}