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