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