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 * SetShippingRateInputChangeBuilder
011 * <hr>
012 * Example to create an instance using the builder pattern
013 * <div class=code-example>
014 * <pre><code class='java'>
015 *     SetShippingRateInputChange setShippingRateInputChange = SetShippingRateInputChange.builder()
016 *             .change("{change}")
017 *             .build()
018 * </code></pre>
019 * </div>
020 */
021@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
022public class SetShippingRateInputChangeBuilder implements Builder<SetShippingRateInputChange> {
023
024    private String change;
025
026    private java.lang.Object previousValue;
027
028    private java.lang.Object nextValue;
029
030    /**
031     * set the value to the change
032     * @param change value to be set
033     * @return Builder
034     */
035
036    public SetShippingRateInputChangeBuilder change(final String change) {
037        this.change = change;
038        return this;
039    }
040
041    /**
042     *  <p>Value before the change.</p>
043     * @param previousValue value to be set
044     * @return Builder
045     */
046
047    public SetShippingRateInputChangeBuilder previousValue(final java.lang.Object previousValue) {
048        this.previousValue = previousValue;
049        return this;
050    }
051
052    /**
053     *  <p>Value after the change.</p>
054     * @param nextValue value to be set
055     * @return Builder
056     */
057
058    public SetShippingRateInputChangeBuilder nextValue(final java.lang.Object nextValue) {
059        this.nextValue = nextValue;
060        return this;
061    }
062
063    /**
064     * value of change}
065     * @return change
066     */
067
068    public String getChange() {
069        return this.change;
070    }
071
072    /**
073     *  <p>Value before the change.</p>
074     * @return previousValue
075     */
076
077    public java.lang.Object getPreviousValue() {
078        return this.previousValue;
079    }
080
081    /**
082     *  <p>Value after the change.</p>
083     * @return nextValue
084     */
085
086    public java.lang.Object getNextValue() {
087        return this.nextValue;
088    }
089
090    /**
091     * builds SetShippingRateInputChange with checking for non-null required values
092     * @return SetShippingRateInputChange
093     */
094    public SetShippingRateInputChange build() {
095        Objects.requireNonNull(change, SetShippingRateInputChange.class + ": change is missing");
096        Objects.requireNonNull(previousValue, SetShippingRateInputChange.class + ": previousValue is missing");
097        Objects.requireNonNull(nextValue, SetShippingRateInputChange.class + ": nextValue is missing");
098        return new SetShippingRateInputChangeImpl(change, previousValue, nextValue);
099    }
100
101    /**
102     * builds SetShippingRateInputChange without checking for non-null required values
103     * @return SetShippingRateInputChange
104     */
105    public SetShippingRateInputChange buildUnchecked() {
106        return new SetShippingRateInputChangeImpl(change, previousValue, nextValue);
107    }
108
109    /**
110     * factory method for an instance of SetShippingRateInputChangeBuilder
111     * @return builder
112     */
113    public static SetShippingRateInputChangeBuilder of() {
114        return new SetShippingRateInputChangeBuilder();
115    }
116
117    /**
118     * create builder for SetShippingRateInputChange instance
119     * @param template instance with prefilled values for the builder
120     * @return builder
121     */
122    public static SetShippingRateInputChangeBuilder of(final SetShippingRateInputChange template) {
123        SetShippingRateInputChangeBuilder builder = new SetShippingRateInputChangeBuilder();
124        builder.change = template.getChange();
125        builder.previousValue = template.getPreviousValue();
126        builder.nextValue = template.getNextValue();
127        return builder;
128    }
129
130}