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 * CustomerCreatePasswordResetToken
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class CustomerCreatePasswordResetTokenImpl implements CustomerCreatePasswordResetToken, ModelBase {
022
023    private String email;
024
025    private Long ttlMinutes;
026
027    /**
028     * create instance with all properties
029     */
030    @JsonCreator
031    CustomerCreatePasswordResetTokenImpl(@JsonProperty("email") final String email,
032            @JsonProperty("ttlMinutes") final Long ttlMinutes) {
033        this.email = email;
034        this.ttlMinutes = ttlMinutes;
035    }
036
037    /**
038     * create empty instance
039     */
040    public CustomerCreatePasswordResetTokenImpl() {
041    }
042
043    /**
044     *  <p>Email address of the Customer treated as case-insensitive.</p>
045     */
046
047    public String getEmail() {
048        return this.email;
049    }
050
051    /**
052     *  <p>Validity period of the generated token in minutes.</p>
053     */
054
055    public Long getTtlMinutes() {
056        return this.ttlMinutes;
057    }
058
059    public void setEmail(final String email) {
060        this.email = email;
061    }
062
063    public void setTtlMinutes(final Long ttlMinutes) {
064        this.ttlMinutes = ttlMinutes;
065    }
066
067    @Override
068    public boolean equals(Object o) {
069        if (this == o)
070            return true;
071
072        if (o == null || getClass() != o.getClass())
073            return false;
074
075        CustomerCreatePasswordResetTokenImpl that = (CustomerCreatePasswordResetTokenImpl) o;
076
077        return new EqualsBuilder().append(email, that.email).append(ttlMinutes, that.ttlMinutes).isEquals();
078    }
079
080    @Override
081    public int hashCode() {
082        return new HashCodeBuilder(17, 37).append(email).append(ttlMinutes).toHashCode();
083    }
084
085}