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

com.commercetools.history.models.change_value.FieldDefinitionOrderValueBuilder 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 java.util.function.Function;

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

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

 *     FieldDefinitionOrderValue fieldDefinitionOrderValue = FieldDefinitionOrderValue.builder()
 *             .name("{name}")
 *             .label(labelBuilder -> labelBuilder)
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class FieldDefinitionOrderValueBuilder implements Builder { private String name; private com.commercetools.history.models.common.LocalizedString label; /** *

Name of the FieldDefinition.

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

Descriptive label of the field.

* @param builder function to build the label value * @return Builder */ public FieldDefinitionOrderValueBuilder label( Function builder) { this.label = builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of()).build(); return this; } /** *

Descriptive label of the field.

* @param builder function to build the label value * @return Builder */ public FieldDefinitionOrderValueBuilder withLabel( Function builder) { this.label = builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of()); return this; } /** *

Descriptive label of the field.

* @param label value to be set * @return Builder */ public FieldDefinitionOrderValueBuilder label(final com.commercetools.history.models.common.LocalizedString label) { this.label = label; return this; } /** *

Name of the FieldDefinition.

* @return name */ public String getName() { return this.name; } /** *

Descriptive label of the field.

* @return label */ public com.commercetools.history.models.common.LocalizedString getLabel() { return this.label; } /** * builds FieldDefinitionOrderValue with checking for non-null required values * @return FieldDefinitionOrderValue */ public FieldDefinitionOrderValue build() { Objects.requireNonNull(name, FieldDefinitionOrderValue.class + ": name is missing"); Objects.requireNonNull(label, FieldDefinitionOrderValue.class + ": label is missing"); return new FieldDefinitionOrderValueImpl(name, label); } /** * builds FieldDefinitionOrderValue without checking for non-null required values * @return FieldDefinitionOrderValue */ public FieldDefinitionOrderValue buildUnchecked() { return new FieldDefinitionOrderValueImpl(name, label); } /** * factory method for an instance of FieldDefinitionOrderValueBuilder * @return builder */ public static FieldDefinitionOrderValueBuilder of() { return new FieldDefinitionOrderValueBuilder(); } /** * create builder for FieldDefinitionOrderValue instance * @param template instance with prefilled values for the builder * @return builder */ public static FieldDefinitionOrderValueBuilder of(final FieldDefinitionOrderValue template) { FieldDefinitionOrderValueBuilder builder = new FieldDefinitionOrderValueBuilder(); builder.name = template.getName(); builder.label = template.getLabel(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy