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 * SetCustomLineItemTaxedPriceChange 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class SetCustomLineItemTaxedPriceChangeImpl implements SetCustomLineItemTaxedPriceChange, ModelBase { 022 023 private String type; 024 025 private String change; 026 027 private com.commercetools.history.models.common.Money previousValue; 028 029 private com.commercetools.history.models.common.Money nextValue; 030 031 private com.commercetools.history.models.common.LocalizedString customLineItem; 032 033 private String customLineItemId; 034 035 /** 036 * create instance with all properties 037 */ 038 @JsonCreator 039 SetCustomLineItemTaxedPriceChangeImpl(@JsonProperty("change") final String change, 040 @JsonProperty("previousValue") final com.commercetools.history.models.common.Money previousValue, 041 @JsonProperty("nextValue") final com.commercetools.history.models.common.Money nextValue, 042 @JsonProperty("customLineItem") final com.commercetools.history.models.common.LocalizedString customLineItem, 043 @JsonProperty("customLineItemId") final String customLineItemId) { 044 this.change = change; 045 this.previousValue = previousValue; 046 this.nextValue = nextValue; 047 this.customLineItem = customLineItem; 048 this.customLineItemId = customLineItemId; 049 this.type = SET_CUSTOM_LINE_ITEM_TAXED_PRICE_CHANGE; 050 } 051 052 /** 053 * create empty instance 054 */ 055 public SetCustomLineItemTaxedPriceChangeImpl() { 056 this.type = SET_CUSTOM_LINE_ITEM_TAXED_PRICE_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 com.commercetools.history.models.common.Money getPreviousValue() { 080 return this.previousValue; 081 } 082 083 /** 084 * <p>Value after the change.</p> 085 */ 086 087 public com.commercetools.history.models.common.Money getNextValue() { 088 return this.nextValue; 089 } 090 091 /** 092 * <p>Name of the updated CustomLineItem.</p> 093 */ 094 095 public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { 096 return this.customLineItem; 097 } 098 099 /** 100 * <p><code>id</code> of the updated CustomLineItem.</p> 101 */ 102 103 public String getCustomLineItemId() { 104 return this.customLineItemId; 105 } 106 107 public void setChange(final String change) { 108 this.change = change; 109 } 110 111 public void setPreviousValue(final com.commercetools.history.models.common.Money previousValue) { 112 this.previousValue = previousValue; 113 } 114 115 public void setNextValue(final com.commercetools.history.models.common.Money nextValue) { 116 this.nextValue = nextValue; 117 } 118 119 public void setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { 120 this.customLineItem = customLineItem; 121 } 122 123 public void setCustomLineItemId(final String customLineItemId) { 124 this.customLineItemId = customLineItemId; 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 SetCustomLineItemTaxedPriceChangeImpl that = (SetCustomLineItemTaxedPriceChangeImpl) 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(customLineItem, that.customLineItem) 142 .append(customLineItemId, that.customLineItemId) 143 .append(type, that.type) 144 .append(change, that.change) 145 .append(previousValue, that.previousValue) 146 .append(nextValue, that.nextValue) 147 .append(customLineItem, that.customLineItem) 148 .append(customLineItemId, that.customLineItemId) 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(customLineItem) 159 .append(customLineItemId) 160 .toHashCode(); 161 } 162 163}