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

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

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

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

User-defined unique identifier of the Associate Role.

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

Name of the Associate Role.

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

User-defined unique identifier of the Associate Role.

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

Name of the Associate Role.

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy