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

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

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

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.Base;
import java.util.List;
import javax.annotation.Generated;

/**
 * Dsl class for {@link ItemShippingDetailsDraft}.
 */
@Generated(
    value = "io.sphere.sdk.annotations.processors.generators.ResourceDraftValueGenerator",
    comments = "Generated from: io.sphere.sdk.carts.ItemShippingDetailsDraft"
)
public final class ItemShippingDetailsDraftDsl extends Base implements ItemShippingDetailsDraft {
  private List targets;

  @JsonCreator
  ItemShippingDetailsDraftDsl(final List targets) {
    this.targets = targets;
  }

  public List getTargets() {
    return targets;
  }

  /**
   * Creates a new builder with the values of this object.
   *
   * @return new builder
   */
  public ItemShippingDetailsDraftBuilder newBuilder() {
    return new ItemShippingDetailsDraftBuilder(targets);
  }

  public ItemShippingDetailsDraftDsl withTargets(final List targets) {
    return newBuilder().targets(targets).build();
  }

  /**
   * Creates a new object initialized with the given values.
   *
   * @param targets initial value for the {@link ItemShippingDetailsDraft#getTargets()} property
   * @return new object initialized with the given values
   */
  public static ItemShippingDetailsDraftDsl of(final List targets) {
    return new ItemShippingDetailsDraftDsl(targets);
  }

  /**
   * 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 ItemShippingDetailsDraftDsl of(final ItemShippingDetailsDraft template) {
    return new ItemShippingDetailsDraftDsl(template.getTargets());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy