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