001
002package com.commercetools.history.models.change_value;
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 * ShoppingListLineItemValue
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class ShoppingListLineItemValueImpl implements ShoppingListLineItemValue, ModelBase {
022
023    private String id;
024
025    private com.commercetools.history.models.common.LocalizedString name;
026
027    private Integer variantId;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    ShoppingListLineItemValueImpl(@JsonProperty("id") final String id,
034            @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name,
035            @JsonProperty("variantId") final Integer variantId) {
036        this.id = id;
037        this.name = name;
038        this.variantId = variantId;
039    }
040
041    /**
042     * create empty instance
043     */
044    public ShoppingListLineItemValueImpl() {
045    }
046
047    /**
048     *  <p><code>id</code> of the ShoppingListLineItem.</p>
049     */
050
051    public String getId() {
052        return this.id;
053    }
054
055    /**
056     *  <p>Name of the corresponding Product the Product Variant belongs to.</p>
057     */
058
059    public com.commercetools.history.models.common.LocalizedString getName() {
060        return this.name;
061    }
062
063    /**
064     *  <p><code>id</code> of the ProductVariant the ShoppingListLineItem refers to.</p>
065     */
066
067    public Integer getVariantId() {
068        return this.variantId;
069    }
070
071    public void setId(final String id) {
072        this.id = id;
073    }
074
075    public void setName(final com.commercetools.history.models.common.LocalizedString name) {
076        this.name = name;
077    }
078
079    public void setVariantId(final Integer variantId) {
080        this.variantId = variantId;
081    }
082
083    @Override
084    public boolean equals(Object o) {
085        if (this == o)
086            return true;
087
088        if (o == null || getClass() != o.getClass())
089            return false;
090
091        ShoppingListLineItemValueImpl that = (ShoppingListLineItemValueImpl) o;
092
093        return new EqualsBuilder().append(id, that.id)
094                .append(name, that.name)
095                .append(variantId, that.variantId)
096                .append(id, that.id)
097                .append(name, that.name)
098                .append(variantId, that.variantId)
099                .isEquals();
100    }
101
102    @Override
103    public int hashCode() {
104        return new HashCodeBuilder(17, 37).append(id).append(name).append(variantId).toHashCode();
105    }
106
107}