module WebDriverPreCore.BiDi.Emulation
  ( SetGeolocationOverride (..),
    SetLocaleOverride (..),
    SetScreenOrientationOverride (..),
    SetScreenSettingsOverride (..),
    SetTimezoneOverride (..),
    SetTouchOverride (..),
    SetForcedColorsModeThemeOverride (..),
    SetNetworkConditions (..),
    SetUserAgentOverride (..),
    SetScriptingEnabled (..),
    GeoProperty (..),
    GeolocationCoordinates (..),
    GeolocationPositionError (..),
    ScreenArea (..),
    ScreenOrientationOverride (..),
    ScreenOrientationNatural (..),
    ScreenOrientationType (..),
    ForcedColorsModeTheme (..),
    NetworkConditions (..),
    NetworkConditionsOffline (..),
  )
where

import AesonUtils (opt)
import Data.Aeson (ToJSON (..), Value (..), object, (.=))
import Data.Maybe (catMaybes)
import Data.Text (Text)
import GHC.Generics (Generic)
import WebDriverPreCore.BiDi.CoreTypes (BrowsingContext, JSUInt, UserContext)

-- ######### Remote #########

-- Note: emulation module does not have a local end

data GeoProperty
  = Coordinates GeolocationCoordinates
  | ClearCoodrdinates
  | PositionError GeolocationPositionError
  deriving (Int -> GeoProperty -> ShowS
[GeoProperty] -> ShowS
GeoProperty -> String
(Int -> GeoProperty -> ShowS)
-> (GeoProperty -> String)
-> ([GeoProperty] -> ShowS)
-> Show GeoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GeoProperty -> ShowS
showsPrec :: Int -> GeoProperty -> ShowS
$cshow :: GeoProperty -> String
show :: GeoProperty -> String
$cshowList :: [GeoProperty] -> ShowS
showList :: [GeoProperty] -> ShowS
Show, GeoProperty -> GeoProperty -> Bool
(GeoProperty -> GeoProperty -> Bool)
-> (GeoProperty -> GeoProperty -> Bool) -> Eq GeoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GeoProperty -> GeoProperty -> Bool
== :: GeoProperty -> GeoProperty -> Bool
$c/= :: GeoProperty -> GeoProperty -> Bool
/= :: GeoProperty -> GeoProperty -> Bool
Eq, (forall x. GeoProperty -> Rep GeoProperty x)
-> (forall x. Rep GeoProperty x -> GeoProperty)
-> Generic GeoProperty
forall x. Rep GeoProperty x -> GeoProperty
forall x. GeoProperty -> Rep GeoProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. GeoProperty -> Rep GeoProperty x
from :: forall x. GeoProperty -> Rep GeoProperty x
$cto :: forall x. Rep GeoProperty x -> GeoProperty
to :: forall x. Rep GeoProperty x -> GeoProperty
Generic)

data SetGeolocationOverride = MkSetGeolocationOverride
  { SetGeolocationOverride -> GeoProperty
override :: GeoProperty,
    SetGeolocationOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetGeolocationOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetGeolocationOverride -> ShowS
[SetGeolocationOverride] -> ShowS
SetGeolocationOverride -> String
(Int -> SetGeolocationOverride -> ShowS)
-> (SetGeolocationOverride -> String)
-> ([SetGeolocationOverride] -> ShowS)
-> Show SetGeolocationOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetGeolocationOverride -> ShowS
showsPrec :: Int -> SetGeolocationOverride -> ShowS
$cshow :: SetGeolocationOverride -> String
show :: SetGeolocationOverride -> String
$cshowList :: [SetGeolocationOverride] -> ShowS
showList :: [SetGeolocationOverride] -> ShowS
Show, SetGeolocationOverride -> SetGeolocationOverride -> Bool
(SetGeolocationOverride -> SetGeolocationOverride -> Bool)
-> (SetGeolocationOverride -> SetGeolocationOverride -> Bool)
-> Eq SetGeolocationOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetGeolocationOverride -> SetGeolocationOverride -> Bool
== :: SetGeolocationOverride -> SetGeolocationOverride -> Bool
$c/= :: SetGeolocationOverride -> SetGeolocationOverride -> Bool
/= :: SetGeolocationOverride -> SetGeolocationOverride -> Bool
Eq, (forall x. SetGeolocationOverride -> Rep SetGeolocationOverride x)
-> (forall x.
    Rep SetGeolocationOverride x -> SetGeolocationOverride)
-> Generic SetGeolocationOverride
forall x. Rep SetGeolocationOverride x -> SetGeolocationOverride
forall x. SetGeolocationOverride -> Rep SetGeolocationOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetGeolocationOverride -> Rep SetGeolocationOverride x
from :: forall x. SetGeolocationOverride -> Rep SetGeolocationOverride x
$cto :: forall x. Rep SetGeolocationOverride x -> SetGeolocationOverride
to :: forall x. Rep SetGeolocationOverride x -> SetGeolocationOverride
Generic)

instance ToJSON SetGeolocationOverride where
  toJSON :: SetGeolocationOverride -> Value
  toJSON :: SetGeolocationOverride -> Value
toJSON MkSetGeolocationOverride {GeoProperty
override :: SetGeolocationOverride -> GeoProperty
override :: GeoProperty
override, Maybe [BrowsingContext]
contexts :: SetGeolocationOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetGeolocationOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [Pair]
geoField [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes [Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts, Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts]
    where
      geoField :: [Pair]
geoField = case GeoProperty
override of
        Coordinates GeolocationCoordinates
coords -> [(Key
"coordinates" Key -> GeolocationCoordinates -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= GeolocationCoordinates
coords)]
        GeoProperty
ClearCoodrdinates -> [(Key
"coordinates" Key -> Value -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Value
Null)]
        PositionError GeolocationPositionError
err -> [(Key
"error" Key -> GeolocationPositionError -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= GeolocationPositionError
err)]

data SetLocaleOverride = MkSetLocaleOverride
  { SetLocaleOverride -> Maybe Text
locale :: Maybe Text,
    SetLocaleOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetLocaleOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetLocaleOverride -> ShowS
[SetLocaleOverride] -> ShowS
SetLocaleOverride -> String
(Int -> SetLocaleOverride -> ShowS)
-> (SetLocaleOverride -> String)
-> ([SetLocaleOverride] -> ShowS)
-> Show SetLocaleOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetLocaleOverride -> ShowS
showsPrec :: Int -> SetLocaleOverride -> ShowS
$cshow :: SetLocaleOverride -> String
show :: SetLocaleOverride -> String
$cshowList :: [SetLocaleOverride] -> ShowS
showList :: [SetLocaleOverride] -> ShowS
Show, SetLocaleOverride -> SetLocaleOverride -> Bool
(SetLocaleOverride -> SetLocaleOverride -> Bool)
-> (SetLocaleOverride -> SetLocaleOverride -> Bool)
-> Eq SetLocaleOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetLocaleOverride -> SetLocaleOverride -> Bool
== :: SetLocaleOverride -> SetLocaleOverride -> Bool
$c/= :: SetLocaleOverride -> SetLocaleOverride -> Bool
/= :: SetLocaleOverride -> SetLocaleOverride -> Bool
Eq, (forall x. SetLocaleOverride -> Rep SetLocaleOverride x)
-> (forall x. Rep SetLocaleOverride x -> SetLocaleOverride)
-> Generic SetLocaleOverride
forall x. Rep SetLocaleOverride x -> SetLocaleOverride
forall x. SetLocaleOverride -> Rep SetLocaleOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetLocaleOverride -> Rep SetLocaleOverride x
from :: forall x. SetLocaleOverride -> Rep SetLocaleOverride x
$cto :: forall x. Rep SetLocaleOverride x -> SetLocaleOverride
to :: forall x. Rep SetLocaleOverride x -> SetLocaleOverride
Generic)

instance ToJSON SetLocaleOverride where
  toJSON :: SetLocaleOverride -> Value
  toJSON :: SetLocaleOverride -> Value
toJSON MkSetLocaleOverride {Maybe Text
locale :: SetLocaleOverride -> Maybe Text
locale :: Maybe Text
locale, Maybe [BrowsingContext]
contexts :: SetLocaleOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetLocaleOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"locale" Key -> Maybe Text -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
locale]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetScreenOrientationOverride = MkSetScreenOrientationOverride
  { SetScreenOrientationOverride -> Maybe ScreenOrientationOverride
screenOrientation :: Maybe ScreenOrientationOverride,
    SetScreenOrientationOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetScreenOrientationOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetScreenOrientationOverride -> ShowS
[SetScreenOrientationOverride] -> ShowS
SetScreenOrientationOverride -> String
(Int -> SetScreenOrientationOverride -> ShowS)
-> (SetScreenOrientationOverride -> String)
-> ([SetScreenOrientationOverride] -> ShowS)
-> Show SetScreenOrientationOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetScreenOrientationOverride -> ShowS
showsPrec :: Int -> SetScreenOrientationOverride -> ShowS
$cshow :: SetScreenOrientationOverride -> String
show :: SetScreenOrientationOverride -> String
$cshowList :: [SetScreenOrientationOverride] -> ShowS
showList :: [SetScreenOrientationOverride] -> ShowS
Show, SetScreenOrientationOverride
-> SetScreenOrientationOverride -> Bool
(SetScreenOrientationOverride
 -> SetScreenOrientationOverride -> Bool)
-> (SetScreenOrientationOverride
    -> SetScreenOrientationOverride -> Bool)
-> Eq SetScreenOrientationOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetScreenOrientationOverride
-> SetScreenOrientationOverride -> Bool
== :: SetScreenOrientationOverride
-> SetScreenOrientationOverride -> Bool
$c/= :: SetScreenOrientationOverride
-> SetScreenOrientationOverride -> Bool
/= :: SetScreenOrientationOverride
-> SetScreenOrientationOverride -> Bool
Eq, (forall x.
 SetScreenOrientationOverride -> Rep SetScreenOrientationOverride x)
-> (forall x.
    Rep SetScreenOrientationOverride x -> SetScreenOrientationOverride)
-> Generic SetScreenOrientationOverride
forall x.
Rep SetScreenOrientationOverride x -> SetScreenOrientationOverride
forall x.
SetScreenOrientationOverride -> Rep SetScreenOrientationOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetScreenOrientationOverride -> Rep SetScreenOrientationOverride x
from :: forall x.
SetScreenOrientationOverride -> Rep SetScreenOrientationOverride x
$cto :: forall x.
Rep SetScreenOrientationOverride x -> SetScreenOrientationOverride
to :: forall x.
Rep SetScreenOrientationOverride x -> SetScreenOrientationOverride
Generic)

instance ToJSON SetScreenOrientationOverride where
  toJSON :: SetScreenOrientationOverride -> Value
  toJSON :: SetScreenOrientationOverride -> Value
toJSON MkSetScreenOrientationOverride {Maybe ScreenOrientationOverride
screenOrientation :: SetScreenOrientationOverride -> Maybe ScreenOrientationOverride
screenOrientation :: Maybe ScreenOrientationOverride
screenOrientation, Maybe [BrowsingContext]
contexts :: SetScreenOrientationOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetScreenOrientationOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"screenOrientation" Key -> Maybe ScreenOrientationOverride -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ScreenOrientationOverride
screenOrientation]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetScreenSettingsOverride = MkSetScreenSettingsOverride
  { SetScreenSettingsOverride -> Maybe ScreenArea
screenArea :: Maybe ScreenArea,
    SetScreenSettingsOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetScreenSettingsOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetScreenSettingsOverride -> ShowS
[SetScreenSettingsOverride] -> ShowS
SetScreenSettingsOverride -> String
(Int -> SetScreenSettingsOverride -> ShowS)
-> (SetScreenSettingsOverride -> String)
-> ([SetScreenSettingsOverride] -> ShowS)
-> Show SetScreenSettingsOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetScreenSettingsOverride -> ShowS
showsPrec :: Int -> SetScreenSettingsOverride -> ShowS
$cshow :: SetScreenSettingsOverride -> String
show :: SetScreenSettingsOverride -> String
$cshowList :: [SetScreenSettingsOverride] -> ShowS
showList :: [SetScreenSettingsOverride] -> ShowS
Show, SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool
(SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool)
-> (SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool)
-> Eq SetScreenSettingsOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool
== :: SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool
$c/= :: SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool
/= :: SetScreenSettingsOverride -> SetScreenSettingsOverride -> Bool
Eq, (forall x.
 SetScreenSettingsOverride -> Rep SetScreenSettingsOverride x)
-> (forall x.
    Rep SetScreenSettingsOverride x -> SetScreenSettingsOverride)
-> Generic SetScreenSettingsOverride
forall x.
Rep SetScreenSettingsOverride x -> SetScreenSettingsOverride
forall x.
SetScreenSettingsOverride -> Rep SetScreenSettingsOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetScreenSettingsOverride -> Rep SetScreenSettingsOverride x
from :: forall x.
SetScreenSettingsOverride -> Rep SetScreenSettingsOverride x
$cto :: forall x.
Rep SetScreenSettingsOverride x -> SetScreenSettingsOverride
to :: forall x.
Rep SetScreenSettingsOverride x -> SetScreenSettingsOverride
Generic)

-- Note: screenArea is a required field that can be null, while contexts and userContexts are optional
-- Required nullable fields must be included in the JSON with their value (even if null)
-- Optional fields are omitted when Nothing
instance ToJSON SetScreenSettingsOverride where
  toJSON :: SetScreenSettingsOverride -> Value
  toJSON :: SetScreenSettingsOverride -> Value
toJSON MkSetScreenSettingsOverride {Maybe ScreenArea
screenArea :: SetScreenSettingsOverride -> Maybe ScreenArea
screenArea :: Maybe ScreenArea
screenArea, Maybe [BrowsingContext]
contexts :: SetScreenSettingsOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetScreenSettingsOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"screenArea" Key -> Maybe ScreenArea -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ScreenArea
screenArea]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetTimezoneOverride = MkSetTimezoneOverride
  { SetTimezoneOverride -> Maybe Text
timezone :: Maybe Text,
    SetTimezoneOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetTimezoneOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetTimezoneOverride -> ShowS
[SetTimezoneOverride] -> ShowS
SetTimezoneOverride -> String
(Int -> SetTimezoneOverride -> ShowS)
-> (SetTimezoneOverride -> String)
-> ([SetTimezoneOverride] -> ShowS)
-> Show SetTimezoneOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetTimezoneOverride -> ShowS
showsPrec :: Int -> SetTimezoneOverride -> ShowS
$cshow :: SetTimezoneOverride -> String
show :: SetTimezoneOverride -> String
$cshowList :: [SetTimezoneOverride] -> ShowS
showList :: [SetTimezoneOverride] -> ShowS
Show, SetTimezoneOverride -> SetTimezoneOverride -> Bool
(SetTimezoneOverride -> SetTimezoneOverride -> Bool)
-> (SetTimezoneOverride -> SetTimezoneOverride -> Bool)
-> Eq SetTimezoneOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetTimezoneOverride -> SetTimezoneOverride -> Bool
== :: SetTimezoneOverride -> SetTimezoneOverride -> Bool
$c/= :: SetTimezoneOverride -> SetTimezoneOverride -> Bool
/= :: SetTimezoneOverride -> SetTimezoneOverride -> Bool
Eq, (forall x. SetTimezoneOverride -> Rep SetTimezoneOverride x)
-> (forall x. Rep SetTimezoneOverride x -> SetTimezoneOverride)
-> Generic SetTimezoneOverride
forall x. Rep SetTimezoneOverride x -> SetTimezoneOverride
forall x. SetTimezoneOverride -> Rep SetTimezoneOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetTimezoneOverride -> Rep SetTimezoneOverride x
from :: forall x. SetTimezoneOverride -> Rep SetTimezoneOverride x
$cto :: forall x. Rep SetTimezoneOverride x -> SetTimezoneOverride
to :: forall x. Rep SetTimezoneOverride x -> SetTimezoneOverride
Generic)

instance ToJSON SetTimezoneOverride where
  toJSON :: SetTimezoneOverride -> Value
  toJSON :: SetTimezoneOverride -> Value
toJSON MkSetTimezoneOverride {Maybe Text
timezone :: SetTimezoneOverride -> Maybe Text
timezone :: Maybe Text
timezone, Maybe [BrowsingContext]
contexts :: SetTimezoneOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetTimezoneOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"timezone" Key -> Maybe Text -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
timezone]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetForcedColorsModeThemeOverride = MkSetForcedColorsModeThemeOverride
  { SetForcedColorsModeThemeOverride -> Maybe ForcedColorsModeTheme
theme :: Maybe ForcedColorsModeTheme,
    SetForcedColorsModeThemeOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetForcedColorsModeThemeOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetForcedColorsModeThemeOverride -> ShowS
[SetForcedColorsModeThemeOverride] -> ShowS
SetForcedColorsModeThemeOverride -> String
(Int -> SetForcedColorsModeThemeOverride -> ShowS)
-> (SetForcedColorsModeThemeOverride -> String)
-> ([SetForcedColorsModeThemeOverride] -> ShowS)
-> Show SetForcedColorsModeThemeOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetForcedColorsModeThemeOverride -> ShowS
showsPrec :: Int -> SetForcedColorsModeThemeOverride -> ShowS
$cshow :: SetForcedColorsModeThemeOverride -> String
show :: SetForcedColorsModeThemeOverride -> String
$cshowList :: [SetForcedColorsModeThemeOverride] -> ShowS
showList :: [SetForcedColorsModeThemeOverride] -> ShowS
Show, SetForcedColorsModeThemeOverride
-> SetForcedColorsModeThemeOverride -> Bool
(SetForcedColorsModeThemeOverride
 -> SetForcedColorsModeThemeOverride -> Bool)
-> (SetForcedColorsModeThemeOverride
    -> SetForcedColorsModeThemeOverride -> Bool)
-> Eq SetForcedColorsModeThemeOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetForcedColorsModeThemeOverride
-> SetForcedColorsModeThemeOverride -> Bool
== :: SetForcedColorsModeThemeOverride
-> SetForcedColorsModeThemeOverride -> Bool
$c/= :: SetForcedColorsModeThemeOverride
-> SetForcedColorsModeThemeOverride -> Bool
/= :: SetForcedColorsModeThemeOverride
-> SetForcedColorsModeThemeOverride -> Bool
Eq, (forall x.
 SetForcedColorsModeThemeOverride
 -> Rep SetForcedColorsModeThemeOverride x)
-> (forall x.
    Rep SetForcedColorsModeThemeOverride x
    -> SetForcedColorsModeThemeOverride)
-> Generic SetForcedColorsModeThemeOverride
forall x.
Rep SetForcedColorsModeThemeOverride x
-> SetForcedColorsModeThemeOverride
forall x.
SetForcedColorsModeThemeOverride
-> Rep SetForcedColorsModeThemeOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetForcedColorsModeThemeOverride
-> Rep SetForcedColorsModeThemeOverride x
from :: forall x.
SetForcedColorsModeThemeOverride
-> Rep SetForcedColorsModeThemeOverride x
$cto :: forall x.
Rep SetForcedColorsModeThemeOverride x
-> SetForcedColorsModeThemeOverride
to :: forall x.
Rep SetForcedColorsModeThemeOverride x
-> SetForcedColorsModeThemeOverride
Generic)

instance ToJSON SetForcedColorsModeThemeOverride where
  toJSON :: SetForcedColorsModeThemeOverride -> Value
  toJSON :: SetForcedColorsModeThemeOverride -> Value
toJSON MkSetForcedColorsModeThemeOverride {Maybe ForcedColorsModeTheme
theme :: SetForcedColorsModeThemeOverride -> Maybe ForcedColorsModeTheme
theme :: Maybe ForcedColorsModeTheme
theme, Maybe [BrowsingContext]
contexts :: SetForcedColorsModeThemeOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetForcedColorsModeThemeOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"theme" Key -> Maybe ForcedColorsModeTheme -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe ForcedColorsModeTheme
theme]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetNetworkConditions = MkSetNetworkConditions
  { SetNetworkConditions -> Maybe NetworkConditions
networkConditions :: Maybe NetworkConditions,
    SetNetworkConditions -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetNetworkConditions -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetNetworkConditions -> ShowS
[SetNetworkConditions] -> ShowS
SetNetworkConditions -> String
(Int -> SetNetworkConditions -> ShowS)
-> (SetNetworkConditions -> String)
-> ([SetNetworkConditions] -> ShowS)
-> Show SetNetworkConditions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetNetworkConditions -> ShowS
showsPrec :: Int -> SetNetworkConditions -> ShowS
$cshow :: SetNetworkConditions -> String
show :: SetNetworkConditions -> String
$cshowList :: [SetNetworkConditions] -> ShowS
showList :: [SetNetworkConditions] -> ShowS
Show, SetNetworkConditions -> SetNetworkConditions -> Bool
(SetNetworkConditions -> SetNetworkConditions -> Bool)
-> (SetNetworkConditions -> SetNetworkConditions -> Bool)
-> Eq SetNetworkConditions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetNetworkConditions -> SetNetworkConditions -> Bool
== :: SetNetworkConditions -> SetNetworkConditions -> Bool
$c/= :: SetNetworkConditions -> SetNetworkConditions -> Bool
/= :: SetNetworkConditions -> SetNetworkConditions -> Bool
Eq, (forall x. SetNetworkConditions -> Rep SetNetworkConditions x)
-> (forall x. Rep SetNetworkConditions x -> SetNetworkConditions)
-> Generic SetNetworkConditions
forall x. Rep SetNetworkConditions x -> SetNetworkConditions
forall x. SetNetworkConditions -> Rep SetNetworkConditions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetNetworkConditions -> Rep SetNetworkConditions x
from :: forall x. SetNetworkConditions -> Rep SetNetworkConditions x
$cto :: forall x. Rep SetNetworkConditions x -> SetNetworkConditions
to :: forall x. Rep SetNetworkConditions x -> SetNetworkConditions
Generic)

instance ToJSON SetNetworkConditions where
  toJSON :: SetNetworkConditions -> Value
  toJSON :: SetNetworkConditions -> Value
toJSON MkSetNetworkConditions {Maybe NetworkConditions
networkConditions :: SetNetworkConditions -> Maybe NetworkConditions
networkConditions :: Maybe NetworkConditions
networkConditions, Maybe [BrowsingContext]
contexts :: SetNetworkConditions -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetNetworkConditions -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"networkConditions" Key -> Maybe NetworkConditions -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe NetworkConditions
networkConditions]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetUserAgentOverride = MkSetUserAgentOverride
  { SetUserAgentOverride -> Maybe Text
userAgent :: Maybe Text,
    SetUserAgentOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetUserAgentOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetUserAgentOverride -> ShowS
[SetUserAgentOverride] -> ShowS
SetUserAgentOverride -> String
(Int -> SetUserAgentOverride -> ShowS)
-> (SetUserAgentOverride -> String)
-> ([SetUserAgentOverride] -> ShowS)
-> Show SetUserAgentOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetUserAgentOverride -> ShowS
showsPrec :: Int -> SetUserAgentOverride -> ShowS
$cshow :: SetUserAgentOverride -> String
show :: SetUserAgentOverride -> String
$cshowList :: [SetUserAgentOverride] -> ShowS
showList :: [SetUserAgentOverride] -> ShowS
Show, SetUserAgentOverride -> SetUserAgentOverride -> Bool
(SetUserAgentOverride -> SetUserAgentOverride -> Bool)
-> (SetUserAgentOverride -> SetUserAgentOverride -> Bool)
-> Eq SetUserAgentOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetUserAgentOverride -> SetUserAgentOverride -> Bool
== :: SetUserAgentOverride -> SetUserAgentOverride -> Bool
$c/= :: SetUserAgentOverride -> SetUserAgentOverride -> Bool
/= :: SetUserAgentOverride -> SetUserAgentOverride -> Bool
Eq, (forall x. SetUserAgentOverride -> Rep SetUserAgentOverride x)
-> (forall x. Rep SetUserAgentOverride x -> SetUserAgentOverride)
-> Generic SetUserAgentOverride
forall x. Rep SetUserAgentOverride x -> SetUserAgentOverride
forall x. SetUserAgentOverride -> Rep SetUserAgentOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetUserAgentOverride -> Rep SetUserAgentOverride x
from :: forall x. SetUserAgentOverride -> Rep SetUserAgentOverride x
$cto :: forall x. Rep SetUserAgentOverride x -> SetUserAgentOverride
to :: forall x. Rep SetUserAgentOverride x -> SetUserAgentOverride
Generic)

instance ToJSON SetUserAgentOverride where
  toJSON :: SetUserAgentOverride -> Value
  toJSON :: SetUserAgentOverride -> Value
toJSON MkSetUserAgentOverride {Maybe Text
userAgent :: SetUserAgentOverride -> Maybe Text
userAgent :: Maybe Text
userAgent, Maybe [BrowsingContext]
contexts :: SetUserAgentOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetUserAgentOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"userAgent" Key -> Maybe Text -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Text
userAgent]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data SetScriptingEnabled = MkSetScriptingEnabled
  { SetScriptingEnabled -> Maybe Bool
enabled :: Maybe Bool,
    SetScriptingEnabled -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetScriptingEnabled -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetScriptingEnabled -> ShowS
[SetScriptingEnabled] -> ShowS
SetScriptingEnabled -> String
(Int -> SetScriptingEnabled -> ShowS)
-> (SetScriptingEnabled -> String)
-> ([SetScriptingEnabled] -> ShowS)
-> Show SetScriptingEnabled
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetScriptingEnabled -> ShowS
showsPrec :: Int -> SetScriptingEnabled -> ShowS
$cshow :: SetScriptingEnabled -> String
show :: SetScriptingEnabled -> String
$cshowList :: [SetScriptingEnabled] -> ShowS
showList :: [SetScriptingEnabled] -> ShowS
Show, SetScriptingEnabled -> SetScriptingEnabled -> Bool
(SetScriptingEnabled -> SetScriptingEnabled -> Bool)
-> (SetScriptingEnabled -> SetScriptingEnabled -> Bool)
-> Eq SetScriptingEnabled
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetScriptingEnabled -> SetScriptingEnabled -> Bool
== :: SetScriptingEnabled -> SetScriptingEnabled -> Bool
$c/= :: SetScriptingEnabled -> SetScriptingEnabled -> Bool
/= :: SetScriptingEnabled -> SetScriptingEnabled -> Bool
Eq, (forall x. SetScriptingEnabled -> Rep SetScriptingEnabled x)
-> (forall x. Rep SetScriptingEnabled x -> SetScriptingEnabled)
-> Generic SetScriptingEnabled
forall x. Rep SetScriptingEnabled x -> SetScriptingEnabled
forall x. SetScriptingEnabled -> Rep SetScriptingEnabled x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetScriptingEnabled -> Rep SetScriptingEnabled x
from :: forall x. SetScriptingEnabled -> Rep SetScriptingEnabled x
$cto :: forall x. Rep SetScriptingEnabled x -> SetScriptingEnabled
to :: forall x. Rep SetScriptingEnabled x -> SetScriptingEnabled
Generic)

instance ToJSON SetScriptingEnabled where
  toJSON :: SetScriptingEnabled -> Value
  toJSON :: SetScriptingEnabled -> Value
toJSON MkSetScriptingEnabled {Maybe Bool
enabled :: SetScriptingEnabled -> Maybe Bool
enabled :: Maybe Bool
enabled, Maybe [BrowsingContext]
contexts :: SetScriptingEnabled -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetScriptingEnabled -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"enabled" Key -> Maybe Bool -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
enabled]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

-- | Parameters for emulation.setTouchOverride command
-- maxTouchPoints: (js-uint .ge 1) / null - the maximum number of touch points to emulate, or null to clear
data SetTouchOverride = MkSetTouchOverride
  { SetTouchOverride -> Maybe JSUInt
maxTouchPoints :: Maybe JSUInt,
    SetTouchOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext],
    SetTouchOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
  }
  deriving (Int -> SetTouchOverride -> ShowS
[SetTouchOverride] -> ShowS
SetTouchOverride -> String
(Int -> SetTouchOverride -> ShowS)
-> (SetTouchOverride -> String)
-> ([SetTouchOverride] -> ShowS)
-> Show SetTouchOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetTouchOverride -> ShowS
showsPrec :: Int -> SetTouchOverride -> ShowS
$cshow :: SetTouchOverride -> String
show :: SetTouchOverride -> String
$cshowList :: [SetTouchOverride] -> ShowS
showList :: [SetTouchOverride] -> ShowS
Show, SetTouchOverride -> SetTouchOverride -> Bool
(SetTouchOverride -> SetTouchOverride -> Bool)
-> (SetTouchOverride -> SetTouchOverride -> Bool)
-> Eq SetTouchOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetTouchOverride -> SetTouchOverride -> Bool
== :: SetTouchOverride -> SetTouchOverride -> Bool
$c/= :: SetTouchOverride -> SetTouchOverride -> Bool
/= :: SetTouchOverride -> SetTouchOverride -> Bool
Eq, (forall x. SetTouchOverride -> Rep SetTouchOverride x)
-> (forall x. Rep SetTouchOverride x -> SetTouchOverride)
-> Generic SetTouchOverride
forall x. Rep SetTouchOverride x -> SetTouchOverride
forall x. SetTouchOverride -> Rep SetTouchOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. SetTouchOverride -> Rep SetTouchOverride x
from :: forall x. SetTouchOverride -> Rep SetTouchOverride x
$cto :: forall x. Rep SetTouchOverride x -> SetTouchOverride
to :: forall x. Rep SetTouchOverride x -> SetTouchOverride
Generic)

instance ToJSON SetTouchOverride where
  toJSON :: SetTouchOverride -> Value
  toJSON :: SetTouchOverride -> Value
toJSON MkSetTouchOverride {Maybe JSUInt
maxTouchPoints :: SetTouchOverride -> Maybe JSUInt
maxTouchPoints :: Maybe JSUInt
maxTouchPoints, Maybe [BrowsingContext]
contexts :: SetTouchOverride -> Maybe [BrowsingContext]
contexts :: Maybe [BrowsingContext]
contexts, Maybe [UserContext]
userContexts :: SetTouchOverride -> Maybe [UserContext]
userContexts :: Maybe [UserContext]
userContexts} =
    [Pair] -> Value
object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$
      [Key
"maxTouchPoints" Key -> Maybe JSUInt -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Maybe JSUInt
maxTouchPoints]
        [Pair] -> [Pair] -> [Pair]
forall a. Semigroup a => a -> a -> a
<> [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
          [ Key -> Maybe [BrowsingContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"contexts" Maybe [BrowsingContext]
contexts,
            Key -> Maybe [UserContext] -> Maybe Pair
forall (f :: * -> *) e b a.
(Functor f, KeyValue e b, ToJSON a) =>
Key -> f a -> f b
opt Key
"userContexts" Maybe [UserContext]
userContexts
          ]

data ScreenArea = MkScreenArea
  { ScreenArea -> JSUInt
width :: JSUInt,
    ScreenArea -> JSUInt
height :: JSUInt
  }
  deriving (Int -> ScreenArea -> ShowS
[ScreenArea] -> ShowS
ScreenArea -> String
(Int -> ScreenArea -> ShowS)
-> (ScreenArea -> String)
-> ([ScreenArea] -> ShowS)
-> Show ScreenArea
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScreenArea -> ShowS
showsPrec :: Int -> ScreenArea -> ShowS
$cshow :: ScreenArea -> String
show :: ScreenArea -> String
$cshowList :: [ScreenArea] -> ShowS
showList :: [ScreenArea] -> ShowS
Show, ScreenArea -> ScreenArea -> Bool
(ScreenArea -> ScreenArea -> Bool)
-> (ScreenArea -> ScreenArea -> Bool) -> Eq ScreenArea
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScreenArea -> ScreenArea -> Bool
== :: ScreenArea -> ScreenArea -> Bool
$c/= :: ScreenArea -> ScreenArea -> Bool
/= :: ScreenArea -> ScreenArea -> Bool
Eq, (forall x. ScreenArea -> Rep ScreenArea x)
-> (forall x. Rep ScreenArea x -> ScreenArea) -> Generic ScreenArea
forall x. Rep ScreenArea x -> ScreenArea
forall x. ScreenArea -> Rep ScreenArea x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ScreenArea -> Rep ScreenArea x
from :: forall x. ScreenArea -> Rep ScreenArea x
$cto :: forall x. Rep ScreenArea x -> ScreenArea
to :: forall x. Rep ScreenArea x -> ScreenArea
Generic)

instance ToJSON ScreenArea

data GeolocationCoordinates = MkGeolocationCoordinates
  { GeolocationCoordinates -> Float
latitude :: Float, -- -90.0 to 90.0
    GeolocationCoordinates -> Float
longitude :: Float, -- -180.0 to 180.0
    GeolocationCoordinates -> Maybe Float
accuracy :: Maybe Float, -- >= 0.0, defaults to 1.0
    GeolocationCoordinates -> Maybe Float
altitude :: Maybe Float,
    GeolocationCoordinates -> Maybe Float
altitudeAccuracy :: Maybe Float, -- >= 0.0
    GeolocationCoordinates -> Maybe Float
heading :: Maybe Float, -- 0.0 to 360.0
    GeolocationCoordinates -> Maybe Float
speed :: Maybe Float -- >= 0.0
  }
  deriving (Int -> GeolocationCoordinates -> ShowS
[GeolocationCoordinates] -> ShowS
GeolocationCoordinates -> String
(Int -> GeolocationCoordinates -> ShowS)
-> (GeolocationCoordinates -> String)
-> ([GeolocationCoordinates] -> ShowS)
-> Show GeolocationCoordinates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GeolocationCoordinates -> ShowS
showsPrec :: Int -> GeolocationCoordinates -> ShowS
$cshow :: GeolocationCoordinates -> String
show :: GeolocationCoordinates -> String
$cshowList :: [GeolocationCoordinates] -> ShowS
showList :: [GeolocationCoordinates] -> ShowS
Show, GeolocationCoordinates -> GeolocationCoordinates -> Bool
(GeolocationCoordinates -> GeolocationCoordinates -> Bool)
-> (GeolocationCoordinates -> GeolocationCoordinates -> Bool)
-> Eq GeolocationCoordinates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GeolocationCoordinates -> GeolocationCoordinates -> Bool
== :: GeolocationCoordinates -> GeolocationCoordinates -> Bool
$c/= :: GeolocationCoordinates -> GeolocationCoordinates -> Bool
/= :: GeolocationCoordinates -> GeolocationCoordinates -> Bool
Eq, (forall x. GeolocationCoordinates -> Rep GeolocationCoordinates x)
-> (forall x.
    Rep GeolocationCoordinates x -> GeolocationCoordinates)
-> Generic GeolocationCoordinates
forall x. Rep GeolocationCoordinates x -> GeolocationCoordinates
forall x. GeolocationCoordinates -> Rep GeolocationCoordinates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. GeolocationCoordinates -> Rep GeolocationCoordinates x
from :: forall x. GeolocationCoordinates -> Rep GeolocationCoordinates x
$cto :: forall x. Rep GeolocationCoordinates x -> GeolocationCoordinates
to :: forall x. Rep GeolocationCoordinates x -> GeolocationCoordinates
Generic)

instance ToJSON GeolocationCoordinates

newtype GeolocationPositionError = MkGeolocationPositionError
  { GeolocationPositionError -> Text
errorType :: Text -- "positionUnavailable"
  }
  deriving (Int -> GeolocationPositionError -> ShowS
[GeolocationPositionError] -> ShowS
GeolocationPositionError -> String
(Int -> GeolocationPositionError -> ShowS)
-> (GeolocationPositionError -> String)
-> ([GeolocationPositionError] -> ShowS)
-> Show GeolocationPositionError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GeolocationPositionError -> ShowS
showsPrec :: Int -> GeolocationPositionError -> ShowS
$cshow :: GeolocationPositionError -> String
show :: GeolocationPositionError -> String
$cshowList :: [GeolocationPositionError] -> ShowS
showList :: [GeolocationPositionError] -> ShowS
Show, GeolocationPositionError -> GeolocationPositionError -> Bool
(GeolocationPositionError -> GeolocationPositionError -> Bool)
-> (GeolocationPositionError -> GeolocationPositionError -> Bool)
-> Eq GeolocationPositionError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GeolocationPositionError -> GeolocationPositionError -> Bool
== :: GeolocationPositionError -> GeolocationPositionError -> Bool
$c/= :: GeolocationPositionError -> GeolocationPositionError -> Bool
/= :: GeolocationPositionError -> GeolocationPositionError -> Bool
Eq, (forall x.
 GeolocationPositionError -> Rep GeolocationPositionError x)
-> (forall x.
    Rep GeolocationPositionError x -> GeolocationPositionError)
-> Generic GeolocationPositionError
forall x.
Rep GeolocationPositionError x -> GeolocationPositionError
forall x.
GeolocationPositionError -> Rep GeolocationPositionError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
GeolocationPositionError -> Rep GeolocationPositionError x
from :: forall x.
GeolocationPositionError -> Rep GeolocationPositionError x
$cto :: forall x.
Rep GeolocationPositionError x -> GeolocationPositionError
to :: forall x.
Rep GeolocationPositionError x -> GeolocationPositionError
Generic)

instance ToJSON GeolocationPositionError where
  toJSON :: GeolocationPositionError -> Value
  toJSON :: GeolocationPositionError -> Value
toJSON MkGeolocationPositionError {Text
errorType :: GeolocationPositionError -> Text
errorType :: Text
errorType} =
    [Pair] -> Value
object [Key
"type" Key -> Text -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= Text
errorType]

data ScreenOrientationOverride = MkScreenOrientationOverride
  { ScreenOrientationOverride -> ScreenOrientationNatural
natural :: ScreenOrientationNatural,
    ScreenOrientationOverride -> ScreenOrientationType
screenOrientationType :: ScreenOrientationType
  }
  deriving (Int -> ScreenOrientationOverride -> ShowS
[ScreenOrientationOverride] -> ShowS
ScreenOrientationOverride -> String
(Int -> ScreenOrientationOverride -> ShowS)
-> (ScreenOrientationOverride -> String)
-> ([ScreenOrientationOverride] -> ShowS)
-> Show ScreenOrientationOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScreenOrientationOverride -> ShowS
showsPrec :: Int -> ScreenOrientationOverride -> ShowS
$cshow :: ScreenOrientationOverride -> String
show :: ScreenOrientationOverride -> String
$cshowList :: [ScreenOrientationOverride] -> ShowS
showList :: [ScreenOrientationOverride] -> ShowS
Show, ScreenOrientationOverride -> ScreenOrientationOverride -> Bool
(ScreenOrientationOverride -> ScreenOrientationOverride -> Bool)
-> (ScreenOrientationOverride -> ScreenOrientationOverride -> Bool)
-> Eq ScreenOrientationOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScreenOrientationOverride -> ScreenOrientationOverride -> Bool
== :: ScreenOrientationOverride -> ScreenOrientationOverride -> Bool
$c/= :: ScreenOrientationOverride -> ScreenOrientationOverride -> Bool
/= :: ScreenOrientationOverride -> ScreenOrientationOverride -> Bool
Eq, (forall x.
 ScreenOrientationOverride -> Rep ScreenOrientationOverride x)
-> (forall x.
    Rep ScreenOrientationOverride x -> ScreenOrientationOverride)
-> Generic ScreenOrientationOverride
forall x.
Rep ScreenOrientationOverride x -> ScreenOrientationOverride
forall x.
ScreenOrientationOverride -> Rep ScreenOrientationOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ScreenOrientationOverride -> Rep ScreenOrientationOverride x
from :: forall x.
ScreenOrientationOverride -> Rep ScreenOrientationOverride x
$cto :: forall x.
Rep ScreenOrientationOverride x -> ScreenOrientationOverride
to :: forall x.
Rep ScreenOrientationOverride x -> ScreenOrientationOverride
Generic)

instance ToJSON ScreenOrientationOverride where
  toJSON :: ScreenOrientationOverride -> Value
  toJSON :: ScreenOrientationOverride -> Value
toJSON MkScreenOrientationOverride {ScreenOrientationNatural
natural :: ScreenOrientationOverride -> ScreenOrientationNatural
natural :: ScreenOrientationNatural
natural, ScreenOrientationType
screenOrientationType :: ScreenOrientationOverride -> ScreenOrientationType
screenOrientationType :: ScreenOrientationType
screenOrientationType} =
    [Pair] -> Value
object
      [ Key
"natural" Key -> ScreenOrientationNatural -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ScreenOrientationNatural
natural,
        Key
"type" Key -> ScreenOrientationType -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= ScreenOrientationType
screenOrientationType
      ]

data ScreenOrientationNatural = PortraitNatural | LandscapeNatural
  deriving (Int -> ScreenOrientationNatural -> ShowS
[ScreenOrientationNatural] -> ShowS
ScreenOrientationNatural -> String
(Int -> ScreenOrientationNatural -> ShowS)
-> (ScreenOrientationNatural -> String)
-> ([ScreenOrientationNatural] -> ShowS)
-> Show ScreenOrientationNatural
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScreenOrientationNatural -> ShowS
showsPrec :: Int -> ScreenOrientationNatural -> ShowS
$cshow :: ScreenOrientationNatural -> String
show :: ScreenOrientationNatural -> String
$cshowList :: [ScreenOrientationNatural] -> ShowS
showList :: [ScreenOrientationNatural] -> ShowS
Show, ScreenOrientationNatural -> ScreenOrientationNatural -> Bool
(ScreenOrientationNatural -> ScreenOrientationNatural -> Bool)
-> (ScreenOrientationNatural -> ScreenOrientationNatural -> Bool)
-> Eq ScreenOrientationNatural
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScreenOrientationNatural -> ScreenOrientationNatural -> Bool
== :: ScreenOrientationNatural -> ScreenOrientationNatural -> Bool
$c/= :: ScreenOrientationNatural -> ScreenOrientationNatural -> Bool
/= :: ScreenOrientationNatural -> ScreenOrientationNatural -> Bool
Eq, (forall x.
 ScreenOrientationNatural -> Rep ScreenOrientationNatural x)
-> (forall x.
    Rep ScreenOrientationNatural x -> ScreenOrientationNatural)
-> Generic ScreenOrientationNatural
forall x.
Rep ScreenOrientationNatural x -> ScreenOrientationNatural
forall x.
ScreenOrientationNatural -> Rep ScreenOrientationNatural x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ScreenOrientationNatural -> Rep ScreenOrientationNatural x
from :: forall x.
ScreenOrientationNatural -> Rep ScreenOrientationNatural x
$cto :: forall x.
Rep ScreenOrientationNatural x -> ScreenOrientationNatural
to :: forall x.
Rep ScreenOrientationNatural x -> ScreenOrientationNatural
Generic)

instance ToJSON ScreenOrientationNatural where
  toJSON :: ScreenOrientationNatural -> Value
  toJSON :: ScreenOrientationNatural -> Value
toJSON = \case
    ScreenOrientationNatural
PortraitNatural -> Value
"portrait"
    ScreenOrientationNatural
LandscapeNatural -> Value
"landscape"

data ScreenOrientationType
  = PortraitPrimary
  | PortraitSecondary
  | LandscapePrimary
  | LandscapeSecondary
  deriving (Int -> ScreenOrientationType -> ShowS
[ScreenOrientationType] -> ShowS
ScreenOrientationType -> String
(Int -> ScreenOrientationType -> ShowS)
-> (ScreenOrientationType -> String)
-> ([ScreenOrientationType] -> ShowS)
-> Show ScreenOrientationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScreenOrientationType -> ShowS
showsPrec :: Int -> ScreenOrientationType -> ShowS
$cshow :: ScreenOrientationType -> String
show :: ScreenOrientationType -> String
$cshowList :: [ScreenOrientationType] -> ShowS
showList :: [ScreenOrientationType] -> ShowS
Show, ScreenOrientationType -> ScreenOrientationType -> Bool
(ScreenOrientationType -> ScreenOrientationType -> Bool)
-> (ScreenOrientationType -> ScreenOrientationType -> Bool)
-> Eq ScreenOrientationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScreenOrientationType -> ScreenOrientationType -> Bool
== :: ScreenOrientationType -> ScreenOrientationType -> Bool
$c/= :: ScreenOrientationType -> ScreenOrientationType -> Bool
/= :: ScreenOrientationType -> ScreenOrientationType -> Bool
Eq, (forall x. ScreenOrientationType -> Rep ScreenOrientationType x)
-> (forall x. Rep ScreenOrientationType x -> ScreenOrientationType)
-> Generic ScreenOrientationType
forall x. Rep ScreenOrientationType x -> ScreenOrientationType
forall x. ScreenOrientationType -> Rep ScreenOrientationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ScreenOrientationType -> Rep ScreenOrientationType x
from :: forall x. ScreenOrientationType -> Rep ScreenOrientationType x
$cto :: forall x. Rep ScreenOrientationType x -> ScreenOrientationType
to :: forall x. Rep ScreenOrientationType x -> ScreenOrientationType
Generic)

instance ToJSON ScreenOrientationType where
  toJSON :: ScreenOrientationType -> Value
  toJSON :: ScreenOrientationType -> Value
toJSON = \case
    ScreenOrientationType
PortraitPrimary -> Value
"portrait-primary"
    ScreenOrientationType
PortraitSecondary -> Value
"portrait-secondary"
    ScreenOrientationType
LandscapePrimary -> Value
"landscape-primary"
    ScreenOrientationType
LandscapeSecondary -> Value
"landscape-secondary"

data ForcedColorsModeTheme = ForcedColorsLight | ForcedColorsDark
  deriving (Int -> ForcedColorsModeTheme -> ShowS
[ForcedColorsModeTheme] -> ShowS
ForcedColorsModeTheme -> String
(Int -> ForcedColorsModeTheme -> ShowS)
-> (ForcedColorsModeTheme -> String)
-> ([ForcedColorsModeTheme] -> ShowS)
-> Show ForcedColorsModeTheme
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ForcedColorsModeTheme -> ShowS
showsPrec :: Int -> ForcedColorsModeTheme -> ShowS
$cshow :: ForcedColorsModeTheme -> String
show :: ForcedColorsModeTheme -> String
$cshowList :: [ForcedColorsModeTheme] -> ShowS
showList :: [ForcedColorsModeTheme] -> ShowS
Show, ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool
(ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool)
-> (ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool)
-> Eq ForcedColorsModeTheme
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool
== :: ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool
$c/= :: ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool
/= :: ForcedColorsModeTheme -> ForcedColorsModeTheme -> Bool
Eq, (forall x. ForcedColorsModeTheme -> Rep ForcedColorsModeTheme x)
-> (forall x. Rep ForcedColorsModeTheme x -> ForcedColorsModeTheme)
-> Generic ForcedColorsModeTheme
forall x. Rep ForcedColorsModeTheme x -> ForcedColorsModeTheme
forall x. ForcedColorsModeTheme -> Rep ForcedColorsModeTheme x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ForcedColorsModeTheme -> Rep ForcedColorsModeTheme x
from :: forall x. ForcedColorsModeTheme -> Rep ForcedColorsModeTheme x
$cto :: forall x. Rep ForcedColorsModeTheme x -> ForcedColorsModeTheme
to :: forall x. Rep ForcedColorsModeTheme x -> ForcedColorsModeTheme
Generic)

instance ToJSON ForcedColorsModeTheme where
  toJSON :: ForcedColorsModeTheme -> Value
  toJSON :: ForcedColorsModeTheme -> Value
toJSON = \case
    ForcedColorsModeTheme
ForcedColorsLight -> Value
"light"
    ForcedColorsModeTheme
ForcedColorsDark -> Value
"dark"

newtype NetworkConditions = MkNetworkConditions NetworkConditionsOffline
  deriving (Int -> NetworkConditions -> ShowS
[NetworkConditions] -> ShowS
NetworkConditions -> String
(Int -> NetworkConditions -> ShowS)
-> (NetworkConditions -> String)
-> ([NetworkConditions] -> ShowS)
-> Show NetworkConditions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NetworkConditions -> ShowS
showsPrec :: Int -> NetworkConditions -> ShowS
$cshow :: NetworkConditions -> String
show :: NetworkConditions -> String
$cshowList :: [NetworkConditions] -> ShowS
showList :: [NetworkConditions] -> ShowS
Show, NetworkConditions -> NetworkConditions -> Bool
(NetworkConditions -> NetworkConditions -> Bool)
-> (NetworkConditions -> NetworkConditions -> Bool)
-> Eq NetworkConditions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkConditions -> NetworkConditions -> Bool
== :: NetworkConditions -> NetworkConditions -> Bool
$c/= :: NetworkConditions -> NetworkConditions -> Bool
/= :: NetworkConditions -> NetworkConditions -> Bool
Eq, (forall x. NetworkConditions -> Rep NetworkConditions x)
-> (forall x. Rep NetworkConditions x -> NetworkConditions)
-> Generic NetworkConditions
forall x. Rep NetworkConditions x -> NetworkConditions
forall x. NetworkConditions -> Rep NetworkConditions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. NetworkConditions -> Rep NetworkConditions x
from :: forall x. NetworkConditions -> Rep NetworkConditions x
$cto :: forall x. Rep NetworkConditions x -> NetworkConditions
to :: forall x. Rep NetworkConditions x -> NetworkConditions
Generic)

instance ToJSON NetworkConditions where
  toJSON :: NetworkConditions -> Value
  toJSON :: NetworkConditions -> Value
toJSON (MkNetworkConditions NetworkConditionsOffline
offline) = NetworkConditionsOffline -> Value
forall a. ToJSON a => a -> Value
toJSON NetworkConditionsOffline
offline

newtype NetworkConditionsOffline = MkNetworkConditionsOffline
  { NetworkConditionsOffline -> Text
networkConditionsType :: Text -- "offline"
  }
  deriving (Int -> NetworkConditionsOffline -> ShowS
[NetworkConditionsOffline] -> ShowS
NetworkConditionsOffline -> String
(Int -> NetworkConditionsOffline -> ShowS)
-> (NetworkConditionsOffline -> String)
-> ([NetworkConditionsOffline] -> ShowS)
-> Show NetworkConditionsOffline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NetworkConditionsOffline -> ShowS
showsPrec :: Int -> NetworkConditionsOffline -> ShowS
$cshow :: NetworkConditionsOffline -> String
show :: NetworkConditionsOffline -> String
$cshowList :: [NetworkConditionsOffline] -> ShowS
showList :: [NetworkConditionsOffline] -> ShowS
Show, NetworkConditionsOffline -> NetworkConditionsOffline -> Bool
(NetworkConditionsOffline -> NetworkConditionsOffline -> Bool)
-> (NetworkConditionsOffline -> NetworkConditionsOffline -> Bool)
-> Eq NetworkConditionsOffline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkConditionsOffline -> NetworkConditionsOffline -> Bool
== :: NetworkConditionsOffline -> NetworkConditionsOffline -> Bool
$c/= :: NetworkConditionsOffline -> NetworkConditionsOffline -> Bool
/= :: NetworkConditionsOffline -> NetworkConditionsOffline -> Bool
Eq, (forall x.
 NetworkConditionsOffline -> Rep NetworkConditionsOffline x)
-> (forall x.
    Rep NetworkConditionsOffline x -> NetworkConditionsOffline)
-> Generic NetworkConditionsOffline
forall x.
Rep NetworkConditionsOffline x -> NetworkConditionsOffline
forall x.
NetworkConditionsOffline -> Rep NetworkConditionsOffline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
NetworkConditionsOffline -> Rep NetworkConditionsOffline x
from :: forall x.
NetworkConditionsOffline -> Rep NetworkConditionsOffline x
$cto :: forall x.
Rep NetworkConditionsOffline x -> NetworkConditionsOffline
to :: forall x.
Rep NetworkConditionsOffline x -> NetworkConditionsOffline
Generic)

instance ToJSON NetworkConditionsOffline where
  toJSON :: NetworkConditionsOffline -> Value
  toJSON :: NetworkConditionsOffline -> Value
toJSON NetworkConditionsOffline
_ = [Pair] -> Value
object [Key
"type" Key -> String -> Pair
forall v. ToJSON v => Key -> v -> Pair
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
.= String
"offline"]