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

com.commercetools.importapi.models.common.StateKeyReferenceBuilder Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

package com.commercetools.importapi.models.common;

import java.util.*;

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

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

 *     StateKeyReference stateKeyReference = StateKeyReference.builder()
 *             .key("{key}")
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StateKeyReferenceBuilder implements Builder { private String key; /** * set the value to the key * @param key value to be set * @return Builder */ public StateKeyReferenceBuilder key(final String key) { this.key = key; return this; } /** * value of key} * @return key */ public String getKey() { return this.key; } /** * builds StateKeyReference with checking for non-null required values * @return StateKeyReference */ public StateKeyReference build() { Objects.requireNonNull(key, StateKeyReference.class + ": key is missing"); return new StateKeyReferenceImpl(key); } /** * builds StateKeyReference without checking for non-null required values * @return StateKeyReference */ public StateKeyReference buildUnchecked() { return new StateKeyReferenceImpl(key); } /** * factory method for an instance of StateKeyReferenceBuilder * @return builder */ public static StateKeyReferenceBuilder of() { return new StateKeyReferenceBuilder(); } /** * create builder for StateKeyReference instance * @param template instance with prefilled values for the builder * @return builder */ public static StateKeyReferenceBuilder of(final StateKeyReference template) { StateKeyReferenceBuilder builder = new StateKeyReferenceBuilder(); builder.key = template.getKey(); return builder; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy