com.commercetools.history.models.change.ChangePlainEnumValueLabelChangeBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commercetools-sdk-java-history Show documentation
Show all versions of commercetools-sdk-java-history Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
package com.commercetools.history.models.change;
import java.util.*;
import io.vrap.rmf.base.client.Builder;
import io.vrap.rmf.base.client.utils.Generated;
/**
* ChangePlainEnumValueLabelChangeBuilder
*
* Example to create an instance using the builder pattern
*
*
* ChangePlainEnumValueLabelChange changePlainEnumValueLabelChange = ChangePlainEnumValueLabelChange.builder()
* .change("{change}")
* .previousValue("{previousValue}")
* .nextValue("{nextValue}")
* .attributeName("{attributeName}")
* .valueKey("{valueKey}")
* .build()
*
*
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ChangePlainEnumValueLabelChangeBuilder implements Builder {
private String change;
private String previousValue;
private String nextValue;
private String attributeName;
private String valueKey;
/**
* set the value to the change
* @param change value to be set
* @return Builder
*/
public ChangePlainEnumValueLabelChangeBuilder change(final String change) {
this.change = change;
return this;
}
/**
* Value before the change.
* @param previousValue value to be set
* @return Builder
*/
public ChangePlainEnumValueLabelChangeBuilder previousValue(final String previousValue) {
this.previousValue = previousValue;
return this;
}
/**
* Value after the change.
* @param nextValue value to be set
* @return Builder
*/
public ChangePlainEnumValueLabelChangeBuilder nextValue(final String nextValue) {
this.nextValue = nextValue;
return this;
}
/**
* Name of the updated AttributeDefinition.
* @param attributeName value to be set
* @return Builder
*/
public ChangePlainEnumValueLabelChangeBuilder attributeName(final String attributeName) {
this.attributeName = attributeName;
return this;
}
/**
* Key of the updated values.
* @param valueKey value to be set
* @return Builder
*/
public ChangePlainEnumValueLabelChangeBuilder valueKey(final String valueKey) {
this.valueKey = valueKey;
return this;
}
/**
* value of change}
* @return change
*/
public String getChange() {
return this.change;
}
/**
* Value before the change.
* @return previousValue
*/
public String getPreviousValue() {
return this.previousValue;
}
/**
* Value after the change.
* @return nextValue
*/
public String getNextValue() {
return this.nextValue;
}
/**
* Name of the updated AttributeDefinition.
* @return attributeName
*/
public String getAttributeName() {
return this.attributeName;
}
/**
* Key of the updated values.
* @return valueKey
*/
public String getValueKey() {
return this.valueKey;
}
/**
* builds ChangePlainEnumValueLabelChange with checking for non-null required values
* @return ChangePlainEnumValueLabelChange
*/
public ChangePlainEnumValueLabelChange build() {
Objects.requireNonNull(change, ChangePlainEnumValueLabelChange.class + ": change is missing");
Objects.requireNonNull(previousValue, ChangePlainEnumValueLabelChange.class + ": previousValue is missing");
Objects.requireNonNull(nextValue, ChangePlainEnumValueLabelChange.class + ": nextValue is missing");
Objects.requireNonNull(attributeName, ChangePlainEnumValueLabelChange.class + ": attributeName is missing");
Objects.requireNonNull(valueKey, ChangePlainEnumValueLabelChange.class + ": valueKey is missing");
return new ChangePlainEnumValueLabelChangeImpl(change, previousValue, nextValue, attributeName, valueKey);
}
/**
* builds ChangePlainEnumValueLabelChange without checking for non-null required values
* @return ChangePlainEnumValueLabelChange
*/
public ChangePlainEnumValueLabelChange buildUnchecked() {
return new ChangePlainEnumValueLabelChangeImpl(change, previousValue, nextValue, attributeName, valueKey);
}
/**
* factory method for an instance of ChangePlainEnumValueLabelChangeBuilder
* @return builder
*/
public static ChangePlainEnumValueLabelChangeBuilder of() {
return new ChangePlainEnumValueLabelChangeBuilder();
}
/**
* create builder for ChangePlainEnumValueLabelChange instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static ChangePlainEnumValueLabelChangeBuilder of(final ChangePlainEnumValueLabelChange template) {
ChangePlainEnumValueLabelChangeBuilder builder = new ChangePlainEnumValueLabelChangeBuilder();
builder.change = template.getChange();
builder.previousValue = template.getPreviousValue();
builder.nextValue = template.getNextValue();
builder.attributeName = template.getAttributeName();
builder.valueKey = template.getValueKey();
return builder;
}
}