// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'server_config.dart';

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

_$ServerConfigImpl _$$ServerConfigImplFromJson(Map<String, dynamic> json) =>
    _$ServerConfigImpl(
      system: SystemConfig.fromJson(json['system'] as Map<String, dynamic>),
      stories: StoriesConfig.fromJson(json['stories'] as Map<String, dynamic>),
      chats: ChatsModuleConfig.fromJson(json['chats'] as Map<String, dynamic>),
      messages:
          MessagesConfig.fromJson(json['messages'] as Map<String, dynamic>),
      webRtc: WebRtcConfig.fromJson(json['webRtc'] as Map<String, dynamic>),
      klipy: KlipyConfig.fromJson(json['klipy'] as Map<String, dynamic>),
      import: ImportConfig.fromJson(json['import'] as Map<String, dynamic>),
      federation:
          FederationConfig.fromJson(json['federation'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$$ServerConfigImplToJson(_$ServerConfigImpl instance) =>
    <String, dynamic>{
      'system': instance.system,
      'stories': instance.stories,
      'chats': instance.chats,
      'messages': instance.messages,
      'webRtc': instance.webRtc,
      'klipy': instance.klipy,
      'import': instance.import,
      'federation': instance.federation,
    };

_$SystemConfigImpl _$$SystemConfigImplFromJson(Map<String, dynamic> json) =>
    _$SystemConfigImpl(
      domainUrl: json['domainUrl'] as String,
      enableRegistration: json['enableRegistration'] as bool,
      serverTimezone: json['serverTimezone'] as String? ?? 'UTC',
      adminRoute: json['adminRoute'] as String? ?? 'admin',
    );

Map<String, dynamic> _$$SystemConfigImplToJson(_$SystemConfigImpl instance) =>
    <String, dynamic>{
      'domainUrl': instance.domainUrl,
      'enableRegistration': instance.enableRegistration,
      'serverTimezone': instance.serverTimezone,
      'adminRoute': instance.adminRoute,
    };

_$StoriesConfigImpl _$$StoriesConfigImplFromJson(Map<String, dynamic> json) =>
    _$StoriesConfigImpl(
      enabled: json['enabled'] as bool,
      maxStoriesPerPeriod: (json['maxStoriesPerPeriod'] as num).toInt(),
      storyLifetimeHours: (json['storyLifetimeHours'] as num).toInt(),
      textStoriesEnabled: json['textStoriesEnabled'] as bool,
      textStoryDurationSeconds:
          (json['textStoryDurationSeconds'] as num).toInt(),
      mediaStoryMaxDurationSeconds:
          (json['mediaStoryMaxDurationSeconds'] as num).toInt(),
      maxMediaSizeBytes: (json['maxMediaSizeBytes'] as num).toInt(),
    );

Map<String, dynamic> _$$StoriesConfigImplToJson(_$StoriesConfigImpl instance) =>
    <String, dynamic>{
      'enabled': instance.enabled,
      'maxStoriesPerPeriod': instance.maxStoriesPerPeriod,
      'storyLifetimeHours': instance.storyLifetimeHours,
      'textStoriesEnabled': instance.textStoriesEnabled,
      'textStoryDurationSeconds': instance.textStoryDurationSeconds,
      'mediaStoryMaxDurationSeconds': instance.mediaStoryMaxDurationSeconds,
      'maxMediaSizeBytes': instance.maxMediaSizeBytes,
    };

_$ChatsModuleConfigImpl _$$ChatsModuleConfigImplFromJson(
        Map<String, dynamic> json) =>
    _$ChatsModuleConfigImpl(
      supportGroups: json['supportGroups'] as bool,
      maxGroupParticipants: (json['maxGroupParticipants'] as num).toInt(),
      allowChatToGroupConversion: json['allowChatToGroupConversion'] as bool,
      enableFolders: json['enableFolders'] as bool,
      enableAutoClean: json['enableAutoClean'] as bool? ?? false,
    );

Map<String, dynamic> _$$ChatsModuleConfigImplToJson(
        _$ChatsModuleConfigImpl instance) =>
    <String, dynamic>{
      'supportGroups': instance.supportGroups,
      'maxGroupParticipants': instance.maxGroupParticipants,
      'allowChatToGroupConversion': instance.allowChatToGroupConversion,
      'enableFolders': instance.enableFolders,
      'enableAutoClean': instance.enableAutoClean,
    };

_$MessagesConfigImpl _$$MessagesConfigImplFromJson(Map<String, dynamic> json) =>
    _$MessagesConfigImpl(
      dailyMessageLimitPerUser:
          (json['dailyMessageLimitPerUser'] as num).toInt(),
      chatMessageLimit: (json['chatMessageLimit'] as num).toInt(),
      allowMedia: json['allowMedia'] as bool,
      maxMediaSizeBytes: (json['maxMediaSizeBytes'] as num).toInt(),
      allowedMediaTypes: (json['allowedMediaTypes'] as List<dynamic>)
          .map((e) => e as String)
          .toList(),
      allowVoiceMessages: json['allowVoiceMessages'] as bool,
      allowForwarding: json['allowForwarding'] as bool,
      allowReactions: json['allowReactions'] as bool,
      allowReplies: json['allowReplies'] as bool,
      allowQuoting: json['allowQuoting'] as bool,
      allowMessageDeletion: json['allowMessageDeletion'] as bool,
      forbidCopying: json['forbidCopying'] as bool,
      allowLinks: json['allowLinks'] as bool,
      allowPolls: json['allowPolls'] as bool,
      allowPinning: json['allowPinning'] as bool,
      maxFileSize: (json['maxFileSize'] as num?)?.toInt() ?? 0,
    );

Map<String, dynamic> _$$MessagesConfigImplToJson(
        _$MessagesConfigImpl instance) =>
    <String, dynamic>{
      'dailyMessageLimitPerUser': instance.dailyMessageLimitPerUser,
      'chatMessageLimit': instance.chatMessageLimit,
      'allowMedia': instance.allowMedia,
      'maxMediaSizeBytes': instance.maxMediaSizeBytes,
      'allowedMediaTypes': instance.allowedMediaTypes,
      'allowVoiceMessages': instance.allowVoiceMessages,
      'allowForwarding': instance.allowForwarding,
      'allowReactions': instance.allowReactions,
      'allowReplies': instance.allowReplies,
      'allowQuoting': instance.allowQuoting,
      'allowMessageDeletion': instance.allowMessageDeletion,
      'forbidCopying': instance.forbidCopying,
      'allowLinks': instance.allowLinks,
      'allowPolls': instance.allowPolls,
      'allowPinning': instance.allowPinning,
      'maxFileSize': instance.maxFileSize,
    };

_$WebRtcConfigImpl _$$WebRtcConfigImplFromJson(Map<String, dynamic> json) =>
    _$WebRtcConfigImpl(
      enabled: json['enabled'] as bool,
      enableVoiceCalls: json['enableVoiceCalls'] as bool,
      enableVideoCalls: json['enableVideoCalls'] as bool,
      enableScreenSharing: json['enableScreenSharing'] as bool,
      turnHost: json['turnHost'] as String,
      turnPort: (json['turnPort'] as num).toInt(),
      turnUser: json['turnUser'] as String? ?? '',
      turnSecret: json['turnSecret'] as String? ?? '',
    );

Map<String, dynamic> _$$WebRtcConfigImplToJson(_$WebRtcConfigImpl instance) =>
    <String, dynamic>{
      'enabled': instance.enabled,
      'enableVoiceCalls': instance.enableVoiceCalls,
      'enableVideoCalls': instance.enableVideoCalls,
      'enableScreenSharing': instance.enableScreenSharing,
      'turnHost': instance.turnHost,
      'turnPort': instance.turnPort,
      'turnUser': instance.turnUser,
      'turnSecret': instance.turnSecret,
    };

_$KlipyConfigImpl _$$KlipyConfigImplFromJson(Map<String, dynamic> json) =>
    _$KlipyConfigImpl(
      enabled: json['enabled'] as bool,
      appName: json['appName'] as String,
      apiKey: json['apiKey'] as String? ?? '',
    );

Map<String, dynamic> _$$KlipyConfigImplToJson(_$KlipyConfigImpl instance) =>
    <String, dynamic>{
      'enabled': instance.enabled,
      'appName': instance.appName,
      'apiKey': instance.apiKey,
    };

_$ImportConfigImpl _$$ImportConfigImplFromJson(Map<String, dynamic> json) =>
    _$ImportConfigImpl(
      enableTelegramImport: json['enableTelegramImport'] as bool? ?? false,
    );

Map<String, dynamic> _$$ImportConfigImplToJson(_$ImportConfigImpl instance) =>
    <String, dynamic>{
      'enableTelegramImport': instance.enableTelegramImport,
    };

_$FederationConfigImpl _$$FederationConfigImplFromJson(
        Map<String, dynamic> json) =>
    _$FederationConfigImpl(
      enabled: json['enabled'] as bool,
      serverDescription: json['serverDescription'] as String,
      allowedDomains: (json['allowedDomains'] as List<dynamic>)
          .map(
              (e) => FederationDomainConfig.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$$FederationConfigImplToJson(
        _$FederationConfigImpl instance) =>
    <String, dynamic>{
      'enabled': instance.enabled,
      'serverDescription': instance.serverDescription,
      'allowedDomains': instance.allowedDomains,
    };

_$FederationDomainConfigImpl _$$FederationDomainConfigImplFromJson(
        Map<String, dynamic> json) =>
    _$FederationDomainConfigImpl(
      domain: json['domain'] as String,
      enabled: json['enabled'] as bool,
    );

Map<String, dynamic> _$$FederationDomainConfigImplToJson(
        _$FederationDomainConfigImpl instance) =>
    <String, dynamic>{
      'domain': instance.domain,
      'enabled': instance.enabled,
    };
