001
002package com.commercetools.api.models.order_edit;
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 * StagedOrderAddShoppingListAction
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class StagedOrderAddShoppingListActionImpl implements StagedOrderAddShoppingListAction, ModelBase {
022
023    private String action;
024
025    private com.commercetools.api.models.shopping_list.ShoppingListResourceIdentifier shoppingList;
026
027    private com.commercetools.api.models.channel.ChannelResourceIdentifier supplyChannel;
028
029    private com.commercetools.api.models.channel.ChannelResourceIdentifier distributionChannel;
030
031    /**
032     * create instance with all properties
033     */
034    @JsonCreator
035    StagedOrderAddShoppingListActionImpl(
036            @JsonProperty("shoppingList") final com.commercetools.api.models.shopping_list.ShoppingListResourceIdentifier shoppingList,
037            @JsonProperty("supplyChannel") final com.commercetools.api.models.channel.ChannelResourceIdentifier supplyChannel,
038            @JsonProperty("distributionChannel") final com.commercetools.api.models.channel.ChannelResourceIdentifier distributionChannel) {
039        this.shoppingList = shoppingList;
040        this.supplyChannel = supplyChannel;
041        this.distributionChannel = distributionChannel;
042        this.action = ADD_SHOPPING_LIST;
043    }
044
045    /**
046     * create empty instance
047     */
048    public StagedOrderAddShoppingListActionImpl() {
049        this.action = ADD_SHOPPING_LIST;
050    }
051
052    /**
053     *
054     */
055
056    public String getAction() {
057        return this.action;
058    }
059
060    /**
061     *  <p>ResourceIdentifier to a ShoppingList.</p>
062     */
063
064    public com.commercetools.api.models.shopping_list.ShoppingListResourceIdentifier getShoppingList() {
065        return this.shoppingList;
066    }
067
068    /**
069     *  <p>ResourceIdentifier to a Channel.</p>
070     */
071
072    public com.commercetools.api.models.channel.ChannelResourceIdentifier getSupplyChannel() {
073        return this.supplyChannel;
074    }
075
076    /**
077     *  <p>ResourceIdentifier to a Channel.</p>
078     */
079
080    public com.commercetools.api.models.channel.ChannelResourceIdentifier getDistributionChannel() {
081        return this.distributionChannel;
082    }
083
084    public void setShoppingList(
085            final com.commercetools.api.models.shopping_list.ShoppingListResourceIdentifier shoppingList) {
086        this.shoppingList = shoppingList;
087    }
088
089    public void setSupplyChannel(final com.commercetools.api.models.channel.ChannelResourceIdentifier supplyChannel) {
090        this.supplyChannel = supplyChannel;
091    }
092
093    public void setDistributionChannel(
094            final com.commercetools.api.models.channel.ChannelResourceIdentifier distributionChannel) {
095        this.distributionChannel = distributionChannel;
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        StagedOrderAddShoppingListActionImpl that = (StagedOrderAddShoppingListActionImpl) o;
107
108        return new EqualsBuilder().append(action, that.action)
109                .append(shoppingList, that.shoppingList)
110                .append(supplyChannel, that.supplyChannel)
111                .append(distributionChannel, that.distributionChannel)
112                .isEquals();
113    }
114
115    @Override
116    public int hashCode() {
117        return new HashCodeBuilder(17, 37).append(action)
118                .append(shoppingList)
119                .append(supplyChannel)
120                .append(distributionChannel)
121                .toHashCode();
122    }
123
124}