001
002package com.commercetools.api.models.message;
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>Generated after a successful Transition State update action.</p>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class ProductStateTransitionMessagePayloadImpl implements ProductStateTransitionMessagePayload, ModelBase {
022
023    private String type;
024
025    private com.commercetools.api.models.state.StateReference state;
026
027    private Boolean force;
028
029    /**
030     * create instance with all properties
031     */
032    @JsonCreator
033    ProductStateTransitionMessagePayloadImpl(
034            @JsonProperty("state") final com.commercetools.api.models.state.StateReference state,
035            @JsonProperty("force") final Boolean force) {
036        this.state = state;
037        this.force = force;
038        this.type = PRODUCT_STATE_TRANSITION;
039    }
040
041    /**
042     * create empty instance
043     */
044    public ProductStateTransitionMessagePayloadImpl() {
045        this.type = PRODUCT_STATE_TRANSITION;
046    }
047
048    /**
049     *
050     */
051
052    public String getType() {
053        return this.type;
054    }
055
056    /**
057     *  <p>Product State after the Transition State update action.</p>
058     */
059
060    public com.commercetools.api.models.state.StateReference getState() {
061        return this.state;
062    }
063
064    /**
065     *  <p>Whether State transition validations were turned off during the Transition State update action.</p>
066     */
067
068    public Boolean getForce() {
069        return this.force;
070    }
071
072    public void setState(final com.commercetools.api.models.state.StateReference state) {
073        this.state = state;
074    }
075
076    public void setForce(final Boolean force) {
077        this.force = force;
078    }
079
080    @Override
081    public boolean equals(Object o) {
082        if (this == o)
083            return true;
084
085        if (o == null || getClass() != o.getClass())
086            return false;
087
088        ProductStateTransitionMessagePayloadImpl that = (ProductStateTransitionMessagePayloadImpl) o;
089
090        return new EqualsBuilder().append(type, that.type)
091                .append(state, that.state)
092                .append(force, that.force)
093                .isEquals();
094    }
095
096    @Override
097    public int hashCode() {
098        return new HashCodeBuilder(17, 37).append(type).append(state).append(force).toHashCode();
099    }
100
101}