001
002package com.commercetools.api.models.product;
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 *  <p>Controls whether the Prices of a Product Variant are embedded into the Product or standalone.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class ProductSetPriceModeActionImpl implements ProductSetPriceModeAction, ModelBase {
022
023    private String action;
024
025    private com.commercetools.api.models.product.ProductPriceModeEnum priceMode;
026
027    /**
028     * create instance with all properties
029     */
030    @JsonCreator
031    ProductSetPriceModeActionImpl(
032            @JsonProperty("priceMode") final com.commercetools.api.models.product.ProductPriceModeEnum priceMode) {
033        this.priceMode = priceMode;
034        this.action = SET_PRICE_MODE;
035    }
036
037    /**
038     * create empty instance
039     */
040    public ProductSetPriceModeActionImpl() {
041        this.action = SET_PRICE_MODE;
042    }
043
044    /**
045     *
046     */
047
048    public String getAction() {
049        return this.action;
050    }
051
052    /**
053     *  <p>Specifies which type of Prices should be used when looking up a price for the Product.</p>
054     */
055
056    public com.commercetools.api.models.product.ProductPriceModeEnum getPriceMode() {
057        return this.priceMode;
058    }
059
060    public void setPriceMode(final com.commercetools.api.models.product.ProductPriceModeEnum priceMode) {
061        this.priceMode = priceMode;
062    }
063
064    @Override
065    public boolean equals(Object o) {
066        if (this == o)
067            return true;
068
069        if (o == null || getClass() != o.getClass())
070            return false;
071
072        ProductSetPriceModeActionImpl that = (ProductSetPriceModeActionImpl) o;
073
074        return new EqualsBuilder().append(action, that.action)
075                .append(priceMode, that.priceMode)
076                .append(action, that.action)
077                .append(priceMode, that.priceMode)
078                .isEquals();
079    }
080
081    @Override
082    public int hashCode() {
083        return new HashCodeBuilder(17, 37).append(action).append(priceMode).toHashCode();
084    }
085
086}