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

com.commercetools.history.models.label.ReviewLabelBuilder 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;

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

 *     ReviewLabel reviewLabel = ReviewLabel.builder()
 *             .key("{key}")
 *             .title("{title}")
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ReviewLabelBuilder implements Builder { private String key; private String title; /** *

User-defined unique identifier of the Review.

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

Title of the Review.

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

User-defined unique identifier of the Review.

* @return key */ public String getKey() { return this.key; } /** *

Title of the Review.

* @return title */ public String getTitle() { return this.title; } /** * builds ReviewLabel with checking for non-null required values * @return ReviewLabel */ public ReviewLabel build() { Objects.requireNonNull(key, ReviewLabel.class + ": key is missing"); Objects.requireNonNull(title, ReviewLabel.class + ": title is missing"); return new ReviewLabelImpl(key, title); } /** * builds ReviewLabel without checking for non-null required values * @return ReviewLabel */ public ReviewLabel buildUnchecked() { return new ReviewLabelImpl(key, title); } /** * factory method for an instance of ReviewLabelBuilder * @return builder */ public static ReviewLabelBuilder of() { return new ReviewLabelBuilder(); } /** * create builder for ReviewLabel instance * @param template instance with prefilled values for the builder * @return builder */ public static ReviewLabelBuilder of(final ReviewLabel template) { ReviewLabelBuilder builder = new ReviewLabelBuilder(); builder.key = template.getKey(); builder.title = template.getTitle(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy