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