// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'get_breakers_response.dart';

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

GetBreakersResponse _$GetBreakersResponseFromJson(Map<String, dynamic> json) =>
    GetBreakersResponse(
        (json['rules'] as List<dynamic>?)
                ?.map((e) => BreakerRule.fromJson(e as Map<String, dynamic>))
                .toList() ??
            [],
      )
      ..headers = (json['headers'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, e as String),
      );

Map<String, dynamic> _$GetBreakersResponseToJson(
  GetBreakersResponse instance,
) => <String, dynamic>{
  'headers': ?instance.headers,
  'rules': instance.rules.map((e) => e.toJson()).toList(),
};

BreakerRule _$BreakerRuleFromJson(Map<String, dynamic> json) => BreakerRule(
  (json['areas'] as List<dynamic>)
      .map((e) => $enumDecode(_$BreakerAreaEnumMap, e))
      .toList(),
  json['message'] as String,
  (json['maxBuild'] as num?)?.toInt(),
);

Map<String, dynamic> _$BreakerRuleToJson(BreakerRule instance) =>
    <String, dynamic>{
      'areas': instance.areas.map((e) => _$BreakerAreaEnumMap[e]!).toList(),
      'message': instance.message,
      'maxBuild': instance.maxBuild,
    };

const _$BreakerAreaEnumMap = {
  BreakerArea.global: 'GLOBAL',
  BreakerArea.timetable: 'TIMETABLE',
  BreakerArea.talk: 'TALK',
  BreakerArea.files: 'FILES',
  BreakerArea.news: 'NEWS',
  BreakerArea.ticker: 'TICKER',
  BreakerArea.roomPlan: 'ROOMPLAN',
  BreakerArea.grades: 'GRADES',
  BreakerArea.holidays: 'HOLIDAYS',
  BreakerArea.dates: 'DATES',
  BreakerArea.feedback: 'FEEDBACK',
  BreakerArea.more: 'MORE',
};
