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 * DiscountedLineItemPriceForQuantity
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class DiscountedLineItemPriceForQuantityImpl implements DiscountedLineItemPriceForQuantity, ModelBase {
022
023    private Integer quantity;
024
025    private com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice;
026
027    /**
028     * create instance with all properties
029     */
030    @JsonCreator
031    DiscountedLineItemPriceForQuantityImpl(@JsonProperty("quantity") final Integer quantity,
032            @JsonProperty("discountedPrice") final com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice) {
033        this.quantity = quantity;
034        this.discountedPrice = discountedPrice;
035    }
036
037    /**
038     * create empty instance
039     */
040    public DiscountedLineItemPriceForQuantityImpl() {
041    }
042
043    /**
044     *
045     */
046
047    public Integer getQuantity() {
048        return this.quantity;
049    }
050
051    /**
052     *
053     */
054
055    public com.commercetools.history.models.common.DiscountedLineItemPrice getDiscountedPrice() {
056        return this.discountedPrice;
057    }
058
059    public void setQuantity(final Integer quantity) {
060        this.quantity = quantity;
061    }
062
063    public void setDiscountedPrice(
064            final com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice) {
065        this.discountedPrice = discountedPrice;
066    }
067
068    @Override
069    public boolean equals(Object o) {
070        if (this == o)
071            return true;
072
073        if (o == null || getClass() != o.getClass())
074            return false;
075
076        DiscountedLineItemPriceForQuantityImpl that = (DiscountedLineItemPriceForQuantityImpl) o;
077
078        return new EqualsBuilder().append(quantity, that.quantity)
079                .append(discountedPrice, that.discountedPrice)
080                .append(quantity, that.quantity)
081                .append(discountedPrice, that.discountedPrice)
082                .isEquals();
083    }
084
085    @Override
086    public int hashCode() {
087        return new HashCodeBuilder(17, 37).append(quantity).append(discountedPrice).toHashCode();
088    }
089
090}