114 lines
3.4 KiB
Java
114 lines
3.4 KiB
Java
package com.facebook.share.model;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class AppInviteContent implements ShareModel {
|
|
public static final Parcelable.Creator<AppInviteContent> CREATOR = new Parcelable.Creator<AppInviteContent>() { // from class: com.facebook.share.model.AppInviteContent.1
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public AppInviteContent createFromParcel(Parcel parcel) {
|
|
return new AppInviteContent(parcel);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // android.os.Parcelable.Creator
|
|
public AppInviteContent[] newArray(int i) {
|
|
return new AppInviteContent[i];
|
|
}
|
|
};
|
|
private final String applinkUrl;
|
|
private final Builder.Destination destination;
|
|
private final String previewImageUrl;
|
|
private final String promoCode;
|
|
private final String promoText;
|
|
|
|
public static class Builder implements ShareModelBuilder<AppInviteContent, Builder> {
|
|
private String a;
|
|
private String b;
|
|
private String c;
|
|
private String d;
|
|
private Destination e;
|
|
|
|
public enum Destination {
|
|
FACEBOOK("facebook"),
|
|
MESSENGER("messenger");
|
|
|
|
private final String name;
|
|
|
|
Destination(String str) {
|
|
this.name = str;
|
|
}
|
|
|
|
public boolean equalsName(String str) {
|
|
if (str == null) {
|
|
return false;
|
|
}
|
|
return this.name.equals(str);
|
|
}
|
|
|
|
@Override // java.lang.Enum
|
|
public String toString() {
|
|
return this.name;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public String getApplinkUrl() {
|
|
return this.applinkUrl;
|
|
}
|
|
|
|
public Builder.Destination getDestination() {
|
|
Builder.Destination destination = this.destination;
|
|
return destination != null ? destination : Builder.Destination.FACEBOOK;
|
|
}
|
|
|
|
public String getPreviewImageUrl() {
|
|
return this.previewImageUrl;
|
|
}
|
|
|
|
public String getPromotionCode() {
|
|
return this.promoCode;
|
|
}
|
|
|
|
public String getPromotionText() {
|
|
return this.promoText;
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
parcel.writeString(this.applinkUrl);
|
|
parcel.writeString(this.previewImageUrl);
|
|
parcel.writeString(this.promoText);
|
|
parcel.writeString(this.promoCode);
|
|
parcel.writeString(this.destination.toString());
|
|
}
|
|
|
|
private AppInviteContent(Builder builder) {
|
|
this.applinkUrl = builder.a;
|
|
this.previewImageUrl = builder.b;
|
|
this.promoCode = builder.c;
|
|
this.promoText = builder.d;
|
|
this.destination = builder.e;
|
|
}
|
|
|
|
AppInviteContent(Parcel parcel) {
|
|
this.applinkUrl = parcel.readString();
|
|
this.previewImageUrl = parcel.readString();
|
|
this.promoText = parcel.readString();
|
|
this.promoCode = parcel.readString();
|
|
String readString = parcel.readString();
|
|
if (readString.length() > 0) {
|
|
this.destination = Builder.Destination.valueOf(readString);
|
|
} else {
|
|
this.destination = Builder.Destination.FACEBOOK;
|
|
}
|
|
}
|
|
}
|