001 002package com.commercetools.api.models.order; 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 * OrderPagedSearchResponse 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class OrderPagedSearchResponseImpl implements OrderPagedSearchResponse, ModelBase { 022 023 private Long total; 024 025 private Long offset; 026 027 private Long limit; 028 029 private java.util.List<com.commercetools.api.models.order.Hit> hits; 030 031 /** 032 * create instance with all properties 033 */ 034 @JsonCreator 035 OrderPagedSearchResponseImpl(@JsonProperty("total") final Long total, @JsonProperty("offset") final Long offset, 036 @JsonProperty("limit") final Long limit, 037 @JsonProperty("hits") final java.util.List<com.commercetools.api.models.order.Hit> hits) { 038 this.total = total; 039 this.offset = offset; 040 this.limit = limit; 041 this.hits = hits; 042 } 043 044 /** 045 * create empty instance 046 */ 047 public OrderPagedSearchResponseImpl() { 048 } 049 050 /** 051 * <p>Total number of results matching the query.</p> 052 */ 053 054 public Long getTotal() { 055 return this.total; 056 } 057 058 /** 059 * <p>Number of elements skipped.</p> 060 */ 061 062 public Long getOffset() { 063 return this.offset; 064 } 065 066 /** 067 * <p>Number of results requested.</p> 068 */ 069 070 public Long getLimit() { 071 return this.limit; 072 } 073 074 /** 075 * <p>Actual results.</p> 076 */ 077 078 public java.util.List<com.commercetools.api.models.order.Hit> getHits() { 079 return this.hits; 080 } 081 082 public void setTotal(final Long total) { 083 this.total = total; 084 } 085 086 public void setOffset(final Long offset) { 087 this.offset = offset; 088 } 089 090 public void setLimit(final Long limit) { 091 this.limit = limit; 092 } 093 094 public void setHits(final com.commercetools.api.models.order.Hit... hits) { 095 this.hits = new ArrayList<>(Arrays.asList(hits)); 096 } 097 098 public void setHits(final java.util.List<com.commercetools.api.models.order.Hit> hits) { 099 this.hits = hits; 100 } 101 102 @Override 103 public boolean equals(Object o) { 104 if (this == o) 105 return true; 106 107 if (o == null || getClass() != o.getClass()) 108 return false; 109 110 OrderPagedSearchResponseImpl that = (OrderPagedSearchResponseImpl) o; 111 112 return new EqualsBuilder().append(total, that.total) 113 .append(offset, that.offset) 114 .append(limit, that.limit) 115 .append(hits, that.hits) 116 .append(total, that.total) 117 .append(offset, that.offset) 118 .append(limit, that.limit) 119 .append(hits, that.hits) 120 .isEquals(); 121 } 122 123 @Override 124 public int hashCode() { 125 return new HashCodeBuilder(17, 37).append(total).append(offset).append(limit).append(hits).toHashCode(); 126 } 127 128}