001 002package com.commercetools.history.models.change; 003 004import java.time.*; 005import java.util.*; 006import java.util.function.Function; 007 008import javax.annotation.Nullable; 009import javax.validation.constraints.NotNull; 010 011import com.fasterxml.jackson.annotation.*; 012import com.fasterxml.jackson.databind.annotation.*; 013 014import io.vrap.rmf.base.client.utils.Generated; 015 016/** 017 * <p>Change triggered by the Set Company Name update action.</p> 018 * 019 * <hr> 020 * Example to create an instance using the builder pattern 021 * <div class=code-example> 022 * <pre><code class='java'> 023 * SetCompanyNameChange setCompanyNameChange = SetCompanyNameChange.builder() 024 * .change("{change}") 025 * .previousValue("{previousValue}") 026 * .nextValue("{nextValue}") 027 * .build() 028 * </code></pre> 029 * </div> 030 */ 031@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 032@JsonDeserialize(as = SetCompanyNameChangeImpl.class) 033public interface SetCompanyNameChange extends Change { 034 035 /** 036 * discriminator value for SetCompanyNameChange 037 */ 038 String SET_COMPANY_NAME_CHANGE = "SetCompanyNameChange"; 039 040 /** 041 * 042 * @return type 043 */ 044 @NotNull 045 @JsonProperty("type") 046 public String getType(); 047 048 /** 049 * 050 * @return change 051 */ 052 @NotNull 053 @JsonProperty("change") 054 public String getChange(); 055 056 /** 057 * <p>Value before the change.</p> 058 * @return previousValue 059 */ 060 @NotNull 061 @JsonProperty("previousValue") 062 public String getPreviousValue(); 063 064 /** 065 * <p>Value after the change.</p> 066 * @return nextValue 067 */ 068 @NotNull 069 @JsonProperty("nextValue") 070 public String getNextValue(); 071 072 /** 073 * set change 074 * @param change value to be set 075 */ 076 077 public void setChange(final String change); 078 079 /** 080 * <p>Value before the change.</p> 081 * @param previousValue value to be set 082 */ 083 084 public void setPreviousValue(final String previousValue); 085 086 /** 087 * <p>Value after the change.</p> 088 * @param nextValue value to be set 089 */ 090 091 public void setNextValue(final String nextValue); 092 093 /** 094 * factory method 095 * @return instance of SetCompanyNameChange 096 */ 097 public static SetCompanyNameChange of() { 098 return new SetCompanyNameChangeImpl(); 099 } 100 101 /** 102 * factory method to create a shallow copy SetCompanyNameChange 103 * @param template instance to be copied 104 * @return copy instance 105 */ 106 public static SetCompanyNameChange of(final SetCompanyNameChange template) { 107 SetCompanyNameChangeImpl instance = new SetCompanyNameChangeImpl(); 108 instance.setChange(template.getChange()); 109 instance.setPreviousValue(template.getPreviousValue()); 110 instance.setNextValue(template.getNextValue()); 111 return instance; 112 } 113 114 /** 115 * factory method to create a deep copy of SetCompanyNameChange 116 * @param template instance to be copied 117 * @return copy instance 118 */ 119 @Nullable 120 public static SetCompanyNameChange deepCopy(@Nullable final SetCompanyNameChange template) { 121 if (template == null) { 122 return null; 123 } 124 SetCompanyNameChangeImpl instance = new SetCompanyNameChangeImpl(); 125 instance.setChange(template.getChange()); 126 instance.setPreviousValue(template.getPreviousValue()); 127 instance.setNextValue(template.getNextValue()); 128 return instance; 129 } 130 131 /** 132 * builder factory method for SetCompanyNameChange 133 * @return builder 134 */ 135 public static SetCompanyNameChangeBuilder builder() { 136 return SetCompanyNameChangeBuilder.of(); 137 } 138 139 /** 140 * create builder for SetCompanyNameChange instance 141 * @param template instance with prefilled values for the builder 142 * @return builder 143 */ 144 public static SetCompanyNameChangeBuilder builder(final SetCompanyNameChange template) { 145 return SetCompanyNameChangeBuilder.of(template); 146 } 147 148 /** 149 * accessor map function 150 * @param <T> mapped type 151 * @param helper function to map the object 152 * @return mapped value 153 */ 154 default <T> T withSetCompanyNameChange(Function<SetCompanyNameChange, T> helper) { 155 return helper.apply(this); 156 } 157 158 /** 159 * gives a TypeReference for usage with Jackson DataBind 160 * @return TypeReference 161 */ 162 public static com.fasterxml.jackson.core.type.TypeReference<SetCompanyNameChange> typeReference() { 163 return new com.fasterxml.jackson.core.type.TypeReference<SetCompanyNameChange>() { 164 @Override 165 public String toString() { 166 return "TypeReference<SetCompanyNameChange>"; 167 } 168 }; 169 } 170}