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

com.commercetools.history.models.label.OrderLabelBuilder Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

package com.commercetools.history.models.label;

import java.util.*;

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

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

 *     OrderLabel orderLabel = OrderLabel.builder()
 *             .customerEmail("{customerEmail}")
 *             .orderNumber("{orderNumber}")
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class OrderLabelBuilder implements Builder { private String customerEmail; private String orderNumber; /** *

Email address of the Customer that the Order belongs to.

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

User-defined unique identifier of the Order that is unique across a Project.

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

Email address of the Customer that the Order belongs to.

* @return customerEmail */ public String getCustomerEmail() { return this.customerEmail; } /** *

User-defined unique identifier of the Order that is unique across a Project.

* @return orderNumber */ public String getOrderNumber() { return this.orderNumber; } /** * builds OrderLabel with checking for non-null required values * @return OrderLabel */ public OrderLabel build() { Objects.requireNonNull(customerEmail, OrderLabel.class + ": customerEmail is missing"); Objects.requireNonNull(orderNumber, OrderLabel.class + ": orderNumber is missing"); return new OrderLabelImpl(customerEmail, orderNumber); } /** * builds OrderLabel without checking for non-null required values * @return OrderLabel */ public OrderLabel buildUnchecked() { return new OrderLabelImpl(customerEmail, orderNumber); } /** * factory method for an instance of OrderLabelBuilder * @return builder */ public static OrderLabelBuilder of() { return new OrderLabelBuilder(); } /** * create builder for OrderLabel instance * @param template instance with prefilled values for the builder * @return builder */ public static OrderLabelBuilder of(final OrderLabel template) { OrderLabelBuilder builder = new OrderLabelBuilder(); builder.customerEmail = template.getCustomerEmail(); builder.orderNumber = template.getOrderNumber(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy