All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.commercetools.history.models.change.SetCustomFieldChangeBuilder Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

package com.commercetools.history.models.change;

import java.util.*;

import io.vrap.rmf.base.client.Builder;
import io.vrap.rmf.base.client.utils.Generated;

/**
 * SetCustomFieldChangeBuilder
 * 
* Example to create an instance using the builder pattern *
*

 *     SetCustomFieldChange setCustomFieldChange = SetCustomFieldChange.builder()
 *             .change("{change}")
 *             .name("{name}")
 *             .customTypeId("{customTypeId}")
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetCustomFieldChangeBuilder implements Builder { private String change; private java.lang.Object previousValue; private java.lang.Object nextValue; private String name; private String customTypeId; /** * set the value to the change * @param change value to be set * @return Builder */ public SetCustomFieldChangeBuilder change(final String change) { this.change = change; return this; } /** *

Value before the change.

* @param previousValue value to be set * @return Builder */ public SetCustomFieldChangeBuilder previousValue(final java.lang.Object previousValue) { this.previousValue = previousValue; return this; } /** *

Value after the change.

* @param nextValue value to be set * @return Builder */ public SetCustomFieldChangeBuilder nextValue(final java.lang.Object nextValue) { this.nextValue = nextValue; return this; } /** *

Name of the Custom Field.

* @param name value to be set * @return Builder */ public SetCustomFieldChangeBuilder name(final String name) { this.name = name; return this; } /** *

id of the referenced Type.

* @param customTypeId value to be set * @return Builder */ public SetCustomFieldChangeBuilder customTypeId(final String customTypeId) { this.customTypeId = customTypeId; return this; } /** * value of change} * @return change */ public String getChange() { return this.change; } /** *

Value before the change.

* @return previousValue */ public java.lang.Object getPreviousValue() { return this.previousValue; } /** *

Value after the change.

* @return nextValue */ public java.lang.Object getNextValue() { return this.nextValue; } /** *

Name of the Custom Field.

* @return name */ public String getName() { return this.name; } /** *

id of the referenced Type.

* @return customTypeId */ public String getCustomTypeId() { return this.customTypeId; } /** * builds SetCustomFieldChange with checking for non-null required values * @return SetCustomFieldChange */ public SetCustomFieldChange build() { Objects.requireNonNull(change, SetCustomFieldChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetCustomFieldChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetCustomFieldChange.class + ": nextValue is missing"); Objects.requireNonNull(name, SetCustomFieldChange.class + ": name is missing"); Objects.requireNonNull(customTypeId, SetCustomFieldChange.class + ": customTypeId is missing"); return new SetCustomFieldChangeImpl(change, previousValue, nextValue, name, customTypeId); } /** * builds SetCustomFieldChange without checking for non-null required values * @return SetCustomFieldChange */ public SetCustomFieldChange buildUnchecked() { return new SetCustomFieldChangeImpl(change, previousValue, nextValue, name, customTypeId); } /** * factory method for an instance of SetCustomFieldChangeBuilder * @return builder */ public static SetCustomFieldChangeBuilder of() { return new SetCustomFieldChangeBuilder(); } /** * create builder for SetCustomFieldChange instance * @param template instance with prefilled values for the builder * @return builder */ public static SetCustomFieldChangeBuilder of(final SetCustomFieldChange template) { SetCustomFieldChangeBuilder builder = new SetCustomFieldChangeBuilder(); builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.name = template.getName(); builder.customTypeId = template.getCustomTypeId(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy