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

com.commercetools.history.models.change_value.ParcelChangeValueBuilder Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

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;

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

 *     ParcelChangeValue parcelChangeValue = ParcelChangeValue.builder()
 *             .id("{id}")
 *             .createdAt("{createdAt}")
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ParcelChangeValueBuilder implements Builder { private String id; private String createdAt; /** *

id of the Parcel.

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

Date and time (UTC) the Parcel was created.

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

id of the Parcel.

* @return id */ public String getId() { return this.id; } /** *

Date and time (UTC) the Parcel was created.

* @return createdAt */ public String getCreatedAt() { return this.createdAt; } /** * builds ParcelChangeValue with checking for non-null required values * @return ParcelChangeValue */ public ParcelChangeValue build() { Objects.requireNonNull(id, ParcelChangeValue.class + ": id is missing"); Objects.requireNonNull(createdAt, ParcelChangeValue.class + ": createdAt is missing"); return new ParcelChangeValueImpl(id, createdAt); } /** * builds ParcelChangeValue without checking for non-null required values * @return ParcelChangeValue */ public ParcelChangeValue buildUnchecked() { return new ParcelChangeValueImpl(id, createdAt); } /** * factory method for an instance of ParcelChangeValueBuilder * @return builder */ public static ParcelChangeValueBuilder of() { return new ParcelChangeValueBuilder(); } /** * create builder for ParcelChangeValue instance * @param template instance with prefilled values for the builder * @return builder */ public static ParcelChangeValueBuilder of(final ParcelChangeValue template) { ParcelChangeValueBuilder builder = new ParcelChangeValueBuilder(); builder.id = template.getId(); builder.createdAt = template.getCreatedAt(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy