com.segment.analytics.messages.AutoValue_ScreenMessage Maven / Gradle / Ivy
The newest version!
package com.segment.analytics.messages;
import java.util.Date;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_ScreenMessage extends ScreenMessage {
private final Message.Type type;
private final String messageId;
private final Date sentAt;
private final Date timestamp;
private final Map context;
private final String anonymousId;
private final String userId;
private final Map integrations;
private final String name;
private final Map properties;
AutoValue_ScreenMessage(
Message.Type type,
String messageId,
@Nullable Date sentAt,
Date timestamp,
@Nullable Map context,
@Nullable String anonymousId,
@Nullable String userId,
@Nullable Map integrations,
String name,
@Nullable Map properties) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (messageId == null) {
throw new NullPointerException("Null messageId");
}
this.messageId = messageId;
this.sentAt = sentAt;
if (timestamp == null) {
throw new NullPointerException("Null timestamp");
}
this.timestamp = timestamp;
this.context = context;
this.anonymousId = anonymousId;
this.userId = userId;
this.integrations = integrations;
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
this.properties = properties;
}
@Nonnull
@Override
public Message.Type type() {
return type;
}
@Nonnull
@Override
public String messageId() {
return messageId;
}
@Nullable
@Override
public Date sentAt() {
return sentAt;
}
@Nonnull
@Override
public Date timestamp() {
return timestamp;
}
@Nullable
@Override
public Map context() {
return context;
}
@Nullable
@Override
public String anonymousId() {
return anonymousId;
}
@Nullable
@Override
public String userId() {
return userId;
}
@Nullable
@Override
public Map integrations() {
return integrations;
}
@Override
public String name() {
return name;
}
@Nullable
@Override
public Map properties() {
return properties;
}
@Override
public String toString() {
return "ScreenMessage{"
+ "type=" + type + ", "
+ "messageId=" + messageId + ", "
+ "sentAt=" + sentAt + ", "
+ "timestamp=" + timestamp + ", "
+ "context=" + context + ", "
+ "anonymousId=" + anonymousId + ", "
+ "userId=" + userId + ", "
+ "integrations=" + integrations + ", "
+ "name=" + name + ", "
+ "properties=" + properties
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ScreenMessage) {
ScreenMessage that = (ScreenMessage) o;
return this.type.equals(that.type())
&& this.messageId.equals(that.messageId())
&& (this.sentAt == null ? that.sentAt() == null : this.sentAt.equals(that.sentAt()))
&& this.timestamp.equals(that.timestamp())
&& (this.context == null ? that.context() == null : this.context.equals(that.context()))
&& (this.anonymousId == null ? that.anonymousId() == null : this.anonymousId.equals(that.anonymousId()))
&& (this.userId == null ? that.userId() == null : this.userId.equals(that.userId()))
&& (this.integrations == null ? that.integrations() == null : this.integrations.equals(that.integrations()))
&& this.name.equals(that.name())
&& (this.properties == null ? that.properties() == null : this.properties.equals(that.properties()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= messageId.hashCode();
h$ *= 1000003;
h$ ^= (sentAt == null) ? 0 : sentAt.hashCode();
h$ *= 1000003;
h$ ^= timestamp.hashCode();
h$ *= 1000003;
h$ ^= (context == null) ? 0 : context.hashCode();
h$ *= 1000003;
h$ ^= (anonymousId == null) ? 0 : anonymousId.hashCode();
h$ *= 1000003;
h$ ^= (userId == null) ? 0 : userId.hashCode();
h$ *= 1000003;
h$ ^= (integrations == null) ? 0 : integrations.hashCode();
h$ *= 1000003;
h$ ^= name.hashCode();
h$ *= 1000003;
h$ ^= (properties == null) ? 0 : properties.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy