com.commercetools.history.models.change_value.ChangeValueRelativeChangeValueBuilder 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_value;
import java.util.*;
import io.vrap.rmf.base.client.Builder;
import io.vrap.rmf.base.client.utils.Generated;
/**
* ChangeValueRelativeChangeValueBuilder
*
* Example to create an instance using the builder pattern
*
*
* ChangeValueRelativeChangeValue changeValueRelativeChangeValue = ChangeValueRelativeChangeValue.builder()
* .permyriad(1)
* .build()
*
*
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ChangeValueRelativeChangeValueBuilder implements Builder {
private Integer permyriad;
/**
* Fraction (per ten thousand) the price is reduced by. For example, 1000 results in a 10% price reduction.
* @param permyriad value to be set
* @return Builder
*/
public ChangeValueRelativeChangeValueBuilder permyriad(final Integer permyriad) {
this.permyriad = permyriad;
return this;
}
/**
* Fraction (per ten thousand) the price is reduced by. For example, 1000 results in a 10% price reduction.
* @return permyriad
*/
public Integer getPermyriad() {
return this.permyriad;
}
/**
* builds ChangeValueRelativeChangeValue with checking for non-null required values
* @return ChangeValueRelativeChangeValue
*/
public ChangeValueRelativeChangeValue build() {
Objects.requireNonNull(permyriad, ChangeValueRelativeChangeValue.class + ": permyriad is missing");
return new ChangeValueRelativeChangeValueImpl(permyriad);
}
/**
* builds ChangeValueRelativeChangeValue without checking for non-null required values
* @return ChangeValueRelativeChangeValue
*/
public ChangeValueRelativeChangeValue buildUnchecked() {
return new ChangeValueRelativeChangeValueImpl(permyriad);
}
/**
* factory method for an instance of ChangeValueRelativeChangeValueBuilder
* @return builder
*/
public static ChangeValueRelativeChangeValueBuilder of() {
return new ChangeValueRelativeChangeValueBuilder();
}
/**
* create builder for ChangeValueRelativeChangeValue instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static ChangeValueRelativeChangeValueBuilder of(final ChangeValueRelativeChangeValue template) {
ChangeValueRelativeChangeValueBuilder builder = new ChangeValueRelativeChangeValueBuilder();
builder.permyriad = template.getPermyriad();
return builder;
}
}