package com.mogo.v2x.data

import androidx.annotation.Keep
import java.io.Serializable
import java.util.*

@Keep
class V2XMarkerCardResult: V2XBaseData(), Serializable {

    companion object {
        private const  val serialVersionUID = -92L
    }

    /**
     * 要查询的数据类型
     * CARD_TYPE_USER_DATA：用户相关数据
     * CARD_TYPE_ROAD_CONDITION：路况数据
     * CARD_TYPE_LIVE：正播相关数据
     */
    var dataType: List<String>? = null

    /**
     * 车聊聊数据集合
     */
    var carChat: List<V2XMarkerCarChat>? = null

    /**
     * 分享的音乐数据集合
     */
    var shareMusic: List<V2XMarkerShareMusic>? = null

    /**
     * 新鲜事分享的数据集合
     */
    var noveltyInfo: List<V2XMarkerNoveltyInfo>? = null

    /**
     * 在线车辆数据集合
     */
    var onlineCar: List<V2XMarkerOnlineCar>? = null

    /**
     * 探路数据集合
     */
    var exploreWay: List<V2XMarkerExploreWay>? = null

    /**
     * 服务端下发消息时间
     */
    var messageTime: Long = 0

    /**
     * 额外信息
     */
    var extras:  Map<String, Any>? = null

    override fun toString(): String {
        return "MarkerCardResult(dataType=$dataType, carChat=$carChat, shareMusic=$shareMusic, noveltyInfo=$noveltyInfo, onlineCar=$onlineCar, exploreWay=$exploreWay, messageTime=$messageTime, extras=$extras)"
    }
}

@Keep
class V2XMarkerCarChat: Serializable {

    companion object {
        private const  val serialVersionUID = -92L
    }

    /**
     * 卡片类型
     */
    var type: String? = null

    /**
     * 地址信息
     */
    var location: V2XMarkerLocation? = null

    /**
     * 用户信息
     */
    var userInfo: V2XMarkerUserInfo? = null

    override fun toString(): String {
        return "V2XMarkerCarChat(type=$type, location=$location, userInfo=$userInfo)"
    }
}

@Keep
class V2XMarkerShareMusic: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 事件类型
     */
    var type: String? = null

    /**
     * 音乐专辑信息
     */
    var bookInfo: String? = null

    /**
     * 歌曲ID
     */
    var id = 0

    /**
     * 点赞数
     */
    var likeNumber = 0

    /**
     * 位置信息
     */
    var location: V2XMarkerLocation? = null

    /**
     * 已弃用
     */
    var mediaId: String? = null

    /**
     * 歌曲封面-已弃用
     */
    var mediaImg: String? = null

    /**
     * 歌曲名字
     */
    var mediaName: String? = null

    /**
     * 歌手名字
     */
    var mediaSinger: String? = null

    /**
     * 播放地址
     */
    var mediaUrl: String? = null

    /**
     * 分享文案
     */
    var shareContentText: String? = null

    /**
     * 分享类型
     */
    var shareType = 0

    /**
     * 用户信息
     */
    var userInfo: V2XMarkerUserInfo? = null

    override fun toString(): String {
        return "V2XMarkerShareMusic(bookInfo=$bookInfo, id=$id, likeNumber=$likeNumber, location=$location, mediaId=$mediaId, mediaImg=$mediaImg, mediaName=$mediaName, mediaSinger=$mediaSinger, mediaUrl=$mediaUrl, shareContentText=$shareContentText, shareType=$shareType, type=$type, userInfo=$userInfo)"
    }
}

/**
 * 新鲜事儿Marker数据
 */
@Keep
class V2XMarkerNoveltyInfo: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 事件类型
     */
    var type: String? = null

    /**
     * 车机唯一标识
     */
    var sn: String? = null

    /**
     * 标记坐标
     */
    var location: V2XMarkerLocation? = null

    /**
     * POI类型
     */
    var poiType: String? = null

    /**
     * 新鲜事分享内容
     */
    var contentData: ContentData? = null

    @Keep
    class ContentData: Serializable {

        companion object {
            private const  val serialVersionUID = -93L
        }

        /**
         * 信息ID
         */
        var infoId: String? = null

        /**
         * 分享内容
         */
        var content: String? = null

        /**
         * 分享内容左上角图标
         */
        var iconUrl: String? = null

        /**
         * 分享内容图片
         */
        var imgUrl: String? = null

        /**
         * 点赞数
         */
        var likeNum: Long = 0

        /**
         * 标题
         */
        var title: String? = null

        /**
         * 加油站油价
         */
        var gasPrices: String? = null

        /**
         * 是否显示导航
         */
        var isDisplayNavigation = false

        /**
         * 是否显示好友主页
         */
        var isDesplayHost = false

        /**
         * 是否是新鲜的
         */
        var isFabulous = false

        /**
         * 分享类型
         */
        var styleType: String? = null

        /**
         * 上报类型:
         * 1-用户上报
         * 2-后台上报
         * 3-三方上报
         */
        var uploadType: String? = null

        override fun toString(): String {
            return "ContentData(content=$content, iconUrl=$iconUrl, imgUrl=$imgUrl, infoId=$infoId, likeNum=$likeNum, title=$title, gasPrices=$gasPrices, isDisplayNavigation=$isDisplayNavigation, isDesplayHost=$isDesplayHost, isFabulous=$isFabulous, styleType=$styleType, uploadType=$uploadType)"
        }
    }

    override fun toString(): String {
        return "V2XMarkerNoveltyInfo(type=$type, sn=$sn, location=$location, poiType=$poiType, contentData=$contentData)"
    }
}

@Keep
class V2XMarkerOnlineCar: Serializable  {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 事件类型
     */
    var type: String? = null

    /**
     * 车辆位置
     */
    var location: V2XMarkerLocation? = null

    /**
     * focus:false-未关注，true-关注
     */
    var focus: Boolean? = null

    /**
     * 用户数据
     */
    var userInfo: V2XMarkerUserInfo? = null

    /**
     * 车辆数据
     */
    var carInfo: V2XMarkerCarInfo? = null

    /**
     * 车辆路线
     */
    var pois: List<V2XMarkerCarPois>? = null

    /**
     * 动态数据
     */
    var dynamicData: V2XMarkerDynamicData? = null

    /**
     * 爱好数据集合
     */
    var hobbyData: V2XMarkerHobbyDatum? = null

    /**
     * 活动范围数据集合
     */
    var activitiesScope: List<V2XMarkerActivitiesScope>? = null

    /**
     * 匹配度
     */
    var compatibility = 0

    override fun toString(): String {
        return "V2XMarkerOnlineCar(type=$type, location=$location, focus=$focus, userInfo=$userInfo, carInfo=$carInfo, pois=$pois, dynamicData=$dynamicData, hobbyData=$hobbyData, activitiesScope=$activitiesScope, compatibility=$compatibility)"
    }
}

@Keep
class V2XMarkerExploreWay: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 事件类型
     */
    var type: String? = null

    /**
     * 信息ID
     */
    var infoId: String? = null

    /**
     * POI类型
     */
    var poiType: String? = null

    /**
     * 车辆唯一标识
     */
    var sn: String? = null

    /**
     * 位置信息
     */
    var location: V2XMarkerLocation? = null

    /**
     * 车辆方位
     */
    var direction = 0

    /**
     * 是否可直播（1为可直播，0不可直播）
     */
    var canLive: String? = "0"

    /**
     * 是图片还是视频（1视频，0图片）
     */
    var fileType = 0

    /**
     * 车辆详细地址
     */
    var addr: String? = null

    /**
     * 事件下发的时间
     */
    var generateTime: Long = 0L

    /**
     * 城市名称
     */
    var cityName: String? = null

    /**
     * 距离
     */
    var distance = 0.0

    /**
     * 用户信息
     */
    var userInfo: V2XMarkerUserInfo? = null

    /**
     * 视频地址和图片地址
     */
    var items: List<MarkerExploreWayItem>? = null

    /**
     * 上报类型：
     * 1-用户上报
     * 2-后台上报
     * 3-三方上报
     */
    var uploadType: String? = null

    /**
     * 是否是新鲜的
     */
    var isFabulous = false

    /**
     * 需要用户判断是否拥堵 进行UGC问答
     */
    var infoCheckNode = 0

    override fun toString(): String {
        return "V2XMarkerExploreWay(infoId=$infoId, type=$type, poiType=$poiType, sn=$sn, location=$location, direction=$direction, canLive=$canLive, fileType=$fileType, addr=$addr, generateTime=$generateTime, cityName=$cityName, distance=$distance, userInfo=$userInfo, items=$items, uploadType=$uploadType, isFabulous=$isFabulous, infoCheckNode=$infoCheckNode)"
    }
}

@Keep
class V2XMarkerUserInfo: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 自车车机唯一标识
     */
    var sn: String? = null

    /**
     * 用户ID
     */
    var userId: Long = 0

    /**
     * 用户昵称
     */
    var userName: String? = null

    /**
     * 用户头像
     */
    var userHead: String? = null

    /**
     * gender": "男｜女｜无（也可以0｜1｜2根据实际库存返回即可）
     */
    var gender: String? = null

    /**
     * 年龄段，可以为空，与车聊聊一致
     */
    var age: Int? = null

    /**
     * 末次活跃周驾驶行为平均得分
     */
    var lastActiveweekAvgscore: String? = null

    /**
     * 车辆安全标签
     */
    var safeLabel: String? = null

    /**
     * 1-老司机
     * 2-安全驾驶
     * 3-危险驾驶
     */
    var safeLabelType = 0

    override fun toString(): String {
        return "V2XMarkerUserInfo(sn=$sn, userId=$userId, userName=$userName, userHead=$userHead, gender=$gender, age=$age, lastActiveweekAvgscore=$lastActiveweekAvgscore, safeLabel=$safeLabel, safeLabelType=$safeLabelType)"
    }
}

@Keep
class V2XMarkerCarInfo: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 车品牌Logo资源链接
     */
    var carBrandLogoUrl: String? = null

    /**
     * 车型名称
     */
    var carTypeName: String? = null

    /**
     * 车类型：
     * 0-普通车辆
     * 1-警车
     * 2-救护车
     * 3-失控车
     * 4-道路救援车
     */
    var vehicleType: Int = 0

    /**
     * 车辆直播相关信息
     */
    var carLiveInfo: CarLiveInfo? = null

    @Keep
    class CarLiveInfo: Serializable {

        companion object {
            private const  val serialVersionUID = -93L
        }

        /**
         * rtmp视频直播地址rtmp://
         */
        var videoUrl: String? = null

        /**
         * 直播频道【直播心跳接口参数】C_1
         */
        var videoChannel: String? = null

        /**
         * 直播源sn
         */
        var videoSn: String? = null

        override fun toString(): String {
            return "CarLiveInfo(videoUrl=$videoUrl, videoChannel=$videoChannel, videoSn=$videoSn)"
        }
    }

    override fun toString(): String {
        return "V2XMarkerCarInfo(carBrandLogoUrl=$carBrandLogoUrl, carTypeName=$carTypeName, vehicleType=$vehicleType, carLiveInfo=$carLiveInfo)"
    }
}

@Keep
class V2XMarkerCarPois: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 位置信息，返回的值不为空并且长度为2的倍数
     */
    var coordinates: List<*>? = null

    /**
     * 车的朝向角度
     */
    var angle = 0.0

    /**
     * 地区code
     */
    var adcode: String? = null

    override fun toString(): String {
        return "V2XMarkerCarPois(coordinates=$coordinates, angle=$angle, adcode=$adcode)"
    }
}

@Keep
class V2XMarkerDynamicData: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * QQ音乐，懒人听书，乐听头条 2 为书籍听书，3 为新闻,1 为qq音乐
     */
    var type = 0

    /**
     * qq音乐id，书的bookId
     */
    var mediaId: String? = null

    /**
     * qq音乐url 懒人听书为“”
     */
    var mediaUrl: String? = null

    /**
     * 歌曲名 ，当前播放书名，新闻标题内容
     */
    var mediaName: String? = null

    /**
     * 演唱歌手,当前章节,新闻来源
     */
    var mediaSinger: String? = null

    /**
     * 歌曲封面,书籍封面,新闻预览图
     */
    var mediaImg: String? = null

    /**
     * 音乐类别，类似经典 ，流行只有qq特有
     */
    var mediaType: String? = null

    /**
     * 音频总时长
     */
    var maxTime = 0

    /**
     * 懒人听书json串
     */
    var bookInfo: String? = null

    /**
     * 当前播放时长，可以不加，播放进度单独独立出来
     */
    var curTime = 0

    /**
     * 是否是本地音频，只有qq音乐
     */
    var isLocalMedia = false

    /**
     * 播放模式，顺序，单曲循环，随机
     */
    var mediaPlayMode = 0

    /**
     * 1 播放 2 缓冲  0 暂停/停止 -1 播放错误
     */
    var playState = 0

    override fun toString(): String {
        return "V2XMarkerDynamicData(type=$type, mediaId=$mediaId, mediaUrl=$mediaUrl, mediaName=$mediaName, mediaSinger=$mediaSinger, mediaImg=$mediaImg, mediaType=$mediaType, maxTime=$maxTime, bookInfo=$bookInfo, curTime=$curTime, isLocalMedia=$isLocalMedia, mediaPlayMode=$mediaPlayMode, playState=$playState)"
    }
}

@Keep
class V2XMarkerHobbyDatum: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 最喜欢的两位歌手
     */
    var singerTop2: List<MarkerOnlineTag>? = null

    /**
     * 最喜欢的两种音乐类型
     */
    var songTypeTop2: List<MarkerOnlineTag>? = null

    /**
     *  最喜欢的资讯类型
     */
    var newsType: List<MarkerOnlineTag>? = null

    /**
     *  最喜欢听的两本书
     */
    var listenBookTop2: List<MarkerOnlineTag>? = null

    /**
     * 是否喜爱社交
     */
    var ifSociety: List<MarkerOnlineTag>? = null

    @Keep
    class MarkerOnlineTag: Serializable  {

        companion object {
            private const  val serialVersionUID = -93L
        }

        /**
         * 社交内容
         */
        var content: String? = null

        /**
         * 是否选中
         */
        var isCheck: Boolean = false

        override fun toString(): String {
            return "MarkerOnlineTag(content=$content, isCheck=$isCheck)"
        }
    }

    override fun toString(): String {
        return "V2XMarkerHobbyDatum(singerTop2=$singerTop2, songTypeTop2=$songTypeTop2, newsType=$newsType, listenBookTop2=$listenBookTop2, ifSociety=$ifSociety)"
    }
}

@Keep
class V2XMarkerActivitiesScope: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 活动范围内容
     */
    var content: String? = null

    /**
     * 是否选中
     */
    var isCheck: Boolean = false

    override fun toString(): String {
        return "V2XMarkerActivitiesScope(content=$content, isCheck=$isCheck)"
    }
}

/**
 * 道路情报，V2X预警，地图道路事件POI，违章停车POI等
 */
@Keep
class MarkerExploreWayItem: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 缩略图
     */
    var thumbnail: String? = null

    /**
     * 正式图
     */
    var url: String? = null

    /**
     * 描述字段
     */
    var content: String? = null

    /**
     * 违章停车人数
     */
    var illegalCount = 0.0

    override fun toString(): String {
        return "MarkerExploreWayItem(thumbnail=$thumbnail, url=$url, content=$content, illegalCount=$illegalCount)"
    }
}

@Keep
class V2XMarkerLocation: Serializable {

    companion object {
        private const  val serialVersionUID = -93L
    }

    /**
     * 纬度
     */
    var lat: Double = 0.0

    /**
     * 纬度
     */
    var lon: Double = 0.0

    /**
     * 车头角度，可以没有
     */
    var angle: Double = 0.0

    /**
     * 具体的位置信息
     */
    var address: String? = null

    override fun toString(): String {
        return "V2XMarkerLocation(lat=$lat, lon=$lon, angle=$angle, address=$address)"
    }
}