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