package com.hbc.api.fraud.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Object; import java.lang.Override; import java.lang.String; import org.joda.time.DateTime; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.2 * User agent: apibuilder app.apibuilder.io/hbc/api-fraud/0.0.2/android_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson and retrofit2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * * Customer model */ @JsonIgnoreProperties( ignoreUnknown = true ) public class Customer { private final CustomerType customerType; private final String accountId; private final DateTime creationDate; private final String firstName; private final String lastName; private final String emailAddress; @JsonCreator public Customer(@JsonProperty("customerType") CustomerType customerType, @JsonProperty("accountId") String accountId, @JsonProperty("creationDate") DateTime creationDate, @JsonProperty("firstName") String firstName, @JsonProperty("lastName") String lastName, @JsonProperty("emailAddress") String emailAddress) { this.customerType = customerType; this.accountId = accountId; this.creationDate = creationDate; this.firstName = firstName; this.lastName = lastName; this.emailAddress = emailAddress; } public CustomerType getCustomerType() { return customerType; } public String getAccountId() { return accountId; } public DateTime getCreationDate() { return creationDate; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public String getEmailAddress() { return emailAddress; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Customer that = (Customer) o; if (customerType != null ? !customerType.equals(that.customerType) : that.customerType != null) return false; if (accountId != null ? !accountId.equals(that.accountId) : that.accountId != null) return false; if (creationDate != null ? !creationDate.equals(that.creationDate) : that.creationDate != null) return false; if (firstName != null ? !firstName.equals(that.firstName) : that.firstName != null) return false; if (lastName != null ? !lastName.equals(that.lastName) : that.lastName != null) return false; if (emailAddress != null ? !emailAddress.equals(that.emailAddress) : that.emailAddress != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (customerType != null ? customerType.hashCode() : 0); result = 31 * result + (accountId != null ? accountId.hashCode() : 0); result = 31 * result + (creationDate != null ? creationDate.hashCode() : 0); result = 31 * result + (firstName != null ? firstName.hashCode() : 0); result = 31 * result + (lastName != null ? lastName.hashCode() : 0); result = 31 * result + (emailAddress != null ? emailAddress.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return com.hbc.api.fraud.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static Customer parseJson(String json) throws IOException { return com.hbc.api.fraud.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, Customer.class); } }