001
002package com.commercetools.ml.models.common;
003
004import java.time.*;
005import java.util.*;
006import java.util.function.Function;
007
008import javax.validation.constraints.NotNull;
009
010import com.fasterxml.jackson.annotation.*;
011import com.fasterxml.jackson.databind.annotation.*;
012
013import io.vrap.rmf.base.client.utils.Generated;
014
015/**
016 * LocalizedString
017 *
018 * <hr>
019 * Example to create an instance using the builder pattern
020 * <div class=code-example>
021 * <pre><code class='java'>
022 *     LocalizedString localizedString = LocalizedString.builder()
023 *             ./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
024 *             .build()
025 * </code></pre>
026 * </div>
027 */
028@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
029@JsonDeserialize(as = LocalizedStringImpl.class)
030public interface LocalizedString {
031
032    /**
033     *
034     */
035    @NotNull
036    @JsonAnyGetter
037    public Map<String, String> values();
038
039    @JsonAnySetter
040    public void setValue(String key, String value);
041
042    public static LocalizedString of() {
043        return new LocalizedStringImpl();
044    }
045
046    public static LocalizedString of(final LocalizedString template) {
047        LocalizedStringImpl instance = new LocalizedStringImpl();
048        return instance;
049    }
050
051    public static LocalizedStringBuilder builder() {
052        return LocalizedStringBuilder.of();
053    }
054
055    public static LocalizedStringBuilder builder(final LocalizedString template) {
056        return LocalizedStringBuilder.of(template);
057    }
058
059    default <T> T withLocalizedString(Function<LocalizedString, T> helper) {
060        return helper.apply(this);
061    }
062
063    public static com.fasterxml.jackson.core.type.TypeReference<LocalizedString> typeReference() {
064        return new com.fasterxml.jackson.core.type.TypeReference<LocalizedString>() {
065            @Override
066            public String toString() {
067                return "TypeReference<LocalizedString>";
068            }
069        };
070    }
071}