183 lines
7.8 KiB
Java
183 lines
7.8 KiB
Java
package com.discord.models.botuikit;
|
|
|
|
import c.d.b.a.a;
|
|
import com.discord.api.botuikit.ButtonStyle;
|
|
import com.discord.api.botuikit.ComponentEmoji;
|
|
import com.discord.api.botuikit.ComponentType;
|
|
import com.discord.models.botuikit.ActionInteractionComponentState;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
/* compiled from: ButtonMessageComponent.kt */
|
|
public final class ButtonMessageComponent extends ActionMessageComponent {
|
|
private final String customId;
|
|
private final ComponentEmoji emoji;
|
|
private final String hash;
|
|
private final int index;
|
|
private final String label;
|
|
private final ActionInteractionComponentState stateInteraction;
|
|
private final ButtonStyle style;
|
|
private final ComponentType type;
|
|
private final String url;
|
|
|
|
public ButtonMessageComponent(ComponentType componentType, int i, ActionInteractionComponentState actionInteractionComponentState, String str, String str2, String str3, ButtonStyle buttonStyle, ComponentEmoji componentEmoji, String str4) {
|
|
m.checkNotNullParameter(componentType, "type");
|
|
m.checkNotNullParameter(actionInteractionComponentState, "stateInteraction");
|
|
m.checkNotNullParameter(buttonStyle, "style");
|
|
this.type = componentType;
|
|
this.index = i;
|
|
this.stateInteraction = actionInteractionComponentState;
|
|
this.customId = str;
|
|
this.hash = str2;
|
|
this.label = str3;
|
|
this.style = buttonStyle;
|
|
this.emoji = componentEmoji;
|
|
this.url = str4;
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ ButtonMessageComponent(ComponentType componentType, int i, ActionInteractionComponentState actionInteractionComponentState, String str, String str2, String str3, ButtonStyle buttonStyle, ComponentEmoji componentEmoji, String str4, int i2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(componentType, i, (i2 & 4) != 0 ? ActionInteractionComponentState.Enabled.INSTANCE : actionInteractionComponentState, str, str2, str3, buttonStyle, (i2 & 128) != 0 ? null : componentEmoji, (i2 & 256) != 0 ? null : str4);
|
|
}
|
|
|
|
public static /* synthetic */ ButtonMessageComponent copy$default(ButtonMessageComponent buttonMessageComponent, ComponentType componentType, int i, ActionInteractionComponentState actionInteractionComponentState, String str, String str2, String str3, ButtonStyle buttonStyle, ComponentEmoji componentEmoji, String str4, int i2, Object obj) {
|
|
return buttonMessageComponent.copy((i2 & 1) != 0 ? buttonMessageComponent.getType() : componentType, (i2 & 2) != 0 ? buttonMessageComponent.getIndex() : i, (i2 & 4) != 0 ? buttonMessageComponent.getStateInteraction() : actionInteractionComponentState, (i2 & 8) != 0 ? buttonMessageComponent.customId : str, (i2 & 16) != 0 ? buttonMessageComponent.hash : str2, (i2 & 32) != 0 ? buttonMessageComponent.label : str3, (i2 & 64) != 0 ? buttonMessageComponent.style : buttonStyle, (i2 & 128) != 0 ? buttonMessageComponent.emoji : componentEmoji, (i2 & 256) != 0 ? buttonMessageComponent.url : str4);
|
|
}
|
|
|
|
public final ComponentType component1() {
|
|
return getType();
|
|
}
|
|
|
|
public final int component2() {
|
|
return getIndex();
|
|
}
|
|
|
|
public final ActionInteractionComponentState component3() {
|
|
return getStateInteraction();
|
|
}
|
|
|
|
public final String component4() {
|
|
return this.customId;
|
|
}
|
|
|
|
public final String component5() {
|
|
return this.hash;
|
|
}
|
|
|
|
public final String component6() {
|
|
return this.label;
|
|
}
|
|
|
|
public final ButtonStyle component7() {
|
|
return this.style;
|
|
}
|
|
|
|
public final ComponentEmoji component8() {
|
|
return this.emoji;
|
|
}
|
|
|
|
public final String component9() {
|
|
return this.url;
|
|
}
|
|
|
|
public final ButtonMessageComponent copy(ComponentType componentType, int i, ActionInteractionComponentState actionInteractionComponentState, String str, String str2, String str3, ButtonStyle buttonStyle, ComponentEmoji componentEmoji, String str4) {
|
|
m.checkNotNullParameter(componentType, "type");
|
|
m.checkNotNullParameter(actionInteractionComponentState, "stateInteraction");
|
|
m.checkNotNullParameter(buttonStyle, "style");
|
|
return new ButtonMessageComponent(componentType, i, actionInteractionComponentState, str, str2, str3, buttonStyle, componentEmoji, str4);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ButtonMessageComponent)) {
|
|
return false;
|
|
}
|
|
ButtonMessageComponent buttonMessageComponent = (ButtonMessageComponent) obj;
|
|
return m.areEqual(getType(), buttonMessageComponent.getType()) && getIndex() == buttonMessageComponent.getIndex() && m.areEqual(getStateInteraction(), buttonMessageComponent.getStateInteraction()) && m.areEqual(this.customId, buttonMessageComponent.customId) && m.areEqual(this.hash, buttonMessageComponent.hash) && m.areEqual(this.label, buttonMessageComponent.label) && m.areEqual(this.style, buttonMessageComponent.style) && m.areEqual(this.emoji, buttonMessageComponent.emoji) && m.areEqual(this.url, buttonMessageComponent.url);
|
|
}
|
|
|
|
public final String getCustomId() {
|
|
return this.customId;
|
|
}
|
|
|
|
public final ComponentEmoji getEmoji() {
|
|
return this.emoji;
|
|
}
|
|
|
|
public final String getHash() {
|
|
return this.hash;
|
|
}
|
|
|
|
@Override // com.discord.models.botuikit.MessageComponent
|
|
public int getIndex() {
|
|
return this.index;
|
|
}
|
|
|
|
public final String getLabel() {
|
|
return this.label;
|
|
}
|
|
|
|
@Override // com.discord.models.botuikit.ActionMessageComponent
|
|
public ActionInteractionComponentState getStateInteraction() {
|
|
return this.stateInteraction;
|
|
}
|
|
|
|
public final ButtonStyle getStyle() {
|
|
return this.style;
|
|
}
|
|
|
|
@Override // com.discord.models.botuikit.MessageComponent
|
|
public ComponentType getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public final String getUrl() {
|
|
return this.url;
|
|
}
|
|
|
|
public int hashCode() {
|
|
ComponentType type = getType();
|
|
int i = 0;
|
|
int index = (getIndex() + ((type != null ? type.hashCode() : 0) * 31)) * 31;
|
|
ActionInteractionComponentState stateInteraction = getStateInteraction();
|
|
int hashCode = (index + (stateInteraction != null ? stateInteraction.hashCode() : 0)) * 31;
|
|
String str = this.customId;
|
|
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
|
|
String str2 = this.hash;
|
|
int hashCode3 = (hashCode2 + (str2 != null ? str2.hashCode() : 0)) * 31;
|
|
String str3 = this.label;
|
|
int hashCode4 = (hashCode3 + (str3 != null ? str3.hashCode() : 0)) * 31;
|
|
ButtonStyle buttonStyle = this.style;
|
|
int hashCode5 = (hashCode4 + (buttonStyle != null ? buttonStyle.hashCode() : 0)) * 31;
|
|
ComponentEmoji componentEmoji = this.emoji;
|
|
int hashCode6 = (hashCode5 + (componentEmoji != null ? componentEmoji.hashCode() : 0)) * 31;
|
|
String str4 = this.url;
|
|
if (str4 != null) {
|
|
i = str4.hashCode();
|
|
}
|
|
return hashCode6 + i;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("ButtonMessageComponent(type=");
|
|
L.append(getType());
|
|
L.append(", index=");
|
|
L.append(getIndex());
|
|
L.append(", stateInteraction=");
|
|
L.append(getStateInteraction());
|
|
L.append(", customId=");
|
|
L.append(this.customId);
|
|
L.append(", hash=");
|
|
L.append(this.hash);
|
|
L.append(", label=");
|
|
L.append(this.label);
|
|
L.append(", style=");
|
|
L.append(this.style);
|
|
L.append(", emoji=");
|
|
L.append(this.emoji);
|
|
L.append(", url=");
|
|
return a.D(L, this.url, ")");
|
|
}
|
|
}
|