package com.bytedance.android.livesdk.model.message;

import X.GuA;
import X.HKs;
import X.T7N;
import com.bytedance.android.livesdk.model.linkSetting.MultiLiveUpdateUserSettingContent;
import com.bytedance.android.livesdk.model.message.linker.accpet_notice_message.LinkerAcceptNoticeContent;
import com.bytedance.android.livesdk.model.message.linker.cancel_message.LinkerCancelContent;
import com.bytedance.android.livesdk.model.message.linker.enter_message.LinkerEnterContent;
import com.bytedance.android.livesdk.model.message.linker.invite_message.LinkerInviteContent;
import com.bytedance.android.livesdk.model.message.linker.invite_message.LinkerInviteMessageExtra;
import com.bytedance.android.livesdk.model.message.linker.kick_out_message.LinkerKickOutContent;
import com.bytedance.android.livesdk.model.message.linker.leave_message.LinkerLeaveContent;
import com.bytedance.android.livesdk.model.message.linker.linked_list_change_message.LinkedListChangeContent;
import com.bytedance.android.livesdk.model.message.linker.list_change_message.LinkerListChangeContent;
import com.bytedance.android.livesdk.model.message.linker.mic_update.LinkerMicIdxUpdateContent;
import com.bytedance.android.livesdk.model.message.linker.mute_message.LinkerMuteContent;
import com.bytedance.android.livesdk.model.message.linker.random_linkmic_message.LinkerRandomMatchContent;
import com.bytedance.android.livesdk.model.message.linker.reply_message.LinkerReplyContent;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;

public class LinkMessage extends GuA {
    @c(LIZ = "message_type")
    public int LIZ;
    @c(LIZ = "linker_id")
    public long LIZIZ;
    @c(LIZ = "scene")
    public int LIZJ;
    @c(LIZ = "invite_content")
    public LinkerInviteContent LIZLLL;
    @c(LIZ = "reply_content")
    public LinkerReplyContent LJ;
    @c(LIZ = "cancel_content")
    public LinkerCancelContent LJFF;
    @c(LIZ = "reply_accept_notice_content")
    public LinkerAcceptNoticeContent LJI;
    @c(LIZ = "linked_list_change_content")
    public LinkedListChangeContent LJII;
    @c(LIZ = "enter_content")
    public LinkerEnterContent LJIIIIZZ;
    @c(LIZ = "kick_out_content")
    public LinkerKickOutContent LJIIIZ;
    @c(LIZ = "leave_content")
    public LinkerLeaveContent LJIILJJIL;
    @c(LIZ = "mute_content")
    public LinkerMuteContent LJIILL;
    @c(LIZ = "random_match_content")
    public LinkerRandomMatchContent LJIILLIIL;
    @c(LIZ = "mic_idx_update_content")
    public LinkerMicIdxUpdateContent LJIIZILJ;
    @c(LIZ = "update_user_setting_content")
    public MultiLiveUpdateUserSettingContent LJIJ;
    @c(LIZ = "list_change_content")
    public LinkerListChangeContent LJIJI;
    @c(LIZ = "extra")
    public String LJIJJ;
    @c(LIZ = "expire_timestamp")
    public long LJIJJLI;
    @c(LIZ = "transfer_extra")
    public String LJIL;
    @c(LIZ = "create_content")
    public LinkerCreateContent LJJ;
    @c(LIZ = "close_content")
    public LinkerCloseContent LJJI;
    @c(LIZ = "update_user_content")
    public LinkerUpdateUserContent LJJIFFI;
    @c(LIZ = "waiting_list_change_content")
    public LinkerWaitingListChangeContent LJJII;
    @c(LIZ = "sys_kick_out_content")
    public LinkerSysKickOutContent LJJIII;
    @c(LIZ = "cohost_list_change_content")
    public CohostListChangeContent LJJIIJ;
    @c(LIZ = "user_toast_content")
    public LinkmicUserToastContent LJJIIJZLJL;

    static {
        Covode.recordClassIndex(19061);
    }

    public LinkMessage() {
        this.LJJIL = HKs.LINK_MESSAGE;
    }

    public final long LJ() {
        return this.LJJIZ - this.LJJJJ.LIZ;
    }

    public final LinkerInviteMessageExtra LIZJ() {
        LinkerInviteContent linkerInviteContent = this.LIZLLL;
        if (linkerInviteContent == null || linkerInviteContent.LJIIL == null) {
            return null;
        }
        return this.LIZLLL.LJIIL;
    }

    public final boolean LJFF() {
        if (this.LJIJJLI > 0) {
            return true;
        }
        return false;
    }

    public final long LJI() {
        long j = this.LJIJJLI;
        if (j > 0) {
            return j - this.LJJIZ;
        }
        return 0;
    }

    public final T7N LIZLLL() {
        int i = this.LIZJ;
        if (i == 2) {
            return T7N.ANCHOR_LINKMIC;
        }
        if (i != 4) {
            return T7N.OTHER;
        }
        return T7N.AUDIENCE_LINKMIC;
    }

    public String toString() {
        return "LinkMessage{messageType=" + this.LIZ + ", channelId=" + this.LIZIZ + ", scene=" + this.LIZJ + ", linkerInviteContent=" + this.LIZLLL + ", extraStr='" + this.LJIJJ + '\'' + '}';
    }
}
