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 Remove Associate update action.</p> 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class BusinessUnitAssociateRemovedMessageImpl implements BusinessUnitAssociateRemovedMessage, ModelBase { 022 023 private String id; 024 025 private Long version; 026 027 private java.time.ZonedDateTime createdAt; 028 029 private java.time.ZonedDateTime lastModifiedAt; 030 031 private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; 032 033 private com.commercetools.api.models.common.CreatedBy createdBy; 034 035 private Long sequenceNumber; 036 037 private com.commercetools.api.models.common.Reference resource; 038 039 private Long resourceVersion; 040 041 private String type; 042 043 private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; 044 045 private com.commercetools.api.models.business_unit.Associate associate; 046 047 /** 048 * create instance with all properties 049 */ 050 @JsonCreator 051 BusinessUnitAssociateRemovedMessageImpl(@JsonProperty("id") final String id, 052 @JsonProperty("version") final Long version, 053 @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, 054 @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, 055 @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, 056 @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, 057 @JsonProperty("sequenceNumber") final Long sequenceNumber, 058 @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, 059 @JsonProperty("resourceVersion") final Long resourceVersion, 060 @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, 061 @JsonProperty("associate") final com.commercetools.api.models.business_unit.Associate associate) { 062 this.id = id; 063 this.version = version; 064 this.createdAt = createdAt; 065 this.lastModifiedAt = lastModifiedAt; 066 this.lastModifiedBy = lastModifiedBy; 067 this.createdBy = createdBy; 068 this.sequenceNumber = sequenceNumber; 069 this.resource = resource; 070 this.resourceVersion = resourceVersion; 071 this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; 072 this.associate = associate; 073 this.type = BUSINESS_UNIT_ASSOCIATE_REMOVED; 074 } 075 076 /** 077 * create empty instance 078 */ 079 public BusinessUnitAssociateRemovedMessageImpl() { 080 this.type = BUSINESS_UNIT_ASSOCIATE_REMOVED; 081 } 082 083 /** 084 * <p>Unique identifier of the Message. Can be used to track which Messages have been processed.</p> 085 */ 086 087 public String getId() { 088 return this.id; 089 } 090 091 /** 092 * <p>Version of a resource. In case of Messages, this is always <code>1</code>.</p> 093 */ 094 095 public Long getVersion() { 096 return this.version; 097 } 098 099 /** 100 * <p>Date and time (UTC) the Message was generated.</p> 101 */ 102 103 public java.time.ZonedDateTime getCreatedAt() { 104 return this.createdAt; 105 } 106 107 /** 108 * <p>Value of <code>createdAt</code>.</p> 109 */ 110 111 public java.time.ZonedDateTime getLastModifiedAt() { 112 return this.lastModifiedAt; 113 } 114 115 /** 116 * <p>Value of <code>createdBy</code>.</p> 117 */ 118 119 public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { 120 return this.lastModifiedBy; 121 } 122 123 /** 124 * <p>Present on resources created after 1 February 2019 except for events not tracked.</p> 125 */ 126 127 public com.commercetools.api.models.common.CreatedBy getCreatedBy() { 128 return this.createdBy; 129 } 130 131 /** 132 * <p>Message number in relation to other Messages for a given resource. The <code>sequenceNumber</code> of the next Message for the resource is the successor of the <code>sequenceNumber</code> of the current Message. Meaning, the <code>sequenceNumber</code> of the next Message equals the <code>sequenceNumber</code> of the current Message + 1. <code>sequenceNumber</code> can be used to ensure that Messages are processed in the correct order for a particular resource.</p> 133 */ 134 135 public Long getSequenceNumber() { 136 return this.sequenceNumber; 137 } 138 139 /** 140 * <p>Reference to the resource on which the change or action was performed.</p> 141 */ 142 143 public com.commercetools.api.models.common.Reference getResource() { 144 return this.resource; 145 } 146 147 /** 148 * <p>Version of the resource on which the change or action was performed.</p> 149 */ 150 151 public Long getResourceVersion() { 152 return this.resourceVersion; 153 } 154 155 /** 156 * <p>Message Type of the Message.</p> 157 */ 158 159 public String getType() { 160 return this.type; 161 } 162 163 /** 164 * <p>User-provided identifiers of the resource, such as <code>key</code> or <code>externalId</code>. Only present if the resource has such identifiers.</p> 165 */ 166 167 public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { 168 return this.resourceUserProvidedIdentifiers; 169 } 170 171 /** 172 * <p>The Associate that was removed from the Business Unit.</p> 173 */ 174 175 public com.commercetools.api.models.business_unit.Associate getAssociate() { 176 return this.associate; 177 } 178 179 public void setId(final String id) { 180 this.id = id; 181 } 182 183 public void setVersion(final Long version) { 184 this.version = version; 185 } 186 187 public void setCreatedAt(final java.time.ZonedDateTime createdAt) { 188 this.createdAt = createdAt; 189 } 190 191 public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { 192 this.lastModifiedAt = lastModifiedAt; 193 } 194 195 public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { 196 this.lastModifiedBy = lastModifiedBy; 197 } 198 199 public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { 200 this.createdBy = createdBy; 201 } 202 203 public void setSequenceNumber(final Long sequenceNumber) { 204 this.sequenceNumber = sequenceNumber; 205 } 206 207 public void setResource(final com.commercetools.api.models.common.Reference resource) { 208 this.resource = resource; 209 } 210 211 public void setResourceVersion(final Long resourceVersion) { 212 this.resourceVersion = resourceVersion; 213 } 214 215 public void setResourceUserProvidedIdentifiers( 216 final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { 217 this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; 218 } 219 220 public void setAssociate(final com.commercetools.api.models.business_unit.Associate associate) { 221 this.associate = associate; 222 } 223 224 @Override 225 public boolean equals(Object o) { 226 if (this == o) 227 return true; 228 229 if (o == null || getClass() != o.getClass()) 230 return false; 231 232 BusinessUnitAssociateRemovedMessageImpl that = (BusinessUnitAssociateRemovedMessageImpl) o; 233 234 return new EqualsBuilder().append(id, that.id) 235 .append(version, that.version) 236 .append(createdAt, that.createdAt) 237 .append(lastModifiedAt, that.lastModifiedAt) 238 .append(lastModifiedBy, that.lastModifiedBy) 239 .append(createdBy, that.createdBy) 240 .append(sequenceNumber, that.sequenceNumber) 241 .append(resource, that.resource) 242 .append(resourceVersion, that.resourceVersion) 243 .append(type, that.type) 244 .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) 245 .append(associate, that.associate) 246 .append(id, that.id) 247 .append(version, that.version) 248 .append(createdAt, that.createdAt) 249 .append(lastModifiedAt, that.lastModifiedAt) 250 .append(lastModifiedBy, that.lastModifiedBy) 251 .append(createdBy, that.createdBy) 252 .append(sequenceNumber, that.sequenceNumber) 253 .append(resource, that.resource) 254 .append(resourceVersion, that.resourceVersion) 255 .append(type, that.type) 256 .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) 257 .append(associate, that.associate) 258 .isEquals(); 259 } 260 261 @Override 262 public int hashCode() { 263 return new HashCodeBuilder(17, 37).append(id) 264 .append(version) 265 .append(createdAt) 266 .append(lastModifiedAt) 267 .append(lastModifiedBy) 268 .append(createdBy) 269 .append(sequenceNumber) 270 .append(resource) 271 .append(resourceVersion) 272 .append(type) 273 .append(resourceUserProvidedIdentifiers) 274 .append(associate) 275 .toHashCode(); 276 } 277 278}