/// data : {"mics":[{"micIndex":0,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":1,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":2,"micLock":false,"micMute":false,"roomId":"1954021581748412417","user":{"account":"8826517","charmLevel":17,"cpUserId":"0","heartbeatVal":0,"id":"1954021558348390402","roles":"HOMEOWNER","useProps":[{"propsResources":{"sourceUrl":"https://tkm-yumi.oss-ap-southeast-1.aliyuncs.com/svgasource/manager-f77b1efa-ae00-4935-872d-cbb5db3d2fb0.svga","type":"AVATAR_FRAME"}},{"propsResources":{"code":"10026","cover":"https://tkm-yumi.oss-ap-southeast-1.aliyuncs.com/svga_cover/manager-c0508d8c-8393-46e8-84c2-3319be893ba7.png","type":"NOBLE_VIP"}}],"userAvatar":"https://tkm-yumi.oss-ap-southeast-1.aliyuncs.com/avatar/750355c0-cfa7-4447-b453-f622bd2e3859.jpg","userNickname":"JacksoUI","userSex":1}},{"micIndex":3,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":4,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":5,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":6,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":7,"micLock":false,"micMute":true,"roomId":"1954021581748412417"},{"micIndex":8,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":9,"micLock":false,"micMute":true,"roomId":"1954021581748412417"}],"timeId":"1968592383197442050"}
/// reqTraceId : "GL-f45a6e89405a2fff611dbb94f02a8d84"
/// type : "MIC_CHANGE"

import 'package:yumi/shared/business_logic/models/res/mic_res.dart';

class BroadCastMicChangePush {
  BroadCastMicChangePush({
      Data? data,
      String? reqTraceId,
      String? type,}){
    _data = data;
    _reqTraceId = reqTraceId;
    _type = type;
}

  BroadCastMicChangePush.fromJson(dynamic json) {
    _data = json['data'] != null ? Data.fromJson(json['data']) : null;
    _reqTraceId = json['reqTraceId'];
    _type = json['type'];
  }
  Data? _data;
  String? _reqTraceId;
  String? _type;
  Data? get data => _data;
  String? get reqTraceId => _reqTraceId;
  String? get type => _type;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_data != null) {
      map['data'] = _data?.toJson();
    }
    map['reqTraceId'] = _reqTraceId;
    map['type'] = _type;
    return map;
  }

}

/// mics : [{"micIndex":0,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":1,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":2,"micLock":false,"micMute":false,"roomId":"1954021581748412417","user":{"account":"8826517","charmLevel":17,"cpUserId":"0","heartbeatVal":0,"id":"1954021558348390402","roles":"HOMEOWNER","useProps":[{"propsResources":{"sourceUrl":"https://tkm-yumi.oss-ap-southeast-1.aliyuncs.com/svgasource/manager-f77b1efa-ae00-4935-872d-cbb5db3d2fb0.svga","type":"AVATAR_FRAME"}},{"propsResources":{"code":"10026","cover":"https://tkm-yumi.oss-ap-southeast-1.aliyuncs.com/svga_cover/manager-c0508d8c-8393-46e8-84c2-3319be893ba7.png","type":"NOBLE_VIP"}}],"userAvatar":"https://tkm-yumi.oss-ap-southeast-1.aliyuncs.com/avatar/750355c0-cfa7-4447-b453-f622bd2e3859.jpg","userNickname":"JacksoUI","userSex":1}},{"micIndex":3,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":4,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":5,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":6,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":7,"micLock":false,"micMute":true,"roomId":"1954021581748412417"},{"micIndex":8,"micLock":false,"micMute":false,"roomId":"1954021581748412417"},{"micIndex":9,"micLock":false,"micMute":true,"roomId":"1954021581748412417"}]
/// timeId : "1968592383197442050"

class Data {
  Data({
      List<MicRes>? mics,
      String? timeId,}){
    _mics = mics;
    _timeId = timeId;
}

  Data.fromJson(dynamic json) {
    if (json['mics'] != null) {
      _mics = [];
      json['mics'].forEach((v) {
        _mics?.add(MicRes.fromJson(v));
      });
    }
    _timeId = json['timeId'];
  }
  List<MicRes>? _mics;
  String? _timeId;
  List<MicRes>? get mics => _mics;
  String? get timeId => _timeId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_mics != null) {
      map['mics'] = _mics?.map((v) => v.toJson()).toList();
    }
    map['timeId'] = _timeId;
    return map;
  }

}