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 * ChangePlainEnumValueLabelChangeBuilder
011 * <hr>
012 * Example to create an instance using the builder pattern
013 * <div class=code-example>
014 * <pre><code class='java'>
015 *     ChangePlainEnumValueLabelChange changePlainEnumValueLabelChange = ChangePlainEnumValueLabelChange.builder()
016 *             .change("{change}")
017 *             .previousValue("{previousValue}")
018 *             .nextValue("{nextValue}")
019 *             .attributeName("{attributeName}")
020 *             .valueKey("{valueKey}")
021 *             .build()
022 * </code></pre>
023 * </div>
024 */
025@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
026public class ChangePlainEnumValueLabelChangeBuilder implements Builder<ChangePlainEnumValueLabelChange> {
027
028    private String change;
029
030    private String previousValue;
031
032    private String nextValue;
033
034    private String attributeName;
035
036    private String valueKey;
037
038    /**
039     * set the value to the change
040     * @param change value to be set
041     * @return Builder
042     */
043
044    public ChangePlainEnumValueLabelChangeBuilder change(final String change) {
045        this.change = change;
046        return this;
047    }
048
049    /**
050     *  <p>Value before the change.</p>
051     * @param previousValue value to be set
052     * @return Builder
053     */
054
055    public ChangePlainEnumValueLabelChangeBuilder previousValue(final String previousValue) {
056        this.previousValue = previousValue;
057        return this;
058    }
059
060    /**
061     *  <p>Value after the change.</p>
062     * @param nextValue value to be set
063     * @return Builder
064     */
065
066    public ChangePlainEnumValueLabelChangeBuilder nextValue(final String nextValue) {
067        this.nextValue = nextValue;
068        return this;
069    }
070
071    /**
072     *  <p>Name of the updated AttributeDefinition.</p>
073     * @param attributeName value to be set
074     * @return Builder
075     */
076
077    public ChangePlainEnumValueLabelChangeBuilder attributeName(final String attributeName) {
078        this.attributeName = attributeName;
079        return this;
080    }
081
082    /**
083     *  <p>Key of the updated values.</p>
084     * @param valueKey value to be set
085     * @return Builder
086     */
087
088    public ChangePlainEnumValueLabelChangeBuilder valueKey(final String valueKey) {
089        this.valueKey = valueKey;
090        return this;
091    }
092
093    /**
094     * value of change}
095     * @return change
096     */
097
098    public String getChange() {
099        return this.change;
100    }
101
102    /**
103     *  <p>Value before the change.</p>
104     * @return previousValue
105     */
106
107    public String getPreviousValue() {
108        return this.previousValue;
109    }
110
111    /**
112     *  <p>Value after the change.</p>
113     * @return nextValue
114     */
115
116    public String getNextValue() {
117        return this.nextValue;
118    }
119
120    /**
121     *  <p>Name of the updated AttributeDefinition.</p>
122     * @return attributeName
123     */
124
125    public String getAttributeName() {
126        return this.attributeName;
127    }
128
129    /**
130     *  <p>Key of the updated values.</p>
131     * @return valueKey
132     */
133
134    public String getValueKey() {
135        return this.valueKey;
136    }
137
138    /**
139     * builds ChangePlainEnumValueLabelChange with checking for non-null required values
140     * @return ChangePlainEnumValueLabelChange
141     */
142    public ChangePlainEnumValueLabelChange build() {
143        Objects.requireNonNull(change, ChangePlainEnumValueLabelChange.class + ": change is missing");
144        Objects.requireNonNull(previousValue, ChangePlainEnumValueLabelChange.class + ": previousValue is missing");
145        Objects.requireNonNull(nextValue, ChangePlainEnumValueLabelChange.class + ": nextValue is missing");
146        Objects.requireNonNull(attributeName, ChangePlainEnumValueLabelChange.class + ": attributeName is missing");
147        Objects.requireNonNull(valueKey, ChangePlainEnumValueLabelChange.class + ": valueKey is missing");
148        return new ChangePlainEnumValueLabelChangeImpl(change, previousValue, nextValue, attributeName, valueKey);
149    }
150
151    /**
152     * builds ChangePlainEnumValueLabelChange without checking for non-null required values
153     * @return ChangePlainEnumValueLabelChange
154     */
155    public ChangePlainEnumValueLabelChange buildUnchecked() {
156        return new ChangePlainEnumValueLabelChangeImpl(change, previousValue, nextValue, attributeName, valueKey);
157    }
158
159    /**
160     * factory method for an instance of ChangePlainEnumValueLabelChangeBuilder
161     * @return builder
162     */
163    public static ChangePlainEnumValueLabelChangeBuilder of() {
164        return new ChangePlainEnumValueLabelChangeBuilder();
165    }
166
167    /**
168     * create builder for ChangePlainEnumValueLabelChange instance
169     * @param template instance with prefilled values for the builder
170     * @return builder
171     */
172    public static ChangePlainEnumValueLabelChangeBuilder of(final ChangePlainEnumValueLabelChange template) {
173        ChangePlainEnumValueLabelChangeBuilder builder = new ChangePlainEnumValueLabelChangeBuilder();
174        builder.change = template.getChange();
175        builder.previousValue = template.getPreviousValue();
176        builder.nextValue = template.getNextValue();
177        builder.attributeName = template.getAttributeName();
178        builder.valueKey = template.getValueKey();
179        return builder;
180    }
181
182}