package a.c.b;

import com.google.protobuf.InvalidProtocolBufferException;
import com.ucar.databus.proto.UCarProto;
import java.util.HashMap;

public class r extends v {

    public class a extends HashMap<Integer, String> {
        public a() {
            put(1, "heartbeat");
            put(2, "get_port_request");
            put(3, "get_port_response");
            put(4, "notify_car_to_foreground");
            put(5, "notify_car_to_background");
            put(6, "notify_microphone_state");
            put(7, "notify_mirror_state");
            put(8, "notify_audio_player_state");
            put(9, "notify_phone_state");
            put(10, "notify_music_info");
            put(11, "notify_navigation_info");
            put(12, "custom_key_event");
            put(13, "vr_cmd_to_phone");
            put(14, "notify_call_hung_up");
            put(15, "notify_switch_day_or_night");
            put(16, "awaken_voice_assistant");
            put(17, "audio_player_control");
            put(18, "notify_add_camera");
            put(19, "notify_remove_camera");
            put(20, "set_camera_state");
            put(21, "camera_state");
            put(22, "bluetooth_mac_info");
            put(23, "disconnect");
            put(24, "get_ucar_config_request");
            put(25, "get_ucar_config_response");
            put(26, "get_app_list_request");
            put(27, "get_app_list_response");
            put(28, "get_app_detail_info_request");
            put(29, "get_app_detail_info_response");
            put(30, "invoke_app");
            put(31, "app_state_changed");
            put(32, "app_list_changed");
            put(33, "poi_address");
            put(34, "call_info");
            put(35, "pick_up_call");
        }
    }

    public static UCarProto.NotifyMicrophoneState A(s sVar) {
        a(6, sVar);
        try {
            return UCarProto.NotifyMicrophoneState.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyMicrophoneStateMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyMirrorState B(s sVar) {
        a(7, sVar);
        try {
            return UCarProto.NotifyMirrorState.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyMirrorStateMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyMusicInfo C(s sVar) {
        a(10, sVar);
        try {
            return UCarProto.NotifyMusicInfo.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyMusicInfoMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyNavigationInfo D(s sVar) {
        a(11, sVar);
        try {
            return UCarProto.NotifyNavigationInfo.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyNavigationInfoMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyPhoneState E(s sVar) {
        a(9, sVar);
        try {
            return UCarProto.NotifyPhoneState.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyPhoneStateMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyRemoveCamera F(s sVar) {
        a(19, sVar);
        try {
            return UCarProto.NotifyRemoveCamera.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyRemoveCameraMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifySwitchDayOrNight G(s sVar) {
        a(15, sVar);
        try {
            return UCarProto.NotifySwitchDayOrNight.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifySwitchDayOrNightMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.POIAddress H(s sVar) {
        a(33, sVar, i.SEND);
        try {
            return UCarProto.POIAddress.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parsePOIAddressMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.PickUpCall I(s sVar) {
        a(35, sVar, i.SEND_SYNC);
        try {
            return UCarProto.PickUpCall.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parsePickUpCallMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.SetCameraState J(s sVar) {
        a(20, sVar);
        try {
            return UCarProto.SetCameraState.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseSetCameraStateMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.VRCmdToPhone K(s sVar) {
        a(13, sVar);
        try {
            return UCarProto.VRCmdToPhone.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseVRCmdToPhoneMessage error: " + e.getMessage());
        }
    }

    public static s a(UCarProto.AppListChanged appListChanged) {
        return v.a(f().a(o.PHONE).a(32).a(appListChanged));
    }

    public static s a(UCarProto.AppStateChanged appStateChanged) {
        return v.a(f().a(o.PHONE).a(31).a(appStateChanged));
    }

    public static s a(UCarProto.AudioPlayerControl audioPlayerControl) {
        return v.a(f().a(o.PHONE).a(17).a(audioPlayerControl));
    }

    public static s a(UCarProto.AwakenVoiceAssistant awakenVoiceAssistant) {
        return v.a(f().a(o.CAR).a(16).a(awakenVoiceAssistant));
    }

    public static s a(UCarProto.BluetoothMacInfo bluetoothMacInfo) {
        return v.a(f().a(o.PHONE).a(22).a(bluetoothMacInfo));
    }

    public static s a(UCarProto.CallInfo callInfo) {
        return v.a(f().a(o.PHONE).a(34).a(callInfo));
    }

    public static s a(UCarProto.CustomKeyEvent customKeyEvent) {
        return v.a(f().a(o.CAR).a(12).a(customKeyEvent));
    }

    public static s a(UCarProto.Disconnect disconnect) {
        return v.a(f().a(o.CAR).a(23).a(disconnect));
    }

    public static s a(UCarProto.GetAppDetailInfoRequest getAppDetailInfoRequest) {
        return v.a(f().a(o.CAR).a(i.REQ).a(28).a(getAppDetailInfoRequest));
    }

    public static s a(UCarProto.GetAppDetailInfoResponse getAppDetailInfoResponse, int i) {
        return v.a(f().a(o.PHONE).a(i.RES).a(29).a(getAppDetailInfoResponse).d(i));
    }

    public static s a(UCarProto.GetAppListRequest getAppListRequest) {
        return v.a(f().a(o.CAR).a(i.REQ).a(26).a(getAppListRequest));
    }

    public static s a(UCarProto.GetAppListResponse getAppListResponse, int i) {
        return v.a(f().a(o.PHONE).a(i.RES).a(27).a(getAppListResponse).d(i));
    }

    public static s a(UCarProto.GetPortRequest getPortRequest) {
        return f().a(v.a()).a(2).a(getPortRequest);
    }

    public static s a(UCarProto.GetPortResponse getPortResponse) {
        return f().a(v.a()).a(3).a(getPortResponse);
    }

    public static s a(UCarProto.GetUCarConfigRequest getUCarConfigRequest) {
        return v.a(f().a(o.PHONE).a(i.REQ).a(24).a(getUCarConfigRequest));
    }

    public static s a(UCarProto.GetUCarConfigResponse getUCarConfigResponse, int i) {
        return v.a(f().a(o.CAR).a(i.RES).a(25).a(getUCarConfigResponse).d(i));
    }

    public static s a(UCarProto.Heartbeat heartbeat) {
        return f().a(v.a()).a(1).a(heartbeat);
    }

    public static s a(UCarProto.InvokeApp invokeApp) {
        return v.a(f().a(o.CAR).a(30).a(invokeApp));
    }

    public static s a(UCarProto.NotifyAddCamera notifyAddCamera) {
        return v.a(f().a(o.CAR).a(18).a(notifyAddCamera));
    }

    public static s a(UCarProto.NotifyAudioPlayerState notifyAudioPlayerState) {
        return v.a(f().a(o.PHONE).a(8).a(notifyAudioPlayerState));
    }

    public static s a(UCarProto.NotifyCallHungUp notifyCallHungUp) {
        return v.a(f().a(o.CAR).a(14).a(notifyCallHungUp));
    }

    public static s a(UCarProto.NotifyCameraStateChanged notifyCameraStateChanged) {
        return v.a(f().a(o.CAR).a(21).a(notifyCameraStateChanged));
    }

    public static s a(UCarProto.NotifyMicrophoneState notifyMicrophoneState) {
        return v.a(f().a(o.PHONE).a(6).a(notifyMicrophoneState));
    }

    public static s a(UCarProto.NotifyMirrorState notifyMirrorState) {
        return v.a(f().a(o.PHONE).a(7).a(notifyMirrorState));
    }

    public static s a(UCarProto.NotifyMusicInfo notifyMusicInfo) {
        return v.a(f().a(o.PHONE).a(10).a(notifyMusicInfo));
    }

    public static s a(UCarProto.NotifyNavigationInfo notifyNavigationInfo) {
        return v.a(f().a(o.PHONE).a(11).a(notifyNavigationInfo));
    }

    public static s a(UCarProto.NotifyPhoneState notifyPhoneState) {
        return v.a(f().a(o.PHONE).a(9).a(notifyPhoneState));
    }

    public static s a(UCarProto.NotifyRemoveCamera notifyRemoveCamera) {
        return v.a(f().a(o.CAR).a(19).a(notifyRemoveCamera));
    }

    public static s a(UCarProto.NotifySwitchDayOrNight notifySwitchDayOrNight) {
        return v.a(f().a(o.CAR).a(15).a(notifySwitchDayOrNight));
    }

    public static s a(UCarProto.POIAddress pOIAddress) {
        return v.a(f().a(o.PHONE).a(33).a(pOIAddress));
    }

    public static s a(UCarProto.PickUpCall pickUpCall) {
        return v.a(f().a(o.CAR).a(35).a(pickUpCall));
    }

    public static s a(UCarProto.SetCameraState setCameraState) {
        return v.a(f().a(o.PHONE).a(20).a(setCameraState));
    }

    public static s a(UCarProto.VRCmdToPhone vRCmdToPhone) {
        return v.a(f().a(o.CAR).a(13).a(vRCmdToPhone));
    }

    private static void a(int i, s sVar) {
        v.a(f.PB3, c.CONTROL, i, sVar);
    }

    private static void a(int i, s sVar, i iVar) {
        v.a(f.PB3, c.CONTROL, i, sVar, iVar);
    }

    public static s b() {
        return f().a(v.a()).a(1).a((UCarProto.Heartbeat) UCarProto.Heartbeat.newBuilder().setTimestamp(System.currentTimeMillis()).build());
    }

    public static boolean b(s sVar) {
        return sVar.o() && sVar.f() == c.CONTROL && sVar.j() == 1;
    }

    public static s c() {
        return v.a(f().a(o.CAR).a(5).a((UCarProto.NotifyCarToBackground) UCarProto.NotifyCarToBackground.newBuilder().setTimestamp(System.currentTimeMillis()).build()));
    }

    public static UCarProto.AppListChanged c(s sVar) {
        a(32, sVar, i.SEND_SYNC);
        try {
            return UCarProto.AppListChanged.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseAppListChangedMessage error: " + e.getMessage());
        }
    }

    public static s d() {
        return v.a(f().a(o.CAR).a(4).a((UCarProto.NotifyCarToForeground) UCarProto.NotifyCarToForeground.newBuilder().setTimestamp(System.currentTimeMillis()).build()));
    }

    public static UCarProto.AppStateChanged d(s sVar) {
        a(31, sVar, i.SEND_SYNC);
        try {
            return UCarProto.AppStateChanged.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseAppStateChangedMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.AudioPlayerControl e(s sVar) {
        a(17, sVar);
        try {
            return UCarProto.AudioPlayerControl.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseAudioPlayerControl error: " + e.getMessage());
        }
    }

    public static void e() {
        v.a(c.CONTROL, new a());
    }

    private static t f() {
        return s.r().a(c.CONTROL);
    }

    public static UCarProto.AwakenVoiceAssistant f(s sVar) {
        a(16, sVar);
        try {
            return UCarProto.AwakenVoiceAssistant.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseAwakenVoiceAssistantMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.BluetoothMacInfo g(s sVar) {
        a(22, sVar);
        try {
            return UCarProto.BluetoothMacInfo.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseBluetoothMacInfo error: " + e.getMessage());
        }
    }

    public static UCarProto.CallInfo h(s sVar) {
        a(34, sVar, i.SEND);
        try {
            return UCarProto.CallInfo.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseCallInfoMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.CustomKeyEvent i(s sVar) {
        a(12, sVar);
        try {
            return UCarProto.CustomKeyEvent.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseCustomKeyEventMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.Disconnect j(s sVar) {
        a(23, sVar);
        try {
            return UCarProto.Disconnect.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseDisconnect error: " + e.getMessage());
        }
    }

    public static UCarProto.GetAppDetailInfoRequest k(s sVar) {
        a(28, sVar, i.REQ);
        try {
            return UCarProto.GetAppDetailInfoRequest.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetAppDetailInfoRequestMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetAppDetailInfoResponse l(s sVar) {
        a(29, sVar, i.RES);
        try {
            return UCarProto.GetAppDetailInfoResponse.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetAppDetailInfoResponseMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetAppListRequest m(s sVar) {
        a(26, sVar, i.REQ);
        try {
            return UCarProto.GetAppListRequest.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetAppListRequestMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetAppListResponse n(s sVar) {
        a(27, sVar, i.RES);
        try {
            return UCarProto.GetAppListResponse.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetAppListResponseMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetPortRequest o(s sVar) {
        a(2, sVar);
        try {
            return UCarProto.GetPortRequest.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetPortRequestMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetPortResponse p(s sVar) {
        a(3, sVar);
        try {
            return UCarProto.GetPortResponse.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetPortResponseMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetUCarConfigRequest q(s sVar) {
        a(24, sVar, i.REQ);
        try {
            return UCarProto.GetUCarConfigRequest.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetUCarConfigRequestMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.GetUCarConfigResponse r(s sVar) {
        a(25, sVar, i.RES);
        try {
            return UCarProto.GetUCarConfigResponse.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseGetUCarConfigResponseMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.Heartbeat s(s sVar) {
        a(1, sVar);
        try {
            return UCarProto.Heartbeat.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseHeartbeatMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.InvokeApp t(s sVar) {
        a(30, sVar, i.SEND_SYNC);
        try {
            return UCarProto.InvokeApp.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseInvokeAppMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyAddCamera u(s sVar) {
        a(18, sVar);
        try {
            return UCarProto.NotifyAddCamera.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyAddCameraMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyAudioPlayerState v(s sVar) {
        a(8, sVar);
        try {
            return UCarProto.NotifyAudioPlayerState.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyAudioPlayerStateMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyCallHungUp w(s sVar) {
        a(14, sVar);
        try {
            return UCarProto.NotifyCallHungUp.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyCallHungUpMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyCameraStateChanged x(s sVar) {
        a(21, sVar);
        try {
            return UCarProto.NotifyCameraStateChanged.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyMicrophoneStateMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyCarToBackground y(s sVar) {
        a(5, sVar);
        try {
            return UCarProto.NotifyCarToBackground.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyHomeToBackgroundMessage error: " + e.getMessage());
        }
    }

    public static UCarProto.NotifyCarToForeground z(s sVar) {
        a(4, sVar);
        try {
            return UCarProto.NotifyCarToForeground.parseFrom(sVar.b());
        } catch (InvalidProtocolBufferException e) {
            throw new l("parseNotifyHomeToForegroundMessage error: " + e.getMessage());
        }
    }
}
