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