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