001 002package com.commercetools.history.models.common; 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 * ReturnItem 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ReturnItemImpl implements ReturnItem, ModelBase { 022 023 private String id; 024 025 private Integer quantity; 026 027 private String type; 028 029 private String comment; 030 031 private com.commercetools.history.models.common.ReturnShipmentState shipmentState; 032 033 private com.commercetools.history.models.common.ReturnPaymentState paymentState; 034 035 private String lastModifiedAt; 036 037 private String createdAt; 038 039 /** 040 * create instance with all properties 041 */ 042 @JsonCreator 043 ReturnItemImpl(@JsonProperty("id") final String id, @JsonProperty("quantity") final Integer quantity, 044 @JsonProperty("type") final String type, @JsonProperty("comment") final String comment, 045 @JsonProperty("shipmentState") final com.commercetools.history.models.common.ReturnShipmentState shipmentState, 046 @JsonProperty("paymentState") final com.commercetools.history.models.common.ReturnPaymentState paymentState, 047 @JsonProperty("lastModifiedAt") final String lastModifiedAt, 048 @JsonProperty("createdAt") final String createdAt) { 049 this.id = id; 050 this.quantity = quantity; 051 this.type = type; 052 this.comment = comment; 053 this.shipmentState = shipmentState; 054 this.paymentState = paymentState; 055 this.lastModifiedAt = lastModifiedAt; 056 this.createdAt = createdAt; 057 } 058 059 /** 060 * create empty instance 061 */ 062 public ReturnItemImpl() { 063 } 064 065 /** 066 * 067 */ 068 069 public String getId() { 070 return this.id; 071 } 072 073 /** 074 * 075 */ 076 077 public Integer getQuantity() { 078 return this.quantity; 079 } 080 081 /** 082 * 083 */ 084 085 public String getType() { 086 return this.type; 087 } 088 089 /** 090 * 091 */ 092 093 public String getComment() { 094 return this.comment; 095 } 096 097 /** 098 * 099 */ 100 101 public com.commercetools.history.models.common.ReturnShipmentState getShipmentState() { 102 return this.shipmentState; 103 } 104 105 /** 106 * 107 */ 108 109 public com.commercetools.history.models.common.ReturnPaymentState getPaymentState() { 110 return this.paymentState; 111 } 112 113 /** 114 * 115 */ 116 117 public String getLastModifiedAt() { 118 return this.lastModifiedAt; 119 } 120 121 /** 122 * 123 */ 124 125 public String getCreatedAt() { 126 return this.createdAt; 127 } 128 129 public void setId(final String id) { 130 this.id = id; 131 } 132 133 public void setQuantity(final Integer quantity) { 134 this.quantity = quantity; 135 } 136 137 public void setType(final String type) { 138 this.type = type; 139 } 140 141 public void setComment(final String comment) { 142 this.comment = comment; 143 } 144 145 public void setShipmentState(final com.commercetools.history.models.common.ReturnShipmentState shipmentState) { 146 this.shipmentState = shipmentState; 147 } 148 149 public void setPaymentState(final com.commercetools.history.models.common.ReturnPaymentState paymentState) { 150 this.paymentState = paymentState; 151 } 152 153 public void setLastModifiedAt(final String lastModifiedAt) { 154 this.lastModifiedAt = lastModifiedAt; 155 } 156 157 public void setCreatedAt(final String createdAt) { 158 this.createdAt = createdAt; 159 } 160 161 @Override 162 public boolean equals(Object o) { 163 if (this == o) 164 return true; 165 166 if (o == null || getClass() != o.getClass()) 167 return false; 168 169 ReturnItemImpl that = (ReturnItemImpl) o; 170 171 return new EqualsBuilder().append(id, that.id) 172 .append(quantity, that.quantity) 173 .append(type, that.type) 174 .append(comment, that.comment) 175 .append(shipmentState, that.shipmentState) 176 .append(paymentState, that.paymentState) 177 .append(lastModifiedAt, that.lastModifiedAt) 178 .append(createdAt, that.createdAt) 179 .append(id, that.id) 180 .append(quantity, that.quantity) 181 .append(type, that.type) 182 .append(comment, that.comment) 183 .append(shipmentState, that.shipmentState) 184 .append(paymentState, that.paymentState) 185 .append(lastModifiedAt, that.lastModifiedAt) 186 .append(createdAt, that.createdAt) 187 .isEquals(); 188 } 189 190 @Override 191 public int hashCode() { 192 return new HashCodeBuilder(17, 37).append(id) 193 .append(quantity) 194 .append(type) 195 .append(comment) 196 .append(shipmentState) 197 .append(paymentState) 198 .append(lastModifiedAt) 199 .append(createdAt) 200 .toHashCode(); 201 } 202 203}