001 002package com.commercetools.api.models.customer; 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 * CustomerCreateEmailToken 019 */ 020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 021public class CustomerCreateEmailTokenImpl implements CustomerCreateEmailToken, ModelBase { 022 023 private String id; 024 025 private Long version; 026 027 private Long ttlMinutes; 028 029 /** 030 * create instance with all properties 031 */ 032 @JsonCreator 033 CustomerCreateEmailTokenImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, 034 @JsonProperty("ttlMinutes") final Long ttlMinutes) { 035 this.id = id; 036 this.version = version; 037 this.ttlMinutes = ttlMinutes; 038 } 039 040 /** 041 * create empty instance 042 */ 043 public CustomerCreateEmailTokenImpl() { 044 } 045 046 /** 047 * <p>Unique identifier of the Customer.</p> 048 */ 049 050 public String getId() { 051 return this.id; 052 } 053 054 /** 055 * <p>Expected version of the Customer.</p> 056 */ 057 058 public Long getVersion() { 059 return this.version; 060 } 061 062 /** 063 * <p>Validity period of the generated token in minutes.</p> 064 */ 065 066 public Long getTtlMinutes() { 067 return this.ttlMinutes; 068 } 069 070 public void setId(final String id) { 071 this.id = id; 072 } 073 074 public void setVersion(final Long version) { 075 this.version = version; 076 } 077 078 public void setTtlMinutes(final Long ttlMinutes) { 079 this.ttlMinutes = ttlMinutes; 080 } 081 082 @Override 083 public boolean equals(Object o) { 084 if (this == o) 085 return true; 086 087 if (o == null || getClass() != o.getClass()) 088 return false; 089 090 CustomerCreateEmailTokenImpl that = (CustomerCreateEmailTokenImpl) o; 091 092 return new EqualsBuilder().append(id, that.id) 093 .append(version, that.version) 094 .append(ttlMinutes, that.ttlMinutes) 095 .append(id, that.id) 096 .append(version, that.version) 097 .append(ttlMinutes, that.ttlMinutes) 098 .isEquals(); 099 } 100 101 @Override 102 public int hashCode() { 103 return new HashCodeBuilder(17, 37).append(id).append(version).append(ttlMinutes).toHashCode(); 104 } 105 106}