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 Set TextLineItem CustomField update action.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class SetTextLineItemCustomFieldChangeImpl implements SetTextLineItemCustomFieldChange, ModelBase { 022 023 private String type; 024 025 private String change; 026 027 private java.lang.Object previousValue; 028 029 private java.lang.Object nextValue; 030 031 private String name; 032 033 private String customTypeId; 034 035 private com.commercetools.history.models.change_value.TextLineItemValue textLineItem; 036 037 /** 038 * create instance with all properties 039 */ 040 @JsonCreator 041 SetTextLineItemCustomFieldChangeImpl(@JsonProperty("change") final String change, 042 @JsonProperty("previousValue") final java.lang.Object previousValue, 043 @JsonProperty("nextValue") final java.lang.Object nextValue, @JsonProperty("name") final String name, 044 @JsonProperty("customTypeId") final String customTypeId, 045 @JsonProperty("textLineItem") final com.commercetools.history.models.change_value.TextLineItemValue textLineItem) { 046 this.change = change; 047 this.previousValue = previousValue; 048 this.nextValue = nextValue; 049 this.name = name; 050 this.customTypeId = customTypeId; 051 this.textLineItem = textLineItem; 052 this.type = SET_TEXT_LINE_ITEM_CUSTOM_FIELD_CHANGE; 053 } 054 055 /** 056 * create empty instance 057 */ 058 public SetTextLineItemCustomFieldChangeImpl() { 059 this.type = SET_TEXT_LINE_ITEM_CUSTOM_FIELD_CHANGE; 060 } 061 062 /** 063 * 064 */ 065 066 public String getType() { 067 return this.type; 068 } 069 070 /** 071 * 072 */ 073 074 public String getChange() { 075 return this.change; 076 } 077 078 /** 079 * <p>Value before the change.</p> 080 */ 081 082 public java.lang.Object getPreviousValue() { 083 return this.previousValue; 084 } 085 086 /** 087 * <p>Value after the change.</p> 088 */ 089 090 public java.lang.Object getNextValue() { 091 return this.nextValue; 092 } 093 094 /** 095 * <p>Name of the Custom Field.</p> 096 */ 097 098 public String getName() { 099 return this.name; 100 } 101 102 /** 103 * <p><code>id</code> of the referenced Type.</p> 104 */ 105 106 public String getCustomTypeId() { 107 return this.customTypeId; 108 } 109 110 /** 111 * <p>Holds information about the updated Text Line Item.</p> 112 */ 113 114 public com.commercetools.history.models.change_value.TextLineItemValue getTextLineItem() { 115 return this.textLineItem; 116 } 117 118 public void setChange(final String change) { 119 this.change = change; 120 } 121 122 public void setPreviousValue(final java.lang.Object previousValue) { 123 this.previousValue = previousValue; 124 } 125 126 public void setNextValue(final java.lang.Object nextValue) { 127 this.nextValue = nextValue; 128 } 129 130 public void setName(final String name) { 131 this.name = name; 132 } 133 134 public void setCustomTypeId(final String customTypeId) { 135 this.customTypeId = customTypeId; 136 } 137 138 public void setTextLineItem(final com.commercetools.history.models.change_value.TextLineItemValue textLineItem) { 139 this.textLineItem = textLineItem; 140 } 141 142 @Override 143 public boolean equals(Object o) { 144 if (this == o) 145 return true; 146 147 if (o == null || getClass() != o.getClass()) 148 return false; 149 150 SetTextLineItemCustomFieldChangeImpl that = (SetTextLineItemCustomFieldChangeImpl) o; 151 152 return new EqualsBuilder().append(type, that.type) 153 .append(change, that.change) 154 .append(previousValue, that.previousValue) 155 .append(nextValue, that.nextValue) 156 .append(name, that.name) 157 .append(customTypeId, that.customTypeId) 158 .append(textLineItem, that.textLineItem) 159 .append(type, that.type) 160 .append(change, that.change) 161 .append(previousValue, that.previousValue) 162 .append(nextValue, that.nextValue) 163 .append(name, that.name) 164 .append(customTypeId, that.customTypeId) 165 .append(textLineItem, that.textLineItem) 166 .isEquals(); 167 } 168 169 @Override 170 public int hashCode() { 171 return new HashCodeBuilder(17, 37).append(type) 172 .append(change) 173 .append(previousValue) 174 .append(nextValue) 175 .append(name) 176 .append(customTypeId) 177 .append(textLineItem) 178 .toHashCode(); 179 } 180 181}