001
002package com.commercetools.history.models.change;
003
004import java.time.*;
005import java.util.*;
006import java.util.function.Function;
007
008import javax.annotation.Nullable;
009import javax.validation.constraints.NotNull;
010
011import com.commercetools.history.models.common.QuoteState;
012import com.fasterxml.jackson.annotation.*;
013import com.fasterxml.jackson.databind.annotation.*;
014
015import io.vrap.rmf.base.client.utils.Generated;
016
017/**
018 *  <p>Change triggered by the Request Quote Renegotiation update action.</p>
019 *
020 * <hr>
021 * Example to create an instance using the builder pattern
022 * <div class=code-example>
023 * <pre><code class='java'>
024 *     RequestQuoteRenegotiationChange requestQuoteRenegotiationChange = RequestQuoteRenegotiationChange.builder()
025 *             .change("{change}")
026 *             .previousValue(QuoteState.PENDING)
027 *             .nextValue(QuoteState.PENDING)
028 *             .buyerComment("{buyerComment}")
029 *             .build()
030 * </code></pre>
031 * </div>
032 */
033@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
034@JsonDeserialize(as = RequestQuoteRenegotiationChangeImpl.class)
035public interface RequestQuoteRenegotiationChange extends Change {
036
037    /**
038     * discriminator value for RequestQuoteRenegotiationChange
039     */
040    String REQUEST_QUOTE_RENEGOTIATION_CHANGE = "RequestQuoteRenegotiationChange";
041
042    /**
043     *
044     * @return type
045     */
046    @NotNull
047    @JsonProperty("type")
048    public String getType();
049
050    /**
051     *
052     * @return change
053     */
054    @NotNull
055    @JsonProperty("change")
056    public String getChange();
057
058    /**
059     *  <p>Value before the change.</p>
060     * @return previousValue
061     */
062    @NotNull
063    @JsonProperty("previousValue")
064    public QuoteState getPreviousValue();
065
066    /**
067     *  <p>Value after the change.</p>
068     * @return nextValue
069     */
070    @NotNull
071    @JsonProperty("nextValue")
072    public QuoteState getNextValue();
073
074    /**
075     *  <p>Message from the Buyer regarding the Quote renegotiation request.</p>
076     * @return buyerComment
077     */
078    @NotNull
079    @JsonProperty("buyerComment")
080    public String getBuyerComment();
081
082    /**
083     * set change
084     * @param change value to be set
085     */
086
087    public void setChange(final String change);
088
089    /**
090     *  <p>Value before the change.</p>
091     * @param previousValue value to be set
092     */
093
094    public void setPreviousValue(final QuoteState previousValue);
095
096    /**
097     *  <p>Value after the change.</p>
098     * @param nextValue value to be set
099     */
100
101    public void setNextValue(final QuoteState nextValue);
102
103    /**
104     *  <p>Message from the Buyer regarding the Quote renegotiation request.</p>
105     * @param buyerComment value to be set
106     */
107
108    public void setBuyerComment(final String buyerComment);
109
110    /**
111     * factory method
112     * @return instance of RequestQuoteRenegotiationChange
113     */
114    public static RequestQuoteRenegotiationChange of() {
115        return new RequestQuoteRenegotiationChangeImpl();
116    }
117
118    /**
119     * factory method to create a shallow copy RequestQuoteRenegotiationChange
120     * @param template instance to be copied
121     * @return copy instance
122     */
123    public static RequestQuoteRenegotiationChange of(final RequestQuoteRenegotiationChange template) {
124        RequestQuoteRenegotiationChangeImpl instance = new RequestQuoteRenegotiationChangeImpl();
125        instance.setChange(template.getChange());
126        instance.setPreviousValue(template.getPreviousValue());
127        instance.setNextValue(template.getNextValue());
128        instance.setBuyerComment(template.getBuyerComment());
129        return instance;
130    }
131
132    /**
133     * factory method to create a deep copy of RequestQuoteRenegotiationChange
134     * @param template instance to be copied
135     * @return copy instance
136     */
137    @Nullable
138    public static RequestQuoteRenegotiationChange deepCopy(@Nullable final RequestQuoteRenegotiationChange template) {
139        if (template == null) {
140            return null;
141        }
142        RequestQuoteRenegotiationChangeImpl instance = new RequestQuoteRenegotiationChangeImpl();
143        instance.setChange(template.getChange());
144        instance.setPreviousValue(template.getPreviousValue());
145        instance.setNextValue(template.getNextValue());
146        instance.setBuyerComment(template.getBuyerComment());
147        return instance;
148    }
149
150    /**
151     * builder factory method for RequestQuoteRenegotiationChange
152     * @return builder
153     */
154    public static RequestQuoteRenegotiationChangeBuilder builder() {
155        return RequestQuoteRenegotiationChangeBuilder.of();
156    }
157
158    /**
159     * create builder for RequestQuoteRenegotiationChange instance
160     * @param template instance with prefilled values for the builder
161     * @return builder
162     */
163    public static RequestQuoteRenegotiationChangeBuilder builder(final RequestQuoteRenegotiationChange template) {
164        return RequestQuoteRenegotiationChangeBuilder.of(template);
165    }
166
167    /**
168     * accessor map function
169     * @param <T> mapped type
170     * @param helper function to map the object
171     * @return mapped value
172     */
173    default <T> T withRequestQuoteRenegotiationChange(Function<RequestQuoteRenegotiationChange, T> helper) {
174        return helper.apply(this);
175    }
176
177    /**
178     * gives a TypeReference for usage with Jackson DataBind
179     * @return TypeReference
180     */
181    public static com.fasterxml.jackson.core.type.TypeReference<RequestQuoteRenegotiationChange> typeReference() {
182        return new com.fasterxml.jackson.core.type.TypeReference<RequestQuoteRenegotiationChange>() {
183            @Override
184            public String toString() {
185                return "TypeReference<RequestQuoteRenegotiationChange>";
186            }
187        };
188    }
189}