001
002package com.commercetools.api.models.business_unit;
003
004import java.util.*;
005
006import io.vrap.rmf.base.client.Builder;
007import io.vrap.rmf.base.client.utils.Generated;
008
009/**
010 * BusinessUnitChangeNameActionBuilder
011 * <hr>
012 * Example to create an instance using the builder pattern
013 * <div class=code-example>
014 * <pre><code class='java'>
015 *     BusinessUnitChangeNameAction businessUnitChangeNameAction = BusinessUnitChangeNameAction.builder()
016 *             .name("{name}")
017 *             .build()
018 * </code></pre>
019 * </div>
020 */
021@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
022public class BusinessUnitChangeNameActionBuilder implements Builder<BusinessUnitChangeNameAction> {
023
024    private String name;
025
026    /**
027     *  <p>New name to set.</p>
028     * @param name value to be set
029     * @return Builder
030     */
031
032    public BusinessUnitChangeNameActionBuilder name(final String name) {
033        this.name = name;
034        return this;
035    }
036
037    /**
038     *  <p>New name to set.</p>
039     * @return name
040     */
041
042    public String getName() {
043        return this.name;
044    }
045
046    /**
047     * builds BusinessUnitChangeNameAction with checking for non-null required values
048     * @return BusinessUnitChangeNameAction
049     */
050    public BusinessUnitChangeNameAction build() {
051        Objects.requireNonNull(name, BusinessUnitChangeNameAction.class + ": name is missing");
052        return new BusinessUnitChangeNameActionImpl(name);
053    }
054
055    /**
056     * builds BusinessUnitChangeNameAction without checking for non-null required values
057     * @return BusinessUnitChangeNameAction
058     */
059    public BusinessUnitChangeNameAction buildUnchecked() {
060        return new BusinessUnitChangeNameActionImpl(name);
061    }
062
063    /**
064     * factory method for an instance of BusinessUnitChangeNameActionBuilder
065     * @return builder
066     */
067    public static BusinessUnitChangeNameActionBuilder of() {
068        return new BusinessUnitChangeNameActionBuilder();
069    }
070
071    /**
072     * create builder for BusinessUnitChangeNameAction instance
073     * @param template instance with prefilled values for the builder
074     * @return builder
075     */
076    public static BusinessUnitChangeNameActionBuilder of(final BusinessUnitChangeNameAction template) {
077        BusinessUnitChangeNameActionBuilder builder = new BusinessUnitChangeNameActionBuilder();
078        builder.name = template.getName();
079        return builder;
080    }
081
082}