{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Location.Types.CalculateRouteCarModeOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CalculateRouteCarModeOptions = CalculateRouteCarModeOptions'
{
CalculateRouteCarModeOptions -> Maybe Bool
avoidFerries :: Prelude.Maybe Prelude.Bool,
CalculateRouteCarModeOptions -> Maybe Bool
avoidTolls :: Prelude.Maybe Prelude.Bool
}
deriving (CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool
$c/= :: CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool
== :: CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool
$c== :: CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool
Prelude.Eq, ReadPrec [CalculateRouteCarModeOptions]
ReadPrec CalculateRouteCarModeOptions
Int -> ReadS CalculateRouteCarModeOptions
ReadS [CalculateRouteCarModeOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CalculateRouteCarModeOptions]
$creadListPrec :: ReadPrec [CalculateRouteCarModeOptions]
readPrec :: ReadPrec CalculateRouteCarModeOptions
$creadPrec :: ReadPrec CalculateRouteCarModeOptions
readList :: ReadS [CalculateRouteCarModeOptions]
$creadList :: ReadS [CalculateRouteCarModeOptions]
readsPrec :: Int -> ReadS CalculateRouteCarModeOptions
$creadsPrec :: Int -> ReadS CalculateRouteCarModeOptions
Prelude.Read, Int -> CalculateRouteCarModeOptions -> ShowS
[CalculateRouteCarModeOptions] -> ShowS
CalculateRouteCarModeOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CalculateRouteCarModeOptions] -> ShowS
$cshowList :: [CalculateRouteCarModeOptions] -> ShowS
show :: CalculateRouteCarModeOptions -> String
$cshow :: CalculateRouteCarModeOptions -> String
showsPrec :: Int -> CalculateRouteCarModeOptions -> ShowS
$cshowsPrec :: Int -> CalculateRouteCarModeOptions -> ShowS
Prelude.Show, forall x.
Rep CalculateRouteCarModeOptions x -> CalculateRouteCarModeOptions
forall x.
CalculateRouteCarModeOptions -> Rep CalculateRouteCarModeOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CalculateRouteCarModeOptions x -> CalculateRouteCarModeOptions
$cfrom :: forall x.
CalculateRouteCarModeOptions -> Rep CalculateRouteCarModeOptions x
Prelude.Generic)
newCalculateRouteCarModeOptions ::
CalculateRouteCarModeOptions
newCalculateRouteCarModeOptions :: CalculateRouteCarModeOptions
newCalculateRouteCarModeOptions =
CalculateRouteCarModeOptions'
{ $sel:avoidFerries:CalculateRouteCarModeOptions' :: Maybe Bool
avoidFerries =
forall a. Maybe a
Prelude.Nothing,
$sel:avoidTolls:CalculateRouteCarModeOptions' :: Maybe Bool
avoidTolls = forall a. Maybe a
Prelude.Nothing
}
calculateRouteCarModeOptions_avoidFerries :: Lens.Lens' CalculateRouteCarModeOptions (Prelude.Maybe Prelude.Bool)
calculateRouteCarModeOptions_avoidFerries :: Lens' CalculateRouteCarModeOptions (Maybe Bool)
calculateRouteCarModeOptions_avoidFerries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CalculateRouteCarModeOptions' {Maybe Bool
avoidFerries :: Maybe Bool
$sel:avoidFerries:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
avoidFerries} -> Maybe Bool
avoidFerries) (\s :: CalculateRouteCarModeOptions
s@CalculateRouteCarModeOptions' {} Maybe Bool
a -> CalculateRouteCarModeOptions
s {$sel:avoidFerries:CalculateRouteCarModeOptions' :: Maybe Bool
avoidFerries = Maybe Bool
a} :: CalculateRouteCarModeOptions)
calculateRouteCarModeOptions_avoidTolls :: Lens.Lens' CalculateRouteCarModeOptions (Prelude.Maybe Prelude.Bool)
calculateRouteCarModeOptions_avoidTolls :: Lens' CalculateRouteCarModeOptions (Maybe Bool)
calculateRouteCarModeOptions_avoidTolls = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CalculateRouteCarModeOptions' {Maybe Bool
avoidTolls :: Maybe Bool
$sel:avoidTolls:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
avoidTolls} -> Maybe Bool
avoidTolls) (\s :: CalculateRouteCarModeOptions
s@CalculateRouteCarModeOptions' {} Maybe Bool
a -> CalculateRouteCarModeOptions
s {$sel:avoidTolls:CalculateRouteCarModeOptions' :: Maybe Bool
avoidTolls = Maybe Bool
a} :: CalculateRouteCarModeOptions)
instance
Prelude.Hashable
CalculateRouteCarModeOptions
where
hashWithSalt :: Int -> CalculateRouteCarModeOptions -> Int
hashWithSalt Int
_salt CalculateRouteCarModeOptions' {Maybe Bool
avoidTolls :: Maybe Bool
avoidFerries :: Maybe Bool
$sel:avoidTolls:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
$sel:avoidFerries:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
avoidFerries
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
avoidTolls
instance Prelude.NFData CalculateRouteCarModeOptions where
rnf :: CalculateRouteCarModeOptions -> ()
rnf CalculateRouteCarModeOptions' {Maybe Bool
avoidTolls :: Maybe Bool
avoidFerries :: Maybe Bool
$sel:avoidTolls:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
$sel:avoidFerries:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
avoidFerries
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
avoidTolls
instance Data.ToJSON CalculateRouteCarModeOptions where
toJSON :: CalculateRouteCarModeOptions -> Value
toJSON CalculateRouteCarModeOptions' {Maybe Bool
avoidTolls :: Maybe Bool
avoidFerries :: Maybe Bool
$sel:avoidTolls:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
$sel:avoidFerries:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AvoidFerries" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
avoidFerries,
(Key
"AvoidTolls" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
avoidTolls
]
)