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 Change the label of an EnumValue update action.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class ChangePlainEnumValueLabelChangeImpl implements ChangePlainEnumValueLabelChange, ModelBase { 022 023 private String type; 024 025 private String change; 026 027 private String previousValue; 028 029 private String nextValue; 030 031 private String attributeName; 032 033 private String valueKey; 034 035 /** 036 * create instance with all properties 037 */ 038 @JsonCreator 039 ChangePlainEnumValueLabelChangeImpl(@JsonProperty("change") final String change, 040 @JsonProperty("previousValue") final String previousValue, 041 @JsonProperty("nextValue") final String nextValue, 042 @JsonProperty("attributeName") final String attributeName, 043 @JsonProperty("valueKey") final String valueKey) { 044 this.change = change; 045 this.previousValue = previousValue; 046 this.nextValue = nextValue; 047 this.attributeName = attributeName; 048 this.valueKey = valueKey; 049 this.type = CHANGE_PLAIN_ENUM_VALUE_LABEL_CHANGE; 050 } 051 052 /** 053 * create empty instance 054 */ 055 public ChangePlainEnumValueLabelChangeImpl() { 056 this.type = CHANGE_PLAIN_ENUM_VALUE_LABEL_CHANGE; 057 } 058 059 /** 060 * 061 */ 062 063 public String getType() { 064 return this.type; 065 } 066 067 /** 068 * 069 */ 070 071 public String getChange() { 072 return this.change; 073 } 074 075 /** 076 * <p>Value before the change.</p> 077 */ 078 079 public String getPreviousValue() { 080 return this.previousValue; 081 } 082 083 /** 084 * <p>Value after the change.</p> 085 */ 086 087 public String getNextValue() { 088 return this.nextValue; 089 } 090 091 /** 092 * <p>Name of the updated AttributeDefinition.</p> 093 */ 094 095 public String getAttributeName() { 096 return this.attributeName; 097 } 098 099 /** 100 * <p>Key of the updated values.</p> 101 */ 102 103 public String getValueKey() { 104 return this.valueKey; 105 } 106 107 public void setChange(final String change) { 108 this.change = change; 109 } 110 111 public void setPreviousValue(final String previousValue) { 112 this.previousValue = previousValue; 113 } 114 115 public void setNextValue(final String nextValue) { 116 this.nextValue = nextValue; 117 } 118 119 public void setAttributeName(final String attributeName) { 120 this.attributeName = attributeName; 121 } 122 123 public void setValueKey(final String valueKey) { 124 this.valueKey = valueKey; 125 } 126 127 @Override 128 public boolean equals(Object o) { 129 if (this == o) 130 return true; 131 132 if (o == null || getClass() != o.getClass()) 133 return false; 134 135 ChangePlainEnumValueLabelChangeImpl that = (ChangePlainEnumValueLabelChangeImpl) o; 136 137 return new EqualsBuilder().append(type, that.type) 138 .append(change, that.change) 139 .append(previousValue, that.previousValue) 140 .append(nextValue, that.nextValue) 141 .append(attributeName, that.attributeName) 142 .append(valueKey, that.valueKey) 143 .append(type, that.type) 144 .append(change, that.change) 145 .append(previousValue, that.previousValue) 146 .append(nextValue, that.nextValue) 147 .append(attributeName, that.attributeName) 148 .append(valueKey, that.valueKey) 149 .isEquals(); 150 } 151 152 @Override 153 public int hashCode() { 154 return new HashCodeBuilder(17, 37).append(type) 155 .append(change) 156 .append(previousValue) 157 .append(nextValue) 158 .append(attributeName) 159 .append(valueKey) 160 .toHashCode(); 161 } 162 163}