// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'getParticipantsResponse.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

GetParticipantsResponse _$GetParticipantsResponseFromJson(
        Map<String, dynamic> json) =>
    GetParticipantsResponse(
      (json['data'] as List<dynamic>)
          .map((e) =>
              GetParticipantsResponseObject.fromJson(e as Map<String, dynamic>))
          .toSet(),
    )..headers = (json['headers'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, e as String),
      );

Map<String, dynamic> _$GetParticipantsResponseToJson(
    GetParticipantsResponse instance) {
  final val = <String, dynamic>{};

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('headers', instance.headers);
  val['data'] = instance.data.map((e) => e.toJson()).toList();
  return val;
}

GetParticipantsResponseObject _$GetParticipantsResponseObjectFromJson(
        Map<String, dynamic> json) =>
    GetParticipantsResponseObject(
      json['attendeeId'] as int,
      json['actorType'] as String,
      json['actorId'] as String,
      json['displayName'] as String,
      $enumDecode(_$GetParticipantsResponseObjectParticipantTypeEnumMap,
          json['participantType']),
      json['lastPing'] as int,
      $enumDecode(_$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap,
          json['inCall']),
      json['permissions'] as int,
      json['attendeePermissions'] as int,
      json['sessionId'] as String?,
      (json['sessionIds'] as List<dynamic>).map((e) => e as String).toList(),
      json['status'] as String?,
      json['statusIcon'] as String?,
      json['statusMessage'] as String?,
      json['roomToken'] as String?,
    );

Map<String, dynamic> _$GetParticipantsResponseObjectToJson(
        GetParticipantsResponseObject instance) =>
    <String, dynamic>{
      'attendeeId': instance.attendeeId,
      'actorType': instance.actorType,
      'actorId': instance.actorId,
      'displayName': instance.displayName,
      'participantType': _$GetParticipantsResponseObjectParticipantTypeEnumMap[
          instance.participantType]!,
      'lastPing': instance.lastPing,
      'inCall': _$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap[
          instance.inCall]!,
      'permissions': instance.permissions,
      'attendeePermissions': instance.attendeePermissions,
      'sessionId': instance.sessionId,
      'sessionIds': instance.sessionIds,
      'status': instance.status,
      'statusIcon': instance.statusIcon,
      'statusMessage': instance.statusMessage,
      'roomToken': instance.roomToken,
    };

const _$GetParticipantsResponseObjectParticipantTypeEnumMap = {
  GetParticipantsResponseObjectParticipantType.owner: 1,
  GetParticipantsResponseObjectParticipantType.moderator: 2,
  GetParticipantsResponseObjectParticipantType.user: 3,
  GetParticipantsResponseObjectParticipantType.guest: 4,
  GetParticipantsResponseObjectParticipantType.userFollowingPublicLink: 5,
  GetParticipantsResponseObjectParticipantType.guestWithModeratorPermissions: 6,
};

const _$GetParticipantsResponseObjectParticipantsInCallFlagsEnumMap = {
  GetParticipantsResponseObjectParticipantsInCallFlags.disconnected: 0,
  GetParticipantsResponseObjectParticipantsInCallFlags.inCall: 1,
  GetParticipantsResponseObjectParticipantsInCallFlags.providesAudio: 2,
  GetParticipantsResponseObjectParticipantsInCallFlags.providesVideo: 3,
  GetParticipantsResponseObjectParticipantsInCallFlags.usesSipDialIn: 4,
};
