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 * UnpublishChangeBuilder 011 * <hr> 012 * Example to create an instance using the builder pattern 013 * <div class=code-example> 014 * <pre><code class='java'> 015 * UnpublishChange unpublishChange = UnpublishChange.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 UnpublishChangeBuilder implements Builder<UnpublishChange> { 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 UnpublishChangeBuilder 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 UnpublishChange with checking for non-null required values 048 * @return UnpublishChange 049 */ 050 public UnpublishChange build() { 051 Objects.requireNonNull(change, UnpublishChange.class + ": change is missing"); 052 return new UnpublishChangeImpl(change); 053 } 054 055 /** 056 * builds UnpublishChange without checking for non-null required values 057 * @return UnpublishChange 058 */ 059 public UnpublishChange buildUnchecked() { 060 return new UnpublishChangeImpl(change); 061 } 062 063 /** 064 * factory method for an instance of UnpublishChangeBuilder 065 * @return builder 066 */ 067 public static UnpublishChangeBuilder of() { 068 return new UnpublishChangeBuilder(); 069 } 070 071 /** 072 * create builder for UnpublishChange instance 073 * @param template instance with prefilled values for the builder 074 * @return builder 075 */ 076 public static UnpublishChangeBuilder of(final UnpublishChange template) { 077 UnpublishChangeBuilder builder = new UnpublishChangeBuilder(); 078 builder.change = template.getChange(); 079 return builder; 080 } 081 082}