001
002package com.commercetools.history.models.change;
003
004import java.util.*;
005
006import io.vrap.rmf.base.client.Builder;
007import io.vrap.rmf.base.client.utils.Generated;
008
009/**
010 * RequestQuoteRenegotiationChangeBuilder
011 * <hr>
012 * Example to create an instance using the builder pattern
013 * <div class=code-example>
014 * <pre><code class='java'>
015 *     RequestQuoteRenegotiationChange requestQuoteRenegotiationChange = RequestQuoteRenegotiationChange.builder()
016 *             .change("{change}")
017 *             .previousValue(QuoteState.PENDING)
018 *             .nextValue(QuoteState.PENDING)
019 *             .buyerComment("{buyerComment}")
020 *             .build()
021 * </code></pre>
022 * </div>
023 */
024@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
025public class RequestQuoteRenegotiationChangeBuilder implements Builder<RequestQuoteRenegotiationChange> {
026
027    private String change;
028
029    private com.commercetools.history.models.common.QuoteState previousValue;
030
031    private com.commercetools.history.models.common.QuoteState nextValue;
032
033    private String buyerComment;
034
035    /**
036     * set the value to the change
037     * @param change value to be set
038     * @return Builder
039     */
040
041    public RequestQuoteRenegotiationChangeBuilder change(final String change) {
042        this.change = change;
043        return this;
044    }
045
046    /**
047     *  <p>Value before the change.</p>
048     * @param previousValue value to be set
049     * @return Builder
050     */
051
052    public RequestQuoteRenegotiationChangeBuilder previousValue(
053            final com.commercetools.history.models.common.QuoteState previousValue) {
054        this.previousValue = previousValue;
055        return this;
056    }
057
058    /**
059     *  <p>Value after the change.</p>
060     * @param nextValue value to be set
061     * @return Builder
062     */
063
064    public RequestQuoteRenegotiationChangeBuilder nextValue(
065            final com.commercetools.history.models.common.QuoteState nextValue) {
066        this.nextValue = nextValue;
067        return this;
068    }
069
070    /**
071     *  <p>Message from the Buyer regarding the Quote renegotiation request.</p>
072     * @param buyerComment value to be set
073     * @return Builder
074     */
075
076    public RequestQuoteRenegotiationChangeBuilder buyerComment(final String buyerComment) {
077        this.buyerComment = buyerComment;
078        return this;
079    }
080
081    /**
082     * value of change}
083     * @return change
084     */
085
086    public String getChange() {
087        return this.change;
088    }
089
090    /**
091     *  <p>Value before the change.</p>
092     * @return previousValue
093     */
094
095    public com.commercetools.history.models.common.QuoteState getPreviousValue() {
096        return this.previousValue;
097    }
098
099    /**
100     *  <p>Value after the change.</p>
101     * @return nextValue
102     */
103
104    public com.commercetools.history.models.common.QuoteState getNextValue() {
105        return this.nextValue;
106    }
107
108    /**
109     *  <p>Message from the Buyer regarding the Quote renegotiation request.</p>
110     * @return buyerComment
111     */
112
113    public String getBuyerComment() {
114        return this.buyerComment;
115    }
116
117    /**
118     * builds RequestQuoteRenegotiationChange with checking for non-null required values
119     * @return RequestQuoteRenegotiationChange
120     */
121    public RequestQuoteRenegotiationChange build() {
122        Objects.requireNonNull(change, RequestQuoteRenegotiationChange.class + ": change is missing");
123        Objects.requireNonNull(previousValue, RequestQuoteRenegotiationChange.class + ": previousValue is missing");
124        Objects.requireNonNull(nextValue, RequestQuoteRenegotiationChange.class + ": nextValue is missing");
125        Objects.requireNonNull(buyerComment, RequestQuoteRenegotiationChange.class + ": buyerComment is missing");
126        return new RequestQuoteRenegotiationChangeImpl(change, previousValue, nextValue, buyerComment);
127    }
128
129    /**
130     * builds RequestQuoteRenegotiationChange without checking for non-null required values
131     * @return RequestQuoteRenegotiationChange
132     */
133    public RequestQuoteRenegotiationChange buildUnchecked() {
134        return new RequestQuoteRenegotiationChangeImpl(change, previousValue, nextValue, buyerComment);
135    }
136
137    /**
138     * factory method for an instance of RequestQuoteRenegotiationChangeBuilder
139     * @return builder
140     */
141    public static RequestQuoteRenegotiationChangeBuilder of() {
142        return new RequestQuoteRenegotiationChangeBuilder();
143    }
144
145    /**
146     * create builder for RequestQuoteRenegotiationChange instance
147     * @param template instance with prefilled values for the builder
148     * @return builder
149     */
150    public static RequestQuoteRenegotiationChangeBuilder of(final RequestQuoteRenegotiationChange template) {
151        RequestQuoteRenegotiationChangeBuilder builder = new RequestQuoteRenegotiationChangeBuilder();
152        builder.change = template.getChange();
153        builder.previousValue = template.getPreviousValue();
154        builder.nextValue = template.getNextValue();
155        builder.buyerComment = template.getBuyerComment();
156        return builder;
157    }
158
159}