// 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);

  /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `EngineSettings(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
  ///
  /// Usage
  /// ```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,
  });
}

/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfEngineSettings.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfEngineSettings.copyWith.fieldName(...)`
class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
  const _$EngineSettingsCWProxyImpl(this._value);

  final EngineSettings _value;

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

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

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

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

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

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

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

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

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

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

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

  @override
  /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `EngineSettings(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
  ///
  /// Usage
  /// ```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(),
  }) {
    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?,
    );
  }
}

extension $EngineSettingsCopyWith on EngineSettings {
  /// Returns a callable class that can be used as follows: `instanceOfEngineSettings.copyWith(...)` or like so:`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'],
      ),
      userAgent: json['userAgent'] as String?,
    );

Map<String, dynamic> _$EngineSettingsToJson(
  EngineSettings instance,
) => <String, dynamic>{
  'userAgent': instance.userAgent,
  '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]!,
};

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',
};
