001 002package com.commercetools.api.models.message; 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 * CustomerLastNameSetMessagePayloadBuilder 013 * <hr> 014 * Example to create an instance using the builder pattern 015 * <div class=code-example> 016 * <pre><code class='java'> 017 * CustomerLastNameSetMessagePayload customerLastNameSetMessagePayload = CustomerLastNameSetMessagePayload.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 CustomerLastNameSetMessagePayloadBuilder implements Builder<CustomerLastNameSetMessagePayload> { 024 025 @Nullable 026 private String lastName; 027 028 /** 029 * <p>The <code>lastName</code> that was set during the Set Last Name update action.</p> 030 * @param lastName value to be set 031 * @return Builder 032 */ 033 034 public CustomerLastNameSetMessagePayloadBuilder lastName(@Nullable final String lastName) { 035 this.lastName = lastName; 036 return this; 037 } 038 039 /** 040 * <p>The <code>lastName</code> that was set during the Set Last Name update action.</p> 041 * @return lastName 042 */ 043 044 @Nullable 045 public String getLastName() { 046 return this.lastName; 047 } 048 049 /** 050 * builds CustomerLastNameSetMessagePayload with checking for non-null required values 051 * @return CustomerLastNameSetMessagePayload 052 */ 053 public CustomerLastNameSetMessagePayload build() { 054 return new CustomerLastNameSetMessagePayloadImpl(lastName); 055 } 056 057 /** 058 * builds CustomerLastNameSetMessagePayload without checking for non-null required values 059 * @return CustomerLastNameSetMessagePayload 060 */ 061 public CustomerLastNameSetMessagePayload buildUnchecked() { 062 return new CustomerLastNameSetMessagePayloadImpl(lastName); 063 } 064 065 /** 066 * factory method for an instance of CustomerLastNameSetMessagePayloadBuilder 067 * @return builder 068 */ 069 public static CustomerLastNameSetMessagePayloadBuilder of() { 070 return new CustomerLastNameSetMessagePayloadBuilder(); 071 } 072 073 /** 074 * create builder for CustomerLastNameSetMessagePayload instance 075 * @param template instance with prefilled values for the builder 076 * @return builder 077 */ 078 public static CustomerLastNameSetMessagePayloadBuilder of(final CustomerLastNameSetMessagePayload template) { 079 CustomerLastNameSetMessagePayloadBuilder builder = new CustomerLastNameSetMessagePayloadBuilder(); 080 builder.lastName = template.getLastName(); 081 return builder; 082 } 083 084}