package com.ss.android.ugc.aweme.profile.model;

import X.2HN;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import java.io.Serializable;
import java.util.Objects;
import kotlin.o.y;
import kotlin.o.z;

public final class ExternalRecommendReasonStruct implements Serializable {
    public String cacheReason;
    @c(LIZ = "external_username")
    public String externalUsername;
    @c(LIZ = "hashed_phone_number")
    public String hashedPhoneNumber;
    @c(LIZ = "reason")
    public String reason;

    static {
        Covode.recordClassIndex(98790);
    }

    public ExternalRecommendReasonStruct() {
        this((String) null, (String) null, (String) null, (String) null, 15, (2HN) null);
    }

    public static /* synthetic */ ExternalRecommendReasonStruct copy$default(ExternalRecommendReasonStruct externalRecommendReasonStruct, String str, String str2, String str3, String str4, int i, Object obj) {
        if ((i & 1) != 0) {
            str = externalRecommendReasonStruct.reason;
        }
        if ((i & 2) != 0) {
            str2 = externalRecommendReasonStruct.hashedPhoneNumber;
        }
        if ((i & 4) != 0) {
            str3 = externalRecommendReasonStruct.externalUsername;
        }
        if ((i & 8) != 0) {
            str4 = externalRecommendReasonStruct.cacheReason;
        }
        return externalRecommendReasonStruct.copy(str, str2, str3, str4);
    }

    private Object[] getObjects() {
        return new Object[]{this.reason, this.hashedPhoneNumber, this.externalUsername, this.cacheReason};
    }

    public final ExternalRecommendReasonStruct copy(String str, String str2, String str3, String str4) {
        return new ExternalRecommendReasonStruct(str, str2, str3, str4);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof ExternalRecommendReasonStruct)) {
            return false;
        }
        return M12.LIZ(((ExternalRecommendReasonStruct) obj).getObjects(), getObjects());
    }

    public final int hashCode() {
        return Objects.hash(getObjects());
    }

    public final String toString() {
        return M12.LIZ("ExternalRecommendReasonStruct:%s,%s,%s,%s", getObjects());
    }

    public final String getCacheReason() {
        return this.cacheReason;
    }

    public final String getExternalUsername() {
        return this.externalUsername;
    }

    public final String getHashedPhoneNumber() {
        return this.hashedPhoneNumber;
    }

    public final String getReason() {
        return this.reason;
    }

    public final String getFormatReason() {
        String str = this.reason;
        if (str != null) {
            return y.LIZ(str, "{0}", "%s", false);
        }
        return null;
    }

    public final boolean isValid() {
        String str = this.reason;
        if (str == null || str.length() == 0 || formatArgInvalid()) {
            return false;
        }
        return true;
    }

    public final boolean formatArgInvalid() {
        String str;
        String str2;
        String str3 = this.reason;
        if (str3 != null && z.LIZ(str3, "{0}", false) && (((str = this.hashedPhoneNumber) == null || str.length() == 0) && ((str2 = this.externalUsername) == null || str2.length() == 0))) {
            return true;
        }
        return false;
    }

    public final void setCacheReason(String str) {
        this.cacheReason = str;
    }

    public final void setExternalUsername(String str) {
        this.externalUsername = str;
    }

    public final void setHashedPhoneNumber(String str) {
        this.hashedPhoneNumber = str;
    }

    public final void setReason(String str) {
        this.reason = str;
    }

    public ExternalRecommendReasonStruct(String str, String str2, String str3, String str4) {
        this.reason = str;
        this.hashedPhoneNumber = str2;
        this.externalUsername = str3;
        this.cacheReason = str4;
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ ExternalRecommendReasonStruct(String str, String str2, String str3, String str4, int i, 2HN r8) {
        this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : str2, (i & 4) != 0 ? null : str3, (i & 8) != 0 ? null : str4);
    }
}
