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 Category Order Hint update action.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class SetCategoryOrderHintChangeImpl implements SetCategoryOrderHintChange, ModelBase { 022 023 private String type; 024 025 private String change; 026 027 private com.commercetools.history.models.common.CategoryOrderHints previousValue; 028 029 private com.commercetools.history.models.common.CategoryOrderHints nextValue; 030 031 private String catalogData; 032 033 private String categoryId; 034 035 /** 036 * create instance with all properties 037 */ 038 @JsonCreator 039 SetCategoryOrderHintChangeImpl(@JsonProperty("change") final String change, 040 @JsonProperty("previousValue") final com.commercetools.history.models.common.CategoryOrderHints previousValue, 041 @JsonProperty("nextValue") final com.commercetools.history.models.common.CategoryOrderHints nextValue, 042 @JsonProperty("catalogData") final String catalogData, 043 @JsonProperty("categoryId") final String categoryId) { 044 this.change = change; 045 this.previousValue = previousValue; 046 this.nextValue = nextValue; 047 this.catalogData = catalogData; 048 this.categoryId = categoryId; 049 this.type = SET_CATEGORY_ORDER_HINT_CHANGE; 050 } 051 052 /** 053 * create empty instance 054 */ 055 public SetCategoryOrderHintChangeImpl() { 056 this.type = SET_CATEGORY_ORDER_HINT_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.CategoryOrderHints getPreviousValue() { 080 return this.previousValue; 081 } 082 083 /** 084 * <p>Value after the change.</p> 085 */ 086 087 public com.commercetools.history.models.common.CategoryOrderHints getNextValue() { 088 return this.nextValue; 089 } 090 091 /** 092 * <ul> 093 * <li><code>staged</code>, if the staged ProductCatalogData was updated.</li> 094 * <li><code>current</code>, if the current ProductCatalogData was updated.</li> 095 * </ul> 096 */ 097 098 public String getCatalogData() { 099 return this.catalogData; 100 } 101 102 /** 103 * <p><code>id</code> of the updated Category.</p> 104 */ 105 106 public String getCategoryId() { 107 return this.categoryId; 108 } 109 110 public void setChange(final String change) { 111 this.change = change; 112 } 113 114 public void setPreviousValue(final com.commercetools.history.models.common.CategoryOrderHints previousValue) { 115 this.previousValue = previousValue; 116 } 117 118 public void setNextValue(final com.commercetools.history.models.common.CategoryOrderHints nextValue) { 119 this.nextValue = nextValue; 120 } 121 122 public void setCatalogData(final String catalogData) { 123 this.catalogData = catalogData; 124 } 125 126 public void setCategoryId(final String categoryId) { 127 this.categoryId = categoryId; 128 } 129 130 @Override 131 public boolean equals(Object o) { 132 if (this == o) 133 return true; 134 135 if (o == null || getClass() != o.getClass()) 136 return false; 137 138 SetCategoryOrderHintChangeImpl that = (SetCategoryOrderHintChangeImpl) o; 139 140 return new EqualsBuilder().append(type, that.type) 141 .append(change, that.change) 142 .append(previousValue, that.previousValue) 143 .append(nextValue, that.nextValue) 144 .append(catalogData, that.catalogData) 145 .append(categoryId, that.categoryId) 146 .append(type, that.type) 147 .append(change, that.change) 148 .append(previousValue, that.previousValue) 149 .append(nextValue, that.nextValue) 150 .append(catalogData, that.catalogData) 151 .append(categoryId, that.categoryId) 152 .isEquals(); 153 } 154 155 @Override 156 public int hashCode() { 157 return new HashCodeBuilder(17, 37).append(type) 158 .append(change) 159 .append(previousValue) 160 .append(nextValue) 161 .append(catalogData) 162 .append(categoryId) 163 .toHashCode(); 164 } 165 166}