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