212 lines
11 KiB
Java
212 lines
11 KiB
Java
package com.discord.widgets.guildscheduledevent;
|
|
|
|
import a0.a.a.b;
|
|
import c.d.b.a.a;
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityMetadata;
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEventEntityType;
|
|
import com.discord.api.stageinstance.StageInstancePrivacyLevel;
|
|
import com.discord.restapi.RestAPIParams;
|
|
import d0.z.d.m;
|
|
import java.io.Serializable;
|
|
/* compiled from: GuildScheduledEventModel.kt */
|
|
public final class GuildScheduledEventModel implements Serializable {
|
|
private final Long channelId;
|
|
private final String description;
|
|
private final GuildScheduledEventPickerDate endDate;
|
|
private final GuildScheduledEventPickerTime endTime;
|
|
private final GuildScheduledEventEntityMetadata entityMetadata;
|
|
private final GuildScheduledEventEntityType entityType;
|
|
private final long guildId;
|
|
private final String name;
|
|
private final GuildScheduledEventPickerDate startDate;
|
|
private final GuildScheduledEventPickerTime startTime;
|
|
|
|
public GuildScheduledEventModel(long j, String str, Long l, GuildScheduledEventPickerDate guildScheduledEventPickerDate, GuildScheduledEventPickerTime guildScheduledEventPickerTime, GuildScheduledEventPickerDate guildScheduledEventPickerDate2, GuildScheduledEventPickerTime guildScheduledEventPickerTime2, String str2, GuildScheduledEventEntityType guildScheduledEventEntityType, GuildScheduledEventEntityMetadata guildScheduledEventEntityMetadata) {
|
|
m.checkNotNullParameter(guildScheduledEventPickerDate, "startDate");
|
|
m.checkNotNullParameter(guildScheduledEventPickerTime, "startTime");
|
|
m.checkNotNullParameter(guildScheduledEventEntityType, "entityType");
|
|
this.guildId = j;
|
|
this.name = str;
|
|
this.channelId = l;
|
|
this.startDate = guildScheduledEventPickerDate;
|
|
this.startTime = guildScheduledEventPickerTime;
|
|
this.endDate = guildScheduledEventPickerDate2;
|
|
this.endTime = guildScheduledEventPickerTime2;
|
|
this.description = str2;
|
|
this.entityType = guildScheduledEventEntityType;
|
|
this.entityMetadata = guildScheduledEventEntityMetadata;
|
|
}
|
|
|
|
public static /* synthetic */ GuildScheduledEventModel copy$default(GuildScheduledEventModel guildScheduledEventModel, long j, String str, Long l, GuildScheduledEventPickerDate guildScheduledEventPickerDate, GuildScheduledEventPickerTime guildScheduledEventPickerTime, GuildScheduledEventPickerDate guildScheduledEventPickerDate2, GuildScheduledEventPickerTime guildScheduledEventPickerTime2, String str2, GuildScheduledEventEntityType guildScheduledEventEntityType, GuildScheduledEventEntityMetadata guildScheduledEventEntityMetadata, int i, Object obj) {
|
|
return guildScheduledEventModel.copy((i & 1) != 0 ? guildScheduledEventModel.guildId : j, (i & 2) != 0 ? guildScheduledEventModel.name : str, (i & 4) != 0 ? guildScheduledEventModel.channelId : l, (i & 8) != 0 ? guildScheduledEventModel.startDate : guildScheduledEventPickerDate, (i & 16) != 0 ? guildScheduledEventModel.startTime : guildScheduledEventPickerTime, (i & 32) != 0 ? guildScheduledEventModel.endDate : guildScheduledEventPickerDate2, (i & 64) != 0 ? guildScheduledEventModel.endTime : guildScheduledEventPickerTime2, (i & 128) != 0 ? guildScheduledEventModel.description : str2, (i & 256) != 0 ? guildScheduledEventModel.entityType : guildScheduledEventEntityType, (i & 512) != 0 ? guildScheduledEventModel.entityMetadata : guildScheduledEventEntityMetadata);
|
|
}
|
|
|
|
public final long component1() {
|
|
return this.guildId;
|
|
}
|
|
|
|
public final GuildScheduledEventEntityMetadata component10() {
|
|
return this.entityMetadata;
|
|
}
|
|
|
|
public final String component2() {
|
|
return this.name;
|
|
}
|
|
|
|
public final Long component3() {
|
|
return this.channelId;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerDate component4() {
|
|
return this.startDate;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerTime component5() {
|
|
return this.startTime;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerDate component6() {
|
|
return this.endDate;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerTime component7() {
|
|
return this.endTime;
|
|
}
|
|
|
|
public final String component8() {
|
|
return this.description;
|
|
}
|
|
|
|
public final GuildScheduledEventEntityType component9() {
|
|
return this.entityType;
|
|
}
|
|
|
|
public final GuildScheduledEventModel copy(long j, String str, Long l, GuildScheduledEventPickerDate guildScheduledEventPickerDate, GuildScheduledEventPickerTime guildScheduledEventPickerTime, GuildScheduledEventPickerDate guildScheduledEventPickerDate2, GuildScheduledEventPickerTime guildScheduledEventPickerTime2, String str2, GuildScheduledEventEntityType guildScheduledEventEntityType, GuildScheduledEventEntityMetadata guildScheduledEventEntityMetadata) {
|
|
m.checkNotNullParameter(guildScheduledEventPickerDate, "startDate");
|
|
m.checkNotNullParameter(guildScheduledEventPickerTime, "startTime");
|
|
m.checkNotNullParameter(guildScheduledEventEntityType, "entityType");
|
|
return new GuildScheduledEventModel(j, str, l, guildScheduledEventPickerDate, guildScheduledEventPickerTime, guildScheduledEventPickerDate2, guildScheduledEventPickerTime2, str2, guildScheduledEventEntityType, guildScheduledEventEntityMetadata);
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof GuildScheduledEventModel)) {
|
|
return false;
|
|
}
|
|
GuildScheduledEventModel guildScheduledEventModel = (GuildScheduledEventModel) obj;
|
|
return this.guildId == guildScheduledEventModel.guildId && m.areEqual(this.name, guildScheduledEventModel.name) && m.areEqual(this.channelId, guildScheduledEventModel.channelId) && m.areEqual(this.startDate, guildScheduledEventModel.startDate) && m.areEqual(this.startTime, guildScheduledEventModel.startTime) && m.areEqual(this.endDate, guildScheduledEventModel.endDate) && m.areEqual(this.endTime, guildScheduledEventModel.endTime) && m.areEqual(this.description, guildScheduledEventModel.description) && m.areEqual(this.entityType, guildScheduledEventModel.entityType) && m.areEqual(this.entityMetadata, guildScheduledEventModel.entityMetadata);
|
|
}
|
|
|
|
public final Long getChannelId() {
|
|
return this.channelId;
|
|
}
|
|
|
|
public final String getDescription() {
|
|
return this.description;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerDate getEndDate() {
|
|
return this.endDate;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerTime getEndTime() {
|
|
return this.endTime;
|
|
}
|
|
|
|
public final GuildScheduledEventEntityMetadata getEntityMetadata() {
|
|
return this.entityMetadata;
|
|
}
|
|
|
|
public final GuildScheduledEventEntityType getEntityType() {
|
|
return this.entityType;
|
|
}
|
|
|
|
public final long getGuildId() {
|
|
return this.guildId;
|
|
}
|
|
|
|
public final String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerDate getStartDate() {
|
|
return this.startDate;
|
|
}
|
|
|
|
public final GuildScheduledEventPickerTime getStartTime() {
|
|
return this.startTime;
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public int hashCode() {
|
|
int a = b.a(this.guildId) * 31;
|
|
String str = this.name;
|
|
int i = 0;
|
|
int hashCode = (a + (str != null ? str.hashCode() : 0)) * 31;
|
|
Long l = this.channelId;
|
|
int hashCode2 = (hashCode + (l != null ? l.hashCode() : 0)) * 31;
|
|
GuildScheduledEventPickerDate guildScheduledEventPickerDate = this.startDate;
|
|
int hashCode3 = (hashCode2 + (guildScheduledEventPickerDate != null ? guildScheduledEventPickerDate.hashCode() : 0)) * 31;
|
|
GuildScheduledEventPickerTime guildScheduledEventPickerTime = this.startTime;
|
|
int hashCode4 = (hashCode3 + (guildScheduledEventPickerTime != null ? guildScheduledEventPickerTime.hashCode() : 0)) * 31;
|
|
GuildScheduledEventPickerDate guildScheduledEventPickerDate2 = this.endDate;
|
|
int hashCode5 = (hashCode4 + (guildScheduledEventPickerDate2 != null ? guildScheduledEventPickerDate2.hashCode() : 0)) * 31;
|
|
GuildScheduledEventPickerTime guildScheduledEventPickerTime2 = this.endTime;
|
|
int hashCode6 = (hashCode5 + (guildScheduledEventPickerTime2 != null ? guildScheduledEventPickerTime2.hashCode() : 0)) * 31;
|
|
String str2 = this.description;
|
|
int hashCode7 = (hashCode6 + (str2 != null ? str2.hashCode() : 0)) * 31;
|
|
GuildScheduledEventEntityType guildScheduledEventEntityType = this.entityType;
|
|
int hashCode8 = (hashCode7 + (guildScheduledEventEntityType != null ? guildScheduledEventEntityType.hashCode() : 0)) * 31;
|
|
GuildScheduledEventEntityMetadata guildScheduledEventEntityMetadata = this.entityMetadata;
|
|
if (guildScheduledEventEntityMetadata != null) {
|
|
i = guildScheduledEventEntityMetadata.hashCode();
|
|
}
|
|
return hashCode8 + i;
|
|
}
|
|
|
|
public final RestAPIParams.CreateGuildScheduledEventBody toRequestBody() {
|
|
GuildScheduledEventPickerTime guildScheduledEventPickerTime;
|
|
String str = this.name;
|
|
String str2 = null;
|
|
if (str == null) {
|
|
return null;
|
|
}
|
|
GuildScheduledEventPickerDateTime guildScheduledEventPickerDateTime = GuildScheduledEventPickerDateTime.INSTANCE;
|
|
String utcDateString = guildScheduledEventPickerDateTime.toUtcDateString(this.startDate, this.startTime);
|
|
GuildScheduledEventPickerDate guildScheduledEventPickerDate = this.endDate;
|
|
if (!(guildScheduledEventPickerDate == null || (guildScheduledEventPickerTime = this.endTime) == null)) {
|
|
str2 = guildScheduledEventPickerDateTime.toUtcDateString(guildScheduledEventPickerDate, guildScheduledEventPickerTime);
|
|
}
|
|
return new RestAPIParams.CreateGuildScheduledEventBody(str, this.description, StageInstancePrivacyLevel.GUILD_ONLY, utcDateString, str2, this.channelId, this.entityType, this.entityMetadata);
|
|
}
|
|
|
|
@Override // java.lang.Object
|
|
public String toString() {
|
|
StringBuilder L = a.L("GuildScheduledEventModel(guildId=");
|
|
L.append(this.guildId);
|
|
L.append(", name=");
|
|
L.append(this.name);
|
|
L.append(", channelId=");
|
|
L.append(this.channelId);
|
|
L.append(", startDate=");
|
|
L.append(this.startDate);
|
|
L.append(", startTime=");
|
|
L.append(this.startTime);
|
|
L.append(", endDate=");
|
|
L.append(this.endDate);
|
|
L.append(", endTime=");
|
|
L.append(this.endTime);
|
|
L.append(", description=");
|
|
L.append(this.description);
|
|
L.append(", entityType=");
|
|
L.append(this.entityType);
|
|
L.append(", entityMetadata=");
|
|
L.append(this.entityMetadata);
|
|
L.append(")");
|
|
return L.toString();
|
|
}
|
|
}
|