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