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