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 Description on Cart Discounts.</li> 021 * <li>Set Description on Categories.</li> 022 * <li>Set Description on Discount Codes.</li> 023 * <li>Set Description on Products.</li> 024 * <li>Set Description on Product Discounts.</li> 025 * <li>Set Description on Shopping Lists.</li> 026 * <li>Set Description on States.</li> 027 * <li>Set Description on Tax Categories.</li> 028 * <li>Set Description on Types.</li> 029 * <li>Set Description on Zones.</li> 030 * </ul> 031 */ 032@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 033public class SetDescriptionChangeImpl implements SetDescriptionChange, ModelBase { 034 035 private String type; 036 037 private String change; 038 039 private String previousValue; 040 041 private String nextValue; 042 043 /** 044 * create instance with all properties 045 */ 046 @JsonCreator 047 SetDescriptionChangeImpl(@JsonProperty("change") final String change, 048 @JsonProperty("previousValue") final String previousValue, 049 @JsonProperty("nextValue") final String nextValue) { 050 this.change = change; 051 this.previousValue = previousValue; 052 this.nextValue = nextValue; 053 this.type = SET_DESCRIPTION_CHANGE; 054 } 055 056 /** 057 * create empty instance 058 */ 059 public SetDescriptionChangeImpl() { 060 this.type = SET_DESCRIPTION_CHANGE; 061 } 062 063 /** 064 * 065 */ 066 067 public String getType() { 068 return this.type; 069 } 070 071 /** 072 * 073 */ 074 075 public String getChange() { 076 return this.change; 077 } 078 079 /** 080 * <p>Value before the change.</p> 081 */ 082 083 public String getPreviousValue() { 084 return this.previousValue; 085 } 086 087 /** 088 * <p>Value after the change.</p> 089 */ 090 091 public String getNextValue() { 092 return this.nextValue; 093 } 094 095 public void setChange(final String change) { 096 this.change = change; 097 } 098 099 public void setPreviousValue(final String previousValue) { 100 this.previousValue = previousValue; 101 } 102 103 public void setNextValue(final String nextValue) { 104 this.nextValue = nextValue; 105 } 106 107 @Override 108 public boolean equals(Object o) { 109 if (this == o) 110 return true; 111 112 if (o == null || getClass() != o.getClass()) 113 return false; 114 115 SetDescriptionChangeImpl that = (SetDescriptionChangeImpl) o; 116 117 return new EqualsBuilder().append(type, that.type) 118 .append(change, that.change) 119 .append(previousValue, that.previousValue) 120 .append(nextValue, that.nextValue) 121 .append(type, that.type) 122 .append(change, that.change) 123 .append(previousValue, that.previousValue) 124 .append(nextValue, that.nextValue) 125 .isEquals(); 126 } 127 128 @Override 129 public int hashCode() { 130 return new HashCodeBuilder(17, 37).append(type) 131 .append(change) 132 .append(previousValue) 133 .append(nextValue) 134 .toHashCode(); 135 } 136 137}