001
002package com.commercetools.api.models.product_discount;
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 * ProductDiscountMatchQuery
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class ProductDiscountMatchQueryImpl implements ProductDiscountMatchQuery, ModelBase {
022
023    private String productId;
024
025    private Integer variantId;
026
027    private Boolean staged;
028
029    private com.commercetools.api.models.common.QueryPrice price;
030
031    /**
032     * create instance with all properties
033     */
034    @JsonCreator
035    ProductDiscountMatchQueryImpl(@JsonProperty("productId") final String productId,
036            @JsonProperty("variantId") final Integer variantId, @JsonProperty("staged") final Boolean staged,
037            @JsonProperty("price") final com.commercetools.api.models.common.QueryPrice price) {
038        this.productId = productId;
039        this.variantId = variantId;
040        this.staged = staged;
041        this.price = price;
042    }
043
044    /**
045     * create empty instance
046     */
047    public ProductDiscountMatchQueryImpl() {
048    }
049
050    /**
051     *  <p>ID of the specified Product.</p>
052     */
053
054    public String getProductId() {
055        return this.productId;
056    }
057
058    /**
059     *  <p>ID of the specified Product Variant.</p>
060     */
061
062    public Integer getVariantId() {
063        return this.variantId;
064    }
065
066    /**
067     *  <p>Controls which projected representation is applied for the query. Set to <code>true</code> for the <code>staged</code> Product Projection of the specified Product Variant, set to <code>false</code> for the <code>current</code> one.</p>
068     */
069
070    public Boolean getStaged() {
071        return this.staged;
072    }
073
074    /**
075     *  <p>Specified Price of the specified Product Variant.</p>
076     */
077
078    public com.commercetools.api.models.common.QueryPrice getPrice() {
079        return this.price;
080    }
081
082    public void setProductId(final String productId) {
083        this.productId = productId;
084    }
085
086    public void setVariantId(final Integer variantId) {
087        this.variantId = variantId;
088    }
089
090    public void setStaged(final Boolean staged) {
091        this.staged = staged;
092    }
093
094    public void setPrice(final com.commercetools.api.models.common.QueryPrice price) {
095        this.price = price;
096    }
097
098    @Override
099    public boolean equals(Object o) {
100        if (this == o)
101            return true;
102
103        if (o == null || getClass() != o.getClass())
104            return false;
105
106        ProductDiscountMatchQueryImpl that = (ProductDiscountMatchQueryImpl) o;
107
108        return new EqualsBuilder().append(productId, that.productId)
109                .append(variantId, that.variantId)
110                .append(staged, that.staged)
111                .append(price, that.price)
112                .isEquals();
113    }
114
115    @Override
116    public int hashCode() {
117        return new HashCodeBuilder(17, 37).append(productId)
118                .append(variantId)
119                .append(staged)
120                .append(price)
121                .toHashCode();
122    }
123
124}