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 * LineItem 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class LineItemImpl implements LineItem, ModelBase { 022 023 private String addedAt; 024 025 private com.commercetools.history.models.common.CustomFields custom; 026 027 private String id; 028 029 private com.commercetools.history.models.common.LocalizedString name; 030 031 private String productId; 032 033 private com.commercetools.history.models.common.LocalizedString productSlug; 034 035 private com.commercetools.history.models.common.Reference productType; 036 037 private Integer quantity; 038 039 private com.commercetools.history.models.common.Variant variant; 040 041 private Integer variantId; 042 043 /** 044 * create instance with all properties 045 */ 046 @JsonCreator 047 LineItemImpl(@JsonProperty("addedAt") final String addedAt, 048 @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, 049 @JsonProperty("id") final String id, 050 @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, 051 @JsonProperty("productId") final String productId, 052 @JsonProperty("productSlug") final com.commercetools.history.models.common.LocalizedString productSlug, 053 @JsonProperty("productType") final com.commercetools.history.models.common.Reference productType, 054 @JsonProperty("quantity") final Integer quantity, 055 @JsonProperty("variant") final com.commercetools.history.models.common.Variant variant, 056 @JsonProperty("variantId") final Integer variantId) { 057 this.addedAt = addedAt; 058 this.custom = custom; 059 this.id = id; 060 this.name = name; 061 this.productId = productId; 062 this.productSlug = productSlug; 063 this.productType = productType; 064 this.quantity = quantity; 065 this.variant = variant; 066 this.variantId = variantId; 067 } 068 069 /** 070 * create empty instance 071 */ 072 public LineItemImpl() { 073 } 074 075 /** 076 * 077 */ 078 079 public String getAddedAt() { 080 return this.addedAt; 081 } 082 083 /** 084 * 085 */ 086 087 public com.commercetools.history.models.common.CustomFields getCustom() { 088 return this.custom; 089 } 090 091 /** 092 * 093 */ 094 095 public String getId() { 096 return this.id; 097 } 098 099 /** 100 * 101 */ 102 103 public com.commercetools.history.models.common.LocalizedString getName() { 104 return this.name; 105 } 106 107 /** 108 * 109 */ 110 111 public String getProductId() { 112 return this.productId; 113 } 114 115 /** 116 * 117 */ 118 119 public com.commercetools.history.models.common.LocalizedString getProductSlug() { 120 return this.productSlug; 121 } 122 123 /** 124 * 125 */ 126 127 public com.commercetools.history.models.common.Reference getProductType() { 128 return this.productType; 129 } 130 131 /** 132 * 133 */ 134 135 public Integer getQuantity() { 136 return this.quantity; 137 } 138 139 /** 140 * 141 */ 142 143 public com.commercetools.history.models.common.Variant getVariant() { 144 return this.variant; 145 } 146 147 /** 148 * 149 */ 150 151 public Integer getVariantId() { 152 return this.variantId; 153 } 154 155 public void setAddedAt(final String addedAt) { 156 this.addedAt = addedAt; 157 } 158 159 public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { 160 this.custom = custom; 161 } 162 163 public void setId(final String id) { 164 this.id = id; 165 } 166 167 public void setName(final com.commercetools.history.models.common.LocalizedString name) { 168 this.name = name; 169 } 170 171 public void setProductId(final String productId) { 172 this.productId = productId; 173 } 174 175 public void setProductSlug(final com.commercetools.history.models.common.LocalizedString productSlug) { 176 this.productSlug = productSlug; 177 } 178 179 public void setProductType(final com.commercetools.history.models.common.Reference productType) { 180 this.productType = productType; 181 } 182 183 public void setQuantity(final Integer quantity) { 184 this.quantity = quantity; 185 } 186 187 public void setVariant(final com.commercetools.history.models.common.Variant variant) { 188 this.variant = variant; 189 } 190 191 public void setVariantId(final Integer variantId) { 192 this.variantId = variantId; 193 } 194 195 @Override 196 public boolean equals(Object o) { 197 if (this == o) 198 return true; 199 200 if (o == null || getClass() != o.getClass()) 201 return false; 202 203 LineItemImpl that = (LineItemImpl) o; 204 205 return new EqualsBuilder().append(addedAt, that.addedAt) 206 .append(custom, that.custom) 207 .append(id, that.id) 208 .append(name, that.name) 209 .append(productId, that.productId) 210 .append(productSlug, that.productSlug) 211 .append(productType, that.productType) 212 .append(quantity, that.quantity) 213 .append(variant, that.variant) 214 .append(variantId, that.variantId) 215 .append(addedAt, that.addedAt) 216 .append(custom, that.custom) 217 .append(id, that.id) 218 .append(name, that.name) 219 .append(productId, that.productId) 220 .append(productSlug, that.productSlug) 221 .append(productType, that.productType) 222 .append(quantity, that.quantity) 223 .append(variant, that.variant) 224 .append(variantId, that.variantId) 225 .isEquals(); 226 } 227 228 @Override 229 public int hashCode() { 230 return new HashCodeBuilder(17, 37).append(addedAt) 231 .append(custom) 232 .append(id) 233 .append(name) 234 .append(productId) 235 .append(productSlug) 236 .append(productType) 237 .append(quantity) 238 .append(variant) 239 .append(variantId) 240 .toHashCode(); 241 } 242 243}