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

com.commercetools.history.models.change_value.LocalizedEnumValue Maven / Gradle / Ivy

There is a newer version: 17.15.1
Show newest version

package com.commercetools.history.models.change_value;

import java.time.*;
import java.util.*;
import java.util.function.Function;

import javax.annotation.Nullable;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import com.commercetools.history.models.common.LocalizedString;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

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

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

 *     LocalizedEnumValue localizedEnumValue = LocalizedEnumValue.builder()
 *             .key("{key}")
 *             .label(labelBuilder -> labelBuilder)
 *             .build()
 * 
*
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = LocalizedEnumValueImpl.class) public interface LocalizedEnumValue { /** *

Key of the value used as a programmatic identifier.

* @return key */ @NotNull @JsonProperty("key") public String getKey(); /** *

Descriptive localized label of the value.

* @return label */ @NotNull @Valid @JsonProperty("label") public LocalizedString getLabel(); /** *

Key of the value used as a programmatic identifier.

* @param key value to be set */ public void setKey(final String key); /** *

Descriptive localized label of the value.

* @param label value to be set */ public void setLabel(final LocalizedString label); /** * factory method * @return instance of LocalizedEnumValue */ public static LocalizedEnumValue of() { return new LocalizedEnumValueImpl(); } /** * factory method to create a shallow copy LocalizedEnumValue * @param template instance to be copied * @return copy instance */ public static LocalizedEnumValue of(final LocalizedEnumValue template) { LocalizedEnumValueImpl instance = new LocalizedEnumValueImpl(); instance.setKey(template.getKey()); instance.setLabel(template.getLabel()); return instance; } /** * factory method to create a deep copy of LocalizedEnumValue * @param template instance to be copied * @return copy instance */ @Nullable public static LocalizedEnumValue deepCopy(@Nullable final LocalizedEnumValue template) { if (template == null) { return null; } LocalizedEnumValueImpl instance = new LocalizedEnumValueImpl(); instance.setKey(template.getKey()); instance.setLabel(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLabel())); return instance; } /** * builder factory method for LocalizedEnumValue * @return builder */ public static LocalizedEnumValueBuilder builder() { return LocalizedEnumValueBuilder.of(); } /** * create builder for LocalizedEnumValue instance * @param template instance with prefilled values for the builder * @return builder */ public static LocalizedEnumValueBuilder builder(final LocalizedEnumValue template) { return LocalizedEnumValueBuilder.of(template); } /** * accessor map function * @param mapped type * @param helper function to map the object * @return mapped value */ default T withLocalizedEnumValue(Function helper) { return helper.apply(this); } /** * gives a TypeReference for usage with Jackson DataBind * @return TypeReference */ public static com.fasterxml.jackson.core.type.TypeReference typeReference() { return new com.fasterxml.jackson.core.type.TypeReference() { @Override public String toString() { return "TypeReference"; } }; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy