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

io.sphere.sdk.carts.ScoreShippingRateInputDraftBuilder Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
package io.sphere.sdk.carts;

import io.sphere.sdk.models.Base;
import io.sphere.sdk.models.Builder;
import java.lang.Long;
import javax.annotation.Generated;

/**
 * Builder for {@link ScoreShippingRateInputDraft}.
 */
@Generated(
    value = "io.sphere.sdk.annotations.processors.generators.DraftBuilderGenerator",
    comments = "Generated from: io.sphere.sdk.carts.ScoreShippingRateInputDraft"
)
public final class ScoreShippingRateInputDraftBuilder extends Base implements Builder {
  private Long score;

  ScoreShippingRateInputDraftBuilder() {
  }

  ScoreShippingRateInputDraftBuilder(final Long score) {
    this.score = score;
  }

  /**
   * Sets the {@code score} property of this builder.
   *
   * @param score the value for {@link ScoreShippingRateInputDraft#getScore()}
   * @return this builder
   */
  public ScoreShippingRateInputDraftBuilder score(final Long score) {
    this.score = score;
    return this;
  }

  public Long getScore() {
    return score;
  }

  /**
   * Creates a new instance of {@code ScoreShippingRateInputDraftDsl} with the values of this builder.
   *
   * @return the instance
   */
  public ScoreShippingRateInputDraftDsl build() {
    return new ScoreShippingRateInputDraftDsl(score);
  }

  /**
   * 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 ScoreShippingRateInputDraftBuilder of(final Long score) {
    return new ScoreShippingRateInputDraftBuilder(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 ScoreShippingRateInputDraftBuilder of(final ScoreShippingRateInputDraft template) {
    return new ScoreShippingRateInputDraftBuilder(template.getScore());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy