com.stripe.model.EventData Maven / Gradle / Ivy
// Generated by delombok at Mon Feb 24 16:13:36 PST 2020
package com.stripe.model;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.annotations.SerializedName;
import java.util.Map;
public class EventData extends StripeObject {
/**
* Object containing the names of the attributes that have changed, and their previous values
* (sent along only with *.updated events).
*/
@SerializedName("previous_attributes")
Map previousAttributes;
/**
* Raw JSON object intended to be deserialized as {@code StripeObject}. The deserialization should
* be deferred to the user. See the now deprecated method {@link #getObject()}.
*/
@SerializedName("object")
JsonObject object;
/**
* @deprecated Deprecated in favor of getting {@code StripeObject} from {@link
* Event#getDataObjectDeserializer()} and {@link EventDataObjectDeserializer#getObject()}.
* Throws {@link JsonParseException} deserialization failure due to general invalid JSON, or
* more specifically when JSON data and model class have incompatible schemas.
* @return Deserialized StripeObject for event data.
*/
@Deprecated
public StripeObject getObject() {
return EventDataDeserializer.deserializeStripeObject(object);
}
/**
* Object containing the names of the attributes that have changed, and their previous values
* (sent along only with *.updated events).
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getPreviousAttributes() {
return this.previousAttributes;
}
/**
* Object containing the names of the attributes that have changed, and their previous values
* (sent along only with *.updated events).
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setPreviousAttributes(final Map previousAttributes) {
this.previousAttributes = previousAttributes;
}
/**
* Raw JSON object intended to be deserialized as {@code StripeObject}. The deserialization should
* be deferred to the user. See the now deprecated method {@link #getObject()}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final JsonObject object) {
this.object = object;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EventData)) return false;
final EventData other = (EventData) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$previousAttributes = this.getPreviousAttributes();
final java.lang.Object other$previousAttributes = other.getPreviousAttributes();
if (this$previousAttributes == null ? other$previousAttributes != null : !this$previousAttributes.equals(other$previousAttributes)) return false;
final java.lang.Object this$object = this.getObject();
final java.lang.Object other$object = other.getObject();
if (this$object == null ? other$object != null : !this$object.equals(other$object)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EventData;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $previousAttributes = this.getPreviousAttributes();
result = result * PRIME + ($previousAttributes == null ? 43 : $previousAttributes.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy