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