- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
267 lines
8.6 KiB
Java
267 lines
8.6 KiB
Java
package com.facebook.gamingservices;
|
|
|
|
import android.media.Image;
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import com.facebook.gamingservices.internal.DateFormatter;
|
|
import com.facebook.gamingservices.internal.TournamentScoreType;
|
|
import com.facebook.gamingservices.internal.TournamentSortOrder;
|
|
import com.facebook.share.model.ShareModel;
|
|
import com.facebook.share.model.ShareModelBuilder;
|
|
import java.time.Instant;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class TournamentConfig implements ShareModel {
|
|
public static final CREATOR CREATOR = new CREATOR(null);
|
|
private final Instant endTime;
|
|
private final Image image;
|
|
private final String payload;
|
|
private final TournamentScoreType scoreType;
|
|
private final TournamentSortOrder sortOrder;
|
|
private final String title;
|
|
|
|
public /* synthetic */ TournamentConfig(Builder builder, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(builder);
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public final Instant getEndTime() {
|
|
return this.endTime;
|
|
}
|
|
|
|
public final Image getImage() {
|
|
return this.image;
|
|
}
|
|
|
|
public final String getPayload() {
|
|
return this.payload;
|
|
}
|
|
|
|
public final TournamentScoreType getScoreType() {
|
|
return this.scoreType;
|
|
}
|
|
|
|
public final TournamentSortOrder getSortOrder() {
|
|
return this.sortOrder;
|
|
}
|
|
|
|
public final String getTitle() {
|
|
return this.title;
|
|
}
|
|
|
|
private TournamentConfig(Builder builder) {
|
|
this.title = builder.getTitle();
|
|
this.sortOrder = builder.getSortOrder();
|
|
this.scoreType = builder.getScoreType();
|
|
this.endTime = builder.getEndTime();
|
|
this.image = builder.getImage();
|
|
this.payload = builder.getPayload();
|
|
}
|
|
|
|
public TournamentConfig(Parcel parcel) {
|
|
TournamentSortOrder tournamentSortOrder;
|
|
TournamentScoreType tournamentScoreType;
|
|
Intrinsics.checkNotNullParameter(parcel, "parcel");
|
|
this.title = parcel.readString();
|
|
TournamentSortOrder[] valuesCustom = TournamentSortOrder.valuesCustom();
|
|
int length = valuesCustom.length;
|
|
int i = 0;
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 >= length) {
|
|
tournamentSortOrder = null;
|
|
break;
|
|
}
|
|
tournamentSortOrder = valuesCustom[i2];
|
|
if (Intrinsics.areEqual(tournamentSortOrder.name(), parcel.readString())) {
|
|
break;
|
|
} else {
|
|
i2++;
|
|
}
|
|
}
|
|
this.sortOrder = tournamentSortOrder;
|
|
TournamentScoreType[] valuesCustom2 = TournamentScoreType.valuesCustom();
|
|
int length2 = valuesCustom2.length;
|
|
while (true) {
|
|
if (i >= length2) {
|
|
tournamentScoreType = null;
|
|
break;
|
|
}
|
|
tournamentScoreType = valuesCustom2[i];
|
|
if (Intrinsics.areEqual(tournamentScoreType.name(), parcel.readString())) {
|
|
break;
|
|
} else {
|
|
i++;
|
|
}
|
|
}
|
|
this.scoreType = tournamentScoreType;
|
|
String readString = parcel.readString();
|
|
this.endTime = readString == null ? null : Instant.from(DateFormatter.INSTANCE.format$facebook_gamingservices_release(readString));
|
|
this.payload = parcel.readString();
|
|
this.image = null;
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel out, int i) {
|
|
Intrinsics.checkNotNullParameter(out, "out");
|
|
out.writeString(String.valueOf(this.sortOrder));
|
|
out.writeString(String.valueOf(this.scoreType));
|
|
out.writeString(String.valueOf(this.endTime));
|
|
out.writeString(this.title);
|
|
out.writeString(this.payload);
|
|
}
|
|
|
|
public static final class Builder implements ShareModelBuilder<TournamentConfig, Builder> {
|
|
private Instant endTime;
|
|
private Image image;
|
|
private String payload;
|
|
private TournamentScoreType scoreType;
|
|
private TournamentSortOrder sortOrder;
|
|
private String title;
|
|
|
|
public final Instant getEndTime() {
|
|
return this.endTime;
|
|
}
|
|
|
|
public final Image getImage() {
|
|
return this.image;
|
|
}
|
|
|
|
public final String getPayload() {
|
|
return this.payload;
|
|
}
|
|
|
|
public final TournamentScoreType getScoreType() {
|
|
return this.scoreType;
|
|
}
|
|
|
|
public final TournamentSortOrder getSortOrder() {
|
|
return this.sortOrder;
|
|
}
|
|
|
|
public final String getTitle() {
|
|
return this.title;
|
|
}
|
|
|
|
public final void setEndTime(Instant instant) {
|
|
this.endTime = instant;
|
|
}
|
|
|
|
public final void setImage(Image image) {
|
|
this.image = image;
|
|
}
|
|
|
|
public final void setPayload(String str) {
|
|
this.payload = str;
|
|
}
|
|
|
|
public final void setScoreType(TournamentScoreType tournamentScoreType) {
|
|
this.scoreType = tournamentScoreType;
|
|
}
|
|
|
|
public final void setSortOrder(TournamentSortOrder tournamentSortOrder) {
|
|
this.sortOrder = tournamentSortOrder;
|
|
}
|
|
|
|
public final void setTitle(String str) {
|
|
this.title = str;
|
|
}
|
|
|
|
public final Builder setTournamentEndTime(Instant endTime) {
|
|
Intrinsics.checkNotNullParameter(endTime, "endTime");
|
|
this.endTime = endTime;
|
|
return this;
|
|
}
|
|
|
|
public final Builder setTournamentImage(Image image) {
|
|
this.image = image;
|
|
return this;
|
|
}
|
|
|
|
public final Builder setTournamentPayload(String str) {
|
|
this.payload = str;
|
|
return this;
|
|
}
|
|
|
|
public final Builder setTournamentScoreType(TournamentScoreType scoreType) {
|
|
Intrinsics.checkNotNullParameter(scoreType, "scoreType");
|
|
this.scoreType = scoreType;
|
|
return this;
|
|
}
|
|
|
|
public final Builder setTournamentSortOrder(TournamentSortOrder sortOrder) {
|
|
Intrinsics.checkNotNullParameter(sortOrder, "sortOrder");
|
|
this.sortOrder = sortOrder;
|
|
return this;
|
|
}
|
|
|
|
public final Builder setTournamentTitle(String str) {
|
|
this.title = str;
|
|
return this;
|
|
}
|
|
|
|
@Override // com.facebook.share.ShareBuilder
|
|
public TournamentConfig build() {
|
|
return new TournamentConfig(this, null);
|
|
}
|
|
|
|
public final Builder readFrom$facebook_gamingservices_release(Parcel parcel) {
|
|
Intrinsics.checkNotNullParameter(parcel, "parcel");
|
|
return readFrom((TournamentConfig) parcel.readParcelable(TournamentConfig.class.getClassLoader()));
|
|
}
|
|
|
|
@Override // com.facebook.share.model.ShareModelBuilder
|
|
public Builder readFrom(TournamentConfig tournamentConfig) {
|
|
if (tournamentConfig == null) {
|
|
return this;
|
|
}
|
|
TournamentSortOrder sortOrder = tournamentConfig.getSortOrder();
|
|
if (sortOrder != null) {
|
|
setTournamentSortOrder(sortOrder);
|
|
}
|
|
TournamentScoreType scoreType = tournamentConfig.getScoreType();
|
|
if (scoreType != null) {
|
|
setTournamentScoreType(scoreType);
|
|
}
|
|
Instant endTime = tournamentConfig.getEndTime();
|
|
if (endTime != null) {
|
|
setTournamentEndTime(endTime);
|
|
}
|
|
String title = tournamentConfig.getTitle();
|
|
if (title != null) {
|
|
setTournamentTitle(title);
|
|
}
|
|
setTournamentPayload(tournamentConfig.getPayload());
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public static final class CREATOR implements Parcelable.Creator<TournamentConfig> {
|
|
public /* synthetic */ CREATOR(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private CREATOR() {
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public TournamentConfig createFromParcel(Parcel parcel) {
|
|
Intrinsics.checkNotNullParameter(parcel, "parcel");
|
|
return new TournamentConfig(parcel);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public TournamentConfig[] newArray(int i) {
|
|
return new TournamentConfig[i];
|
|
}
|
|
}
|
|
}
|