io.sphere.sdk.carts.ScoreShippingRateInputDraftDsl Maven / Gradle / Ivy
package io.sphere.sdk.carts;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;
import java.lang.Long;
import javax.annotation.Generated;
/**
* Dsl class for {@link ScoreShippingRateInputDraft}.
*/
@Generated(
value = "io.sphere.sdk.annotations.processors.generators.ResourceDraftValueGenerator",
comments = "Generated from: io.sphere.sdk.carts.ScoreShippingRateInputDraft"
)
public final class ScoreShippingRateInputDraftDsl extends Base implements ScoreShippingRateInputDraft {
private Long score;
@JsonCreator
ScoreShippingRateInputDraftDsl(final Long score) {
this.score = score;
}
public Long getScore() {
return score;
}
/**
* Creates a new builder with the values of this object.
*
* @return new builder
*/
public ScoreShippingRateInputDraftBuilder newBuilder() {
return new ScoreShippingRateInputDraftBuilder(score);
}
public ScoreShippingRateInputDraftDsl withScore(final Long score) {
return newBuilder().score(score).build();
}
/**
* Creates a new object initialized with the given values.
*
* @param score initial value for the {@link ScoreShippingRateInputDraft#getScore()} property
* @return new object initialized with the given values
*/
public static ScoreShippingRateInputDraftDsl of(final Long score) {
return new ScoreShippingRateInputDraftDsl(score);
}
/**
* Creates a new object initialized with the fields of the template parameter.
*
* @param template the template
* @return a new object initialized from the template
*/
public static ScoreShippingRateInputDraftDsl of(final ScoreShippingRateInputDraft template) {
return new ScoreShippingRateInputDraftDsl(template.getScore());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy