001
002package com.commercetools.api.models.category;
003
004import java.util.*;
005import java.util.function.Function;
006
007import javax.annotation.Nullable;
008
009import io.vrap.rmf.base.client.Builder;
010import io.vrap.rmf.base.client.utils.Generated;
011
012/**
013 * CategorySetMetaTitleActionBuilder
014 * <hr>
015 * Example to create an instance using the builder pattern
016 * <div class=code-example>
017 * <pre><code class='java'>
018 *     CategorySetMetaTitleAction categorySetMetaTitleAction = CategorySetMetaTitleAction.builder()
019 *             .build()
020 * </code></pre>
021 * </div>
022 */
023@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
024public class CategorySetMetaTitleActionBuilder implements Builder<CategorySetMetaTitleAction> {
025
026    @Nullable
027    private com.commercetools.api.models.common.LocalizedString metaTitle;
028
029    /**
030     *  <p>Value to set.</p>
031     * @param builder function to build the metaTitle value
032     * @return Builder
033     */
034
035    public CategorySetMetaTitleActionBuilder metaTitle(
036            Function<com.commercetools.api.models.common.LocalizedStringBuilder, com.commercetools.api.models.common.LocalizedStringBuilder> builder) {
037        this.metaTitle = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of()).build();
038        return this;
039    }
040
041    /**
042     *  <p>Value to set.</p>
043     * @param builder function to build the metaTitle value
044     * @return Builder
045     */
046
047    public CategorySetMetaTitleActionBuilder withMetaTitle(
048            Function<com.commercetools.api.models.common.LocalizedStringBuilder, com.commercetools.api.models.common.LocalizedString> builder) {
049        this.metaTitle = builder.apply(com.commercetools.api.models.common.LocalizedStringBuilder.of());
050        return this;
051    }
052
053    /**
054     *  <p>Value to set.</p>
055     * @param metaTitle value to be set
056     * @return Builder
057     */
058
059    public CategorySetMetaTitleActionBuilder metaTitle(
060            @Nullable final com.commercetools.api.models.common.LocalizedString metaTitle) {
061        this.metaTitle = metaTitle;
062        return this;
063    }
064
065    /**
066     *  <p>Value to set.</p>
067     * @return metaTitle
068     */
069
070    @Nullable
071    public com.commercetools.api.models.common.LocalizedString getMetaTitle() {
072        return this.metaTitle;
073    }
074
075    /**
076     * builds CategorySetMetaTitleAction with checking for non-null required values
077     * @return CategorySetMetaTitleAction
078     */
079    public CategorySetMetaTitleAction build() {
080        return new CategorySetMetaTitleActionImpl(metaTitle);
081    }
082
083    /**
084     * builds CategorySetMetaTitleAction without checking for non-null required values
085     * @return CategorySetMetaTitleAction
086     */
087    public CategorySetMetaTitleAction buildUnchecked() {
088        return new CategorySetMetaTitleActionImpl(metaTitle);
089    }
090
091    /**
092     * factory method for an instance of CategorySetMetaTitleActionBuilder
093     * @return builder
094     */
095    public static CategorySetMetaTitleActionBuilder of() {
096        return new CategorySetMetaTitleActionBuilder();
097    }
098
099    /**
100     * create builder for CategorySetMetaTitleAction instance
101     * @param template instance with prefilled values for the builder
102     * @return builder
103     */
104    public static CategorySetMetaTitleActionBuilder of(final CategorySetMetaTitleAction template) {
105        CategorySetMetaTitleActionBuilder builder = new CategorySetMetaTitleActionBuilder();
106        builder.metaTitle = template.getMetaTitle();
107        return builder;
108    }
109
110}