{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CalculateRouteCarModeOptions = CalculateRouteCarModeOptions'
{
CalculateRouteCarModeOptions -> Maybe Bool
avoidTolls :: Prelude.Maybe Prelude.Bool,
CalculateRouteCarModeOptions -> Maybe Bool
avoidFerries :: Prelude.Maybe Prelude.Bool
}
deriving (CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool
(CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool)
-> (CalculateRouteCarModeOptions
-> CalculateRouteCarModeOptions -> Bool)
-> Eq CalculateRouteCarModeOptions
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]
(Int -> ReadS CalculateRouteCarModeOptions)
-> ReadS [CalculateRouteCarModeOptions]
-> ReadPrec CalculateRouteCarModeOptions
-> ReadPrec [CalculateRouteCarModeOptions]
-> Read 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
(Int -> CalculateRouteCarModeOptions -> ShowS)
-> (CalculateRouteCarModeOptions -> String)
-> ([CalculateRouteCarModeOptions] -> ShowS)
-> Show CalculateRouteCarModeOptions
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.
CalculateRouteCarModeOptions -> Rep CalculateRouteCarModeOptions x)
-> (forall x.
Rep CalculateRouteCarModeOptions x -> CalculateRouteCarModeOptions)
-> Generic CalculateRouteCarModeOptions
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' :: Maybe Bool -> Maybe Bool -> CalculateRouteCarModeOptions
CalculateRouteCarModeOptions'
{ $sel:avoidTolls:CalculateRouteCarModeOptions' :: Maybe Bool
avoidTolls =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:avoidFerries:CalculateRouteCarModeOptions' :: Maybe Bool
avoidFerries = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
calculateRouteCarModeOptions_avoidTolls :: Lens.Lens' CalculateRouteCarModeOptions (Prelude.Maybe Prelude.Bool)
calculateRouteCarModeOptions_avoidTolls :: (Maybe Bool -> f (Maybe Bool))
-> CalculateRouteCarModeOptions -> f CalculateRouteCarModeOptions
calculateRouteCarModeOptions_avoidTolls = (CalculateRouteCarModeOptions -> Maybe Bool)
-> (CalculateRouteCarModeOptions
-> Maybe Bool -> CalculateRouteCarModeOptions)
-> Lens
CalculateRouteCarModeOptions
CalculateRouteCarModeOptions
(Maybe Bool)
(Maybe Bool)
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)
calculateRouteCarModeOptions_avoidFerries :: Lens.Lens' CalculateRouteCarModeOptions (Prelude.Maybe Prelude.Bool)
calculateRouteCarModeOptions_avoidFerries :: (Maybe Bool -> f (Maybe Bool))
-> CalculateRouteCarModeOptions -> f CalculateRouteCarModeOptions
calculateRouteCarModeOptions_avoidFerries = (CalculateRouteCarModeOptions -> Maybe Bool)
-> (CalculateRouteCarModeOptions
-> Maybe Bool -> CalculateRouteCarModeOptions)
-> Lens
CalculateRouteCarModeOptions
CalculateRouteCarModeOptions
(Maybe Bool)
(Maybe Bool)
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)
instance
Prelude.Hashable
CalculateRouteCarModeOptions
instance Prelude.NFData CalculateRouteCarModeOptions
instance Core.ToJSON CalculateRouteCarModeOptions where
toJSON :: CalculateRouteCarModeOptions -> Value
toJSON CalculateRouteCarModeOptions' {Maybe Bool
avoidFerries :: Maybe Bool
avoidTolls :: Maybe Bool
$sel:avoidFerries:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
$sel:avoidTolls:CalculateRouteCarModeOptions' :: CalculateRouteCarModeOptions -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AvoidTolls" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
avoidTolls,
(Text
"AvoidFerries" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
avoidFerries
]
)