001 002package com.commercetools.api.models.message; 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>Generated after a successful Set ShippingRateInput update action.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class OrderShippingRateInputSetMessagePayloadImpl implements OrderShippingRateInputSetMessagePayload, ModelBase { 022 023 private String type; 024 025 private com.commercetools.api.models.cart.ShippingRateInput shippingRateInput; 026 027 private com.commercetools.api.models.cart.ShippingRateInput oldShippingRateInput; 028 029 /** 030 * create instance with all properties 031 */ 032 @JsonCreator 033 OrderShippingRateInputSetMessagePayloadImpl( 034 @JsonProperty("shippingRateInput") final com.commercetools.api.models.cart.ShippingRateInput shippingRateInput, 035 @JsonProperty("oldShippingRateInput") final com.commercetools.api.models.cart.ShippingRateInput oldShippingRateInput) { 036 this.shippingRateInput = shippingRateInput; 037 this.oldShippingRateInput = oldShippingRateInput; 038 this.type = ORDER_SHIPPING_RATE_INPUT_SET; 039 } 040 041 /** 042 * create empty instance 043 */ 044 public OrderShippingRateInputSetMessagePayloadImpl() { 045 this.type = ORDER_SHIPPING_RATE_INPUT_SET; 046 } 047 048 /** 049 * 050 */ 051 052 public String getType() { 053 return this.type; 054 } 055 056 /** 057 * <p>ShippingRateInput after the Set ShippingRateInput update action.</p> 058 */ 059 060 public com.commercetools.api.models.cart.ShippingRateInput getShippingRateInput() { 061 return this.shippingRateInput; 062 } 063 064 /** 065 * <p>ShippingRateInput before the Set ShippingRateInput update action.</p> 066 */ 067 068 public com.commercetools.api.models.cart.ShippingRateInput getOldShippingRateInput() { 069 return this.oldShippingRateInput; 070 } 071 072 public void setShippingRateInput(final com.commercetools.api.models.cart.ShippingRateInput shippingRateInput) { 073 this.shippingRateInput = shippingRateInput; 074 } 075 076 public void setOldShippingRateInput( 077 final com.commercetools.api.models.cart.ShippingRateInput oldShippingRateInput) { 078 this.oldShippingRateInput = oldShippingRateInput; 079 } 080 081 @Override 082 public boolean equals(Object o) { 083 if (this == o) 084 return true; 085 086 if (o == null || getClass() != o.getClass()) 087 return false; 088 089 OrderShippingRateInputSetMessagePayloadImpl that = (OrderShippingRateInputSetMessagePayloadImpl) o; 090 091 return new EqualsBuilder().append(type, that.type) 092 .append(shippingRateInput, that.shippingRateInput) 093 .append(oldShippingRateInput, that.oldShippingRateInput) 094 .append(type, that.type) 095 .append(shippingRateInput, that.shippingRateInput) 096 .append(oldShippingRateInput, that.oldShippingRateInput) 097 .isEquals(); 098 } 099 100 @Override 101 public int hashCode() { 102 return new HashCodeBuilder(17, 37).append(type) 103 .append(shippingRateInput) 104 .append(oldShippingRateInput) 105 .toHashCode(); 106 } 107 108}