// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'engine_settings.dart';

// **************************************************************************
// CopyWithGenerator
// **************************************************************************

abstract class _$EngineSettingsCWProxy {
  EngineSettings javascriptEnabled(bool? javascriptEnabled);

  EngineSettings trackingProtectionPolicy(
    TrackingProtectionPolicy? trackingProtectionPolicy,
  );

  EngineSettings httpsOnlyMode(HttpsOnlyMode? httpsOnlyMode);

  EngineSettings globalPrivacyControlEnabled(bool? globalPrivacyControlEnabled);

  EngineSettings preferredColorScheme(ColorScheme? preferredColorScheme);

  EngineSettings cookieBannerHandlingMode(
    CookieBannerHandlingMode? cookieBannerHandlingMode,
  );

  EngineSettings cookieBannerHandlingModePrivateBrowsing(
    CookieBannerHandlingMode? cookieBannerHandlingModePrivateBrowsing,
  );

  EngineSettings cookieBannerHandlingGlobalRules(
    bool? cookieBannerHandlingGlobalRules,
  );

  EngineSettings cookieBannerHandlingGlobalRulesSubFrames(
    bool? cookieBannerHandlingGlobalRulesSubFrames,
  );

  EngineSettings webContentIsolationStrategy(
    WebContentIsolationStrategy? webContentIsolationStrategy,
  );

  EngineSettings userAgent(String? userAgent);

  EngineSettings enterpriseRootsEnabled(bool? enterpriseRootsEnabled);

  EngineSettings queryParameterStripping(
    QueryParameterStripping queryParameterStripping,
  );

  EngineSettings bounceTrackingProtectionMode(
    BounceTrackingProtectionMode bounceTrackingProtectionMode,
  );

  EngineSettings addonCollection(AddonCollection? addonCollection);

  EngineSettings dohSettingsMode(DohSettingsMode dohSettingsMode);

  EngineSettings dohProviderUrl(String dohProviderUrl);

  EngineSettings dohDefaultProviderUrl(String dohDefaultProviderUrl);

  EngineSettings dohExceptionsList(List<String> dohExceptionsList);

  EngineSettings fingerprintingProtectionOverrides(
    String? fingerprintingProtectionOverrides,
  );

  EngineSettings enablePdfJs(bool enablePdfJs);

  EngineSettings locales(List<String>? locales);

  /// Creates a new instance with the provided field values.
  /// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `EngineSettings(...).copyWith.fieldName(value)`.
  ///
  /// Example:
  /// ```dart
  /// EngineSettings(...).copyWith(id: 12, name: "My name")
  /// ```
  EngineSettings call({
    bool? javascriptEnabled,
    TrackingProtectionPolicy? trackingProtectionPolicy,
    HttpsOnlyMode? httpsOnlyMode,
    bool? globalPrivacyControlEnabled,
    ColorScheme? preferredColorScheme,
    CookieBannerHandlingMode? cookieBannerHandlingMode,
    CookieBannerHandlingMode? cookieBannerHandlingModePrivateBrowsing,
    bool? cookieBannerHandlingGlobalRules,
    bool? cookieBannerHandlingGlobalRulesSubFrames,
    WebContentIsolationStrategy? webContentIsolationStrategy,
    String? userAgent,
    bool? enterpriseRootsEnabled,
    QueryParameterStripping queryParameterStripping,
    BounceTrackingProtectionMode bounceTrackingProtectionMode,
    AddonCollection? addonCollection,
    DohSettingsMode dohSettingsMode,
    String dohProviderUrl,
    String dohDefaultProviderUrl,
    List<String> dohExceptionsList,
    String? fingerprintingProtectionOverrides,
    bool enablePdfJs,
    List<String>? locales,
  });
}

/// Callable proxy for `copyWith` functionality.
/// Use as `instanceOfEngineSettings.copyWith(...)` or call `instanceOfEngineSettings.copyWith.fieldName(value)` for a single field.
class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
  const _$EngineSettingsCWProxyImpl(this._value);

  final EngineSettings _value;

  @override
  EngineSettings javascriptEnabled(bool? javascriptEnabled) =>
      call(javascriptEnabled: javascriptEnabled);

  @override
  EngineSettings trackingProtectionPolicy(
    TrackingProtectionPolicy? trackingProtectionPolicy,
  ) => call(trackingProtectionPolicy: trackingProtectionPolicy);

  @override
  EngineSettings httpsOnlyMode(HttpsOnlyMode? httpsOnlyMode) =>
      call(httpsOnlyMode: httpsOnlyMode);

  @override
  EngineSettings globalPrivacyControlEnabled(
    bool? globalPrivacyControlEnabled,
  ) => call(globalPrivacyControlEnabled: globalPrivacyControlEnabled);

  @override
  EngineSettings preferredColorScheme(ColorScheme? preferredColorScheme) =>
      call(preferredColorScheme: preferredColorScheme);

  @override
  EngineSettings cookieBannerHandlingMode(
    CookieBannerHandlingMode? cookieBannerHandlingMode,
  ) => call(cookieBannerHandlingMode: cookieBannerHandlingMode);

  @override
  EngineSettings cookieBannerHandlingModePrivateBrowsing(
    CookieBannerHandlingMode? cookieBannerHandlingModePrivateBrowsing,
  ) => call(
    cookieBannerHandlingModePrivateBrowsing:
        cookieBannerHandlingModePrivateBrowsing,
  );

  @override
  EngineSettings cookieBannerHandlingGlobalRules(
    bool? cookieBannerHandlingGlobalRules,
  ) => call(cookieBannerHandlingGlobalRules: cookieBannerHandlingGlobalRules);

  @override
  EngineSettings cookieBannerHandlingGlobalRulesSubFrames(
    bool? cookieBannerHandlingGlobalRulesSubFrames,
  ) => call(
    cookieBannerHandlingGlobalRulesSubFrames:
        cookieBannerHandlingGlobalRulesSubFrames,
  );

  @override
  EngineSettings webContentIsolationStrategy(
    WebContentIsolationStrategy? webContentIsolationStrategy,
  ) => call(webContentIsolationStrategy: webContentIsolationStrategy);

  @override
  EngineSettings userAgent(String? userAgent) => call(userAgent: userAgent);

  @override
  EngineSettings enterpriseRootsEnabled(bool? enterpriseRootsEnabled) =>
      call(enterpriseRootsEnabled: enterpriseRootsEnabled);

  @override
  EngineSettings queryParameterStripping(
    QueryParameterStripping queryParameterStripping,
  ) => call(queryParameterStripping: queryParameterStripping);

  @override
  EngineSettings bounceTrackingProtectionMode(
    BounceTrackingProtectionMode bounceTrackingProtectionMode,
  ) => call(bounceTrackingProtectionMode: bounceTrackingProtectionMode);

  @override
  EngineSettings addonCollection(AddonCollection? addonCollection) =>
      call(addonCollection: addonCollection);

  @override
  EngineSettings dohSettingsMode(DohSettingsMode dohSettingsMode) =>
      call(dohSettingsMode: dohSettingsMode);

  @override
  EngineSettings dohProviderUrl(String dohProviderUrl) =>
      call(dohProviderUrl: dohProviderUrl);

  @override
  EngineSettings dohDefaultProviderUrl(String dohDefaultProviderUrl) =>
      call(dohDefaultProviderUrl: dohDefaultProviderUrl);

  @override
  EngineSettings dohExceptionsList(List<String> dohExceptionsList) =>
      call(dohExceptionsList: dohExceptionsList);

  @override
  EngineSettings fingerprintingProtectionOverrides(
    String? fingerprintingProtectionOverrides,
  ) => call(
    fingerprintingProtectionOverrides: fingerprintingProtectionOverrides,
  );

  @override
  EngineSettings enablePdfJs(bool enablePdfJs) =>
      call(enablePdfJs: enablePdfJs);

  @override
  EngineSettings locales(List<String>? locales) => call(locales: locales);

  @override
  /// Creates a new instance with the provided field values.
  /// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `EngineSettings(...).copyWith.fieldName(value)`.
  ///
  /// Example:
  /// ```dart
  /// EngineSettings(...).copyWith(id: 12, name: "My name")
  /// ```
  EngineSettings call({
    Object? javascriptEnabled = const $CopyWithPlaceholder(),
    Object? trackingProtectionPolicy = const $CopyWithPlaceholder(),
    Object? httpsOnlyMode = const $CopyWithPlaceholder(),
    Object? globalPrivacyControlEnabled = const $CopyWithPlaceholder(),
    Object? preferredColorScheme = const $CopyWithPlaceholder(),
    Object? cookieBannerHandlingMode = const $CopyWithPlaceholder(),
    Object? cookieBannerHandlingModePrivateBrowsing =
        const $CopyWithPlaceholder(),
    Object? cookieBannerHandlingGlobalRules = const $CopyWithPlaceholder(),
    Object? cookieBannerHandlingGlobalRulesSubFrames =
        const $CopyWithPlaceholder(),
    Object? webContentIsolationStrategy = const $CopyWithPlaceholder(),
    Object? userAgent = const $CopyWithPlaceholder(),
    Object? enterpriseRootsEnabled = const $CopyWithPlaceholder(),
    Object? queryParameterStripping = const $CopyWithPlaceholder(),
    Object? bounceTrackingProtectionMode = const $CopyWithPlaceholder(),
    Object? addonCollection = const $CopyWithPlaceholder(),
    Object? dohSettingsMode = const $CopyWithPlaceholder(),
    Object? dohProviderUrl = const $CopyWithPlaceholder(),
    Object? dohDefaultProviderUrl = const $CopyWithPlaceholder(),
    Object? dohExceptionsList = const $CopyWithPlaceholder(),
    Object? fingerprintingProtectionOverrides = const $CopyWithPlaceholder(),
    Object? enablePdfJs = const $CopyWithPlaceholder(),
    Object? locales = const $CopyWithPlaceholder(),
  }) {
    return EngineSettings(
      javascriptEnabled: javascriptEnabled == const $CopyWithPlaceholder()
          ? _value.javascriptEnabled
          // ignore: cast_nullable_to_non_nullable
          : javascriptEnabled as bool?,
      trackingProtectionPolicy:
          trackingProtectionPolicy == const $CopyWithPlaceholder()
          ? _value.trackingProtectionPolicy
          // ignore: cast_nullable_to_non_nullable
          : trackingProtectionPolicy as TrackingProtectionPolicy?,
      httpsOnlyMode: httpsOnlyMode == const $CopyWithPlaceholder()
          ? _value.httpsOnlyMode
          // ignore: cast_nullable_to_non_nullable
          : httpsOnlyMode as HttpsOnlyMode?,
      globalPrivacyControlEnabled:
          globalPrivacyControlEnabled == const $CopyWithPlaceholder()
          ? _value.globalPrivacyControlEnabled
          // ignore: cast_nullable_to_non_nullable
          : globalPrivacyControlEnabled as bool?,
      preferredColorScheme: preferredColorScheme == const $CopyWithPlaceholder()
          ? _value.preferredColorScheme
          // ignore: cast_nullable_to_non_nullable
          : preferredColorScheme as ColorScheme?,
      cookieBannerHandlingMode:
          cookieBannerHandlingMode == const $CopyWithPlaceholder()
          ? _value.cookieBannerHandlingMode
          // ignore: cast_nullable_to_non_nullable
          : cookieBannerHandlingMode as CookieBannerHandlingMode?,
      cookieBannerHandlingModePrivateBrowsing:
          cookieBannerHandlingModePrivateBrowsing ==
              const $CopyWithPlaceholder()
          ? _value.cookieBannerHandlingModePrivateBrowsing
          // ignore: cast_nullable_to_non_nullable
          : cookieBannerHandlingModePrivateBrowsing
                as CookieBannerHandlingMode?,
      cookieBannerHandlingGlobalRules:
          cookieBannerHandlingGlobalRules == const $CopyWithPlaceholder()
          ? _value.cookieBannerHandlingGlobalRules
          // ignore: cast_nullable_to_non_nullable
          : cookieBannerHandlingGlobalRules as bool?,
      cookieBannerHandlingGlobalRulesSubFrames:
          cookieBannerHandlingGlobalRulesSubFrames ==
              const $CopyWithPlaceholder()
          ? _value.cookieBannerHandlingGlobalRulesSubFrames
          // ignore: cast_nullable_to_non_nullable
          : cookieBannerHandlingGlobalRulesSubFrames as bool?,
      webContentIsolationStrategy:
          webContentIsolationStrategy == const $CopyWithPlaceholder()
          ? _value.webContentIsolationStrategy
          // ignore: cast_nullable_to_non_nullable
          : webContentIsolationStrategy as WebContentIsolationStrategy?,
      userAgent: userAgent == const $CopyWithPlaceholder()
          ? _value.userAgent
          // ignore: cast_nullable_to_non_nullable
          : userAgent as String?,
      enterpriseRootsEnabled:
          enterpriseRootsEnabled == const $CopyWithPlaceholder()
          ? _value.enterpriseRootsEnabled
          // ignore: cast_nullable_to_non_nullable
          : enterpriseRootsEnabled as bool?,
      queryParameterStripping:
          queryParameterStripping == const $CopyWithPlaceholder() ||
              queryParameterStripping == null
          ? _value.queryParameterStripping
          // ignore: cast_nullable_to_non_nullable
          : queryParameterStripping as QueryParameterStripping,
      bounceTrackingProtectionMode:
          bounceTrackingProtectionMode == const $CopyWithPlaceholder() ||
              bounceTrackingProtectionMode == null
          ? _value.bounceTrackingProtectionMode
          // ignore: cast_nullable_to_non_nullable
          : bounceTrackingProtectionMode as BounceTrackingProtectionMode,
      addonCollection: addonCollection == const $CopyWithPlaceholder()
          ? _value.addonCollection
          // ignore: cast_nullable_to_non_nullable
          : addonCollection as AddonCollection?,
      dohSettingsMode:
          dohSettingsMode == const $CopyWithPlaceholder() ||
              dohSettingsMode == null
          ? _value.dohSettingsMode
          // ignore: cast_nullable_to_non_nullable
          : dohSettingsMode as DohSettingsMode,
      dohProviderUrl:
          dohProviderUrl == const $CopyWithPlaceholder() ||
              dohProviderUrl == null
          ? _value.dohProviderUrl
          // ignore: cast_nullable_to_non_nullable
          : dohProviderUrl as String,
      dohDefaultProviderUrl:
          dohDefaultProviderUrl == const $CopyWithPlaceholder() ||
              dohDefaultProviderUrl == null
          ? _value.dohDefaultProviderUrl
          // ignore: cast_nullable_to_non_nullable
          : dohDefaultProviderUrl as String,
      dohExceptionsList:
          dohExceptionsList == const $CopyWithPlaceholder() ||
              dohExceptionsList == null
          ? _value.dohExceptionsList
          // ignore: cast_nullable_to_non_nullable
          : dohExceptionsList as List<String>,
      fingerprintingProtectionOverrides:
          fingerprintingProtectionOverrides == const $CopyWithPlaceholder()
          ? _value.fingerprintingProtectionOverrides
          // ignore: cast_nullable_to_non_nullable
          : fingerprintingProtectionOverrides as String?,
      enablePdfJs:
          enablePdfJs == const $CopyWithPlaceholder() || enablePdfJs == null
          ? _value.enablePdfJs
          // ignore: cast_nullable_to_non_nullable
          : enablePdfJs as bool,
      locales: locales == const $CopyWithPlaceholder()
          ? _value.locales
          // ignore: cast_nullable_to_non_nullable
          : locales as List<String>?,
    );
  }
}

extension $EngineSettingsCopyWith on EngineSettings {
  /// Returns a callable class used to build a new instance with modified fields.
  /// Example: `instanceOfEngineSettings.copyWith(...)` or `instanceOfEngineSettings.copyWith.fieldName(...)`.
  // ignore: library_private_types_in_public_api
  _$EngineSettingsCWProxy get copyWith => _$EngineSettingsCWProxyImpl(this);
}

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

EngineSettings _$EngineSettingsFromJson(Map<String, dynamic> json) =>
    EngineSettings.withDefaults(
      javascriptEnabled: json['javascriptEnabled'] as bool?,
      trackingProtectionPolicy: $enumDecodeNullable(
        _$TrackingProtectionPolicyEnumMap,
        json['trackingProtectionPolicy'],
      ),
      httpsOnlyMode: $enumDecodeNullable(
        _$HttpsOnlyModeEnumMap,
        json['httpsOnlyMode'],
      ),
      globalPrivacyControlEnabled: json['globalPrivacyControlEnabled'] as bool?,
      preferredColorScheme: $enumDecodeNullable(
        _$ColorSchemeEnumMap,
        json['preferredColorScheme'],
      ),
      cookieBannerHandlingMode: $enumDecodeNullable(
        _$CookieBannerHandlingModeEnumMap,
        json['cookieBannerHandlingMode'],
      ),
      cookieBannerHandlingModePrivateBrowsing: $enumDecodeNullable(
        _$CookieBannerHandlingModeEnumMap,
        json['cookieBannerHandlingModePrivateBrowsing'],
      ),
      cookieBannerHandlingGlobalRules:
          json['cookieBannerHandlingGlobalRules'] as bool?,
      cookieBannerHandlingGlobalRulesSubFrames:
          json['cookieBannerHandlingGlobalRulesSubFrames'] as bool?,
      webContentIsolationStrategy: $enumDecodeNullable(
        _$WebContentIsolationStrategyEnumMap,
        json['webContentIsolationStrategy'],
      ),
      queryParameterStripping: $enumDecodeNullable(
        _$QueryParameterStrippingEnumMap,
        json['queryParameterStripping'],
      ),
      bounceTrackingProtectionMode: $enumDecodeNullable(
        _$BounceTrackingProtectionModeEnumMap,
        json['bounceTrackingProtectionMode'],
      ),
      userAgent: json['userAgent'] as String?,
      enterpriseRootsEnabled: json['enterpriseRootsEnabled'] as bool?,
      addonCollection: EngineSettings._addonCollectionFromJson(
        json['addonCollection'] as String?,
      ),
      dohSettingsMode: $enumDecodeNullable(
        _$DohSettingsModeEnumMap,
        json['dohSettingsMode'],
      ),
      dohProviderUrl: json['dohProviderUrl'] as String?,
      dohDefaultProviderUrl: json['dohDefaultProviderUrl'] as String?,
      dohExceptionsList: (json['dohExceptionsList'] as List<dynamic>?)
          ?.map((e) => e as String)
          .toList(),
      fingerprintingProtectionOverrides:
          json['fingerprintingProtectionOverrides'] as String?,
      enablePdfJs: json['enablePdfJs'] as bool?,
      locales: (json['locales'] as List<dynamic>?)
          ?.map((e) => e as String)
          .toList(),
    );

Map<String, dynamic> _$EngineSettingsToJson(
  EngineSettings instance,
) => <String, dynamic>{
  'userAgent': instance.userAgent,
  'fingerprintingProtectionOverrides':
      instance.fingerprintingProtectionOverrides,
  'javascriptEnabled': instance.javascriptEnabled,
  'trackingProtectionPolicy':
      _$TrackingProtectionPolicyEnumMap[instance.trackingProtectionPolicy]!,
  'httpsOnlyMode': _$HttpsOnlyModeEnumMap[instance.httpsOnlyMode]!,
  'preferredColorScheme': _$ColorSchemeEnumMap[instance.preferredColorScheme]!,
  'globalPrivacyControlEnabled': instance.globalPrivacyControlEnabled,
  'cookieBannerHandlingMode':
      _$CookieBannerHandlingModeEnumMap[instance.cookieBannerHandlingMode]!,
  'cookieBannerHandlingModePrivateBrowsing':
      _$CookieBannerHandlingModeEnumMap[instance
          .cookieBannerHandlingModePrivateBrowsing]!,
  'cookieBannerHandlingGlobalRules': instance.cookieBannerHandlingGlobalRules,
  'cookieBannerHandlingGlobalRulesSubFrames':
      instance.cookieBannerHandlingGlobalRulesSubFrames,
  'webContentIsolationStrategy':
      _$WebContentIsolationStrategyEnumMap[instance
          .webContentIsolationStrategy]!,
  'enterpriseRootsEnabled': instance.enterpriseRootsEnabled,
  'locales': instance.locales,
  'queryParameterStripping':
      _$QueryParameterStrippingEnumMap[instance.queryParameterStripping]!,
  'bounceTrackingProtectionMode':
      _$BounceTrackingProtectionModeEnumMap[instance
          .bounceTrackingProtectionMode]!,
  'addonCollection': EngineSettings._addonCollectionToJson(
    instance.addonCollection,
  ),
  'dohSettingsMode': _$DohSettingsModeEnumMap[instance.dohSettingsMode]!,
  'dohProviderUrl': instance.dohProviderUrl,
  'dohDefaultProviderUrl': instance.dohDefaultProviderUrl,
  'dohExceptionsList': instance.dohExceptionsList,
  'enablePdfJs': instance.enablePdfJs,
};

const _$TrackingProtectionPolicyEnumMap = {
  TrackingProtectionPolicy.none: 'none',
  TrackingProtectionPolicy.recommended: 'recommended',
  TrackingProtectionPolicy.strict: 'strict',
  TrackingProtectionPolicy.custom: 'custom',
};

const _$HttpsOnlyModeEnumMap = {
  HttpsOnlyMode.disabled: 'disabled',
  HttpsOnlyMode.privateOnly: 'privateOnly',
  HttpsOnlyMode.enabled: 'enabled',
};

const _$ColorSchemeEnumMap = {
  ColorScheme.system: 'system',
  ColorScheme.light: 'light',
  ColorScheme.dark: 'dark',
};

const _$CookieBannerHandlingModeEnumMap = {
  CookieBannerHandlingMode.disabled: 'disabled',
  CookieBannerHandlingMode.rejectAll: 'rejectAll',
  CookieBannerHandlingMode.rejectOrAcceptAll: 'rejectOrAcceptAll',
};

const _$WebContentIsolationStrategyEnumMap = {
  WebContentIsolationStrategy.isolateNothing: 'isolateNothing',
  WebContentIsolationStrategy.isolateEverything: 'isolateEverything',
  WebContentIsolationStrategy.isolateHighValue: 'isolateHighValue',
};

const _$QueryParameterStrippingEnumMap = {
  QueryParameterStripping.disabled: 'disabled',
  QueryParameterStripping.privateOnly: 'privateOnly',
  QueryParameterStripping.enabled: 'enabled',
};

const _$BounceTrackingProtectionModeEnumMap = {
  BounceTrackingProtectionMode.disabled: 'disabled',
  BounceTrackingProtectionMode.enabled: 'enabled',
  BounceTrackingProtectionMode.enabledStandby: 'enabledStandby',
  BounceTrackingProtectionMode.enabledDryRun: 'enabledDryRun',
};

const _$DohSettingsModeEnumMap = {
  DohSettingsMode.geckoDefault: 'geckoDefault',
  DohSettingsMode.increased: 'increased',
  DohSettingsMode.max: 'max',
  DohSettingsMode.off: 'off',
};
