001 002package com.commercetools.history.models.change; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.annotation.JsonProperty; 009import com.fasterxml.jackson.databind.annotation.*; 010 011import io.vrap.rmf.base.client.ModelBase; 012import io.vrap.rmf.base.client.utils.Generated; 013 014import org.apache.commons.lang3.builder.EqualsBuilder; 015import org.apache.commons.lang3.builder.HashCodeBuilder; 016 017/** 018 * <p>Change triggered by the following update actions:</p> 019 * <ul> 020 * <li>Set CustomLineItem Custom Type on Orders.</li> 021 * <li>Set CustomLineItem Custom Type on Staged Orders.</li> 022 * </ul> 023 */ 024@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 025public class SetCustomLineItemCustomFieldChangeImpl implements SetCustomLineItemCustomFieldChange, ModelBase { 026 027 private String type; 028 029 private String change; 030 031 private java.lang.Object previousValue; 032 033 private java.lang.Object nextValue; 034 035 private String name; 036 037 private com.commercetools.history.models.common.LocalizedString customLineItem; 038 039 private String customLineItemId; 040 041 /** 042 * create instance with all properties 043 */ 044 @JsonCreator 045 SetCustomLineItemCustomFieldChangeImpl(@JsonProperty("change") final String change, 046 @JsonProperty("previousValue") final java.lang.Object previousValue, 047 @JsonProperty("nextValue") final java.lang.Object nextValue, @JsonProperty("name") final String name, 048 @JsonProperty("customLineItem") final com.commercetools.history.models.common.LocalizedString customLineItem, 049 @JsonProperty("customLineItemId") final String customLineItemId) { 050 this.change = change; 051 this.previousValue = previousValue; 052 this.nextValue = nextValue; 053 this.name = name; 054 this.customLineItem = customLineItem; 055 this.customLineItemId = customLineItemId; 056 this.type = SET_CUSTOM_LINE_ITEM_CUSTOM_FIELD_CHANGE; 057 } 058 059 /** 060 * create empty instance 061 */ 062 public SetCustomLineItemCustomFieldChangeImpl() { 063 this.type = SET_CUSTOM_LINE_ITEM_CUSTOM_FIELD_CHANGE; 064 } 065 066 /** 067 * 068 */ 069 070 public String getType() { 071 return this.type; 072 } 073 074 /** 075 * 076 */ 077 078 public String getChange() { 079 return this.change; 080 } 081 082 /** 083 * <p>Value before the change.</p> 084 */ 085 086 public java.lang.Object getPreviousValue() { 087 return this.previousValue; 088 } 089 090 /** 091 * <p>Value after the change.</p> 092 */ 093 094 public java.lang.Object getNextValue() { 095 return this.nextValue; 096 } 097 098 /** 099 * <p>Name of the Custom Field.</p> 100 */ 101 102 public String getName() { 103 return this.name; 104 } 105 106 /** 107 * <p>Name of the updated CustomLineItem.</p> 108 */ 109 110 public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { 111 return this.customLineItem; 112 } 113 114 /** 115 * <p><code>id</code> of the updated CustomLineItem.</p> 116 */ 117 118 public String getCustomLineItemId() { 119 return this.customLineItemId; 120 } 121 122 public void setChange(final String change) { 123 this.change = change; 124 } 125 126 public void setPreviousValue(final java.lang.Object previousValue) { 127 this.previousValue = previousValue; 128 } 129 130 public void setNextValue(final java.lang.Object nextValue) { 131 this.nextValue = nextValue; 132 } 133 134 public void setName(final String name) { 135 this.name = name; 136 } 137 138 public void setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { 139 this.customLineItem = customLineItem; 140 } 141 142 public void setCustomLineItemId(final String customLineItemId) { 143 this.customLineItemId = customLineItemId; 144 } 145 146 @Override 147 public boolean equals(Object o) { 148 if (this == o) 149 return true; 150 151 if (o == null || getClass() != o.getClass()) 152 return false; 153 154 SetCustomLineItemCustomFieldChangeImpl that = (SetCustomLineItemCustomFieldChangeImpl) o; 155 156 return new EqualsBuilder().append(type, that.type) 157 .append(change, that.change) 158 .append(previousValue, that.previousValue) 159 .append(nextValue, that.nextValue) 160 .append(name, that.name) 161 .append(customLineItem, that.customLineItem) 162 .append(customLineItemId, that.customLineItemId) 163 .append(type, that.type) 164 .append(change, that.change) 165 .append(previousValue, that.previousValue) 166 .append(nextValue, that.nextValue) 167 .append(name, that.name) 168 .append(customLineItem, that.customLineItem) 169 .append(customLineItemId, that.customLineItemId) 170 .isEquals(); 171 } 172 173 @Override 174 public int hashCode() { 175 return new HashCodeBuilder(17, 37).append(type) 176 .append(change) 177 .append(previousValue) 178 .append(nextValue) 179 .append(name) 180 .append(customLineItem) 181 .append(customLineItemId) 182 .toHashCode(); 183 } 184 185}