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

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

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

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

User-defined unique identifier of the CustomObject within the defined container.

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

Namespace to group Custom Objects.

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

User-defined unique identifier of the CustomObject within the defined container.

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

Namespace to group Custom Objects.

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy