// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'ads_config.dart';

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

TaichiConfig _$TaichiConfigFromJson(Map<String, dynamic> json) => TaichiConfig(
      enable: json['enable'] as bool? ?? false,
      threshold: json['threshold'] as String? ?? '',
      abnormalThreshold:
          (json['abnormal_threshold'] as num?)?.toDouble() ?? 1.0,
    );

Map<String, dynamic> _$TaichiConfigToJson(TaichiConfig instance) =>
    <String, dynamic>{
      'enable': instance.enable,
      'threshold': instance.threshold,
      'abnormal_threshold': instance.abnormalThreshold,
    };

ImpressionData _$ImpressionDataFromJson(Map<String, dynamic> json) =>
    ImpressionData(
      platform: json['ad_platform'] as String? ?? 'MAX',
      id: json['id'] as String? ?? '',
      unitId: json['adunit_id'] as String? ?? '',
      unitName: json['adunit_name'] as String? ?? '',
      unitFormat: json['adunit_format'] as String? ?? '',
      groupId: json['adgroup_id'] as String? ?? '',
      groupName: json['adgroup_name'] as String? ?? '',
      groupType: json['adgroup_type'] as String? ?? '',
      currency: json['currency'] as String? ?? '',
      country: json['country'] as String? ?? '',
      appVersion: json['app_version'] as String? ?? '',
      groupPriority: json['adgroup_priority'] as int? ?? 0,
      publisherRevenue: (json['publisher_revenue'] as num?)?.toDouble() ?? -1,
      networkName: json['network_name'] as String? ?? '',
      networkPlacementId: json['network_placement_id'] as String? ?? '',
      precision: json['precision'] as String? ?? '',
    );

Map<String, dynamic> _$ImpressionDataToJson(ImpressionData instance) =>
    <String, dynamic>{
      'ad_platform': instance.platform,
      'id': instance.id,
      'adunit_id': instance.unitId,
      'adunit_name': instance.unitName,
      'adunit_format': instance.unitFormat,
      'adgroup_id': instance.groupId,
      'adgroup_name': instance.groupName,
      'adgroup_type': instance.groupType,
      'currency': instance.currency,
      'country': instance.country,
      'app_version': instance.appVersion,
      'adgroup_priority': instance.groupPriority,
      'publisher_revenue': instance.publisherRevenue,
      'network_name': instance.networkName,
      'network_placement_id': instance.networkPlacementId,
      'precision': instance.precision,
    };

CpmCalibrationData _$CpmCalibrationDataFromJson(Map<String, dynamic> json) =>
    CpmCalibrationData(
      (json['list'] as List<dynamic>?)
              ?.map(
                  (e) => CpmCalibrationItem.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$CpmCalibrationDataToJson(CpmCalibrationData instance) =>
    <String, dynamic>{
      'list': instance.items,
    };

CpmCalibrationItem _$CpmCalibrationItemFromJson(Map<String, dynamic> json) =>
    CpmCalibrationItem(
      json['format'] as String,
      (json['cpm'] as num).toDouble(),
      json['country'] as String,
    );

Map<String, dynamic> _$CpmCalibrationItemToJson(CpmCalibrationItem instance) =>
    <String, dynamic>{
      'format': instance.format,
      'cpm': instance.cpm,
      'country': instance.country,
    };

IRLDConfig _$IRLDConfigFromJson(Map<String, dynamic> json) => IRLDConfig(
      fbCpmCacheInHour: json['fb_ecpm_cache_h'] as int? ?? 12,
      fbIrldReport: json['fb_irld_report'] as bool? ?? false,
      abnormalThreshold:
          (json['abnormal_threshold'] as num?)?.toDouble() ?? 0.1,
    );

Map<String, dynamic> _$IRLDConfigToJson(IRLDConfig instance) =>
    <String, dynamic>{
      'fb_ecpm_cache_h': instance.fbCpmCacheInHour,
      'fb_irld_report': instance.fbIrldReport,
      'abnormal_threshold': instance.abnormalThreshold,
    };

AdBannerConfig _$AdBannerConfigFromJson(Map<String, dynamic> json) =>
    AdBannerConfig(
      json['free_s'] as int? ?? 600,
      json['validation'] as String? ?? '',
      json['amazon_enable'] as bool? ?? false,
      json['pubmatic_enable'] as bool? ?? false,
      json['auto_dispose_interval_m'] as int? ?? 5,
    );

Map<String, dynamic> _$AdBannerConfigToJson(AdBannerConfig instance) =>
    <String, dynamic>{
      'free_s': instance.freeInSecond,
      'validation': instance.validation,
      'amazon_enable': instance.amazonEnable,
      'pubmatic_enable': instance.pubmaticEnable,
      'auto_dispose_interval_m': instance.autoDisposeIntervalInMinutes,
    };

AdInterstitialConfig _$AdInterstitialConfigFromJson(
        Map<String, dynamic> json) =>
    AdInterstitialConfig(
      json['free_s'] as int? ?? 600,
      json['validation'] as String? ?? '',
      json['scene'] == null
          ? []
          : joinedStringConvert.fromJson(json['scene'] as String),
      json['retry_min_s'] as int? ?? 4,
      json['retry_max_s'] as int? ?? 600,
      amazonEnable: json['amazon_enable'] as bool? ?? false,
      specialScenes: json['sp_scene'] == null
          ? {}
          : configStringIntMapStringConvert
              .fromJson(json['sp_scene'] as String),
      impGapInSeconds: json['imp_gap_s'] as int?,
    );

Map<String, dynamic> _$AdInterstitialConfigToJson(
        AdInterstitialConfig instance) =>
    <String, dynamic>{
      'free_s': instance.freeInSecond,
      'validation': instance.validation,
      'scene': joinedStringConvert.toJson(instance.scenes),
      'sp_scene':
          configStringIntMapStringConvert.toJson(instance.specialScenes),
      'retry_min_s': instance.retryMinTimeInSecond,
      'retry_max_s': instance.retryMaxTimeInSecond,
      'amazon_enable': instance.amazonEnable,
      'imp_gap_s': instance.impGapInSeconds,
    };

StrategyAdsConfig _$StrategyAdsConfigFromJson(Map<String, dynamic> json) =>
    StrategyAdsConfig(
      interstitialIds: (json['iads'] as List<dynamic>?)
          ?.map((e) => AdId.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$StrategyAdsConfigToJson(StrategyAdsConfig instance) =>
    <String, dynamic>{
      'iads': instance.interstitialIds,
    };

AdRewardedConfig _$AdRewardedConfigFromJson(Map<String, dynamic> json) =>
    AdRewardedConfig(
      json['retry_min_s'] as int? ?? 4,
      json['retry_max_s'] as int? ?? 600,
      resetAds: json['reset_ads'] as bool? ?? true,
      validation: json['validation'] as String? ?? '',
    );

Map<String, dynamic> _$AdRewardedConfigToJson(AdRewardedConfig instance) =>
    <String, dynamic>{
      'retry_min_s': instance.retryMinTimeInSecond,
      'retry_max_s': instance.retryMaxTimeInSecond,
      'reset_ads': instance.resetAds,
      'validation': instance.validation,
    };

IOSAttConfig _$IOSAttConfigFromJson(Map<String, dynamic> json) => IOSAttConfig(
      enable: json['enable'] as bool? ?? false,
    );

Map<String, dynamic> _$IOSAttConfigToJson(IOSAttConfig instance) =>
    <String, dynamic>{
      'enable': instance.enable,
    };

CommonAdsConfig _$CommonAdsConfigFromJson(Map<String, dynamic> json) =>
    CommonAdsConfig(
      compliantInitialization: json['compliant_init'] as bool? ?? false,
    );

Map<String, dynamic> _$CommonAdsConfigToJson(CommonAdsConfig instance) =>
    <String, dynamic>{
      'compliant_init': instance.compliantInitialization,
    };
