{-# 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.CustomerProfiles.Types.MatchingRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MatchingRequest = MatchingRequest'
{
MatchingRequest -> Bool
enabled :: Prelude.Bool
}
deriving (MatchingRequest -> MatchingRequest -> Bool
(MatchingRequest -> MatchingRequest -> Bool)
-> (MatchingRequest -> MatchingRequest -> Bool)
-> Eq MatchingRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MatchingRequest -> MatchingRequest -> Bool
$c/= :: MatchingRequest -> MatchingRequest -> Bool
== :: MatchingRequest -> MatchingRequest -> Bool
$c== :: MatchingRequest -> MatchingRequest -> Bool
Prelude.Eq, ReadPrec [MatchingRequest]
ReadPrec MatchingRequest
Int -> ReadS MatchingRequest
ReadS [MatchingRequest]
(Int -> ReadS MatchingRequest)
-> ReadS [MatchingRequest]
-> ReadPrec MatchingRequest
-> ReadPrec [MatchingRequest]
-> Read MatchingRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MatchingRequest]
$creadListPrec :: ReadPrec [MatchingRequest]
readPrec :: ReadPrec MatchingRequest
$creadPrec :: ReadPrec MatchingRequest
readList :: ReadS [MatchingRequest]
$creadList :: ReadS [MatchingRequest]
readsPrec :: Int -> ReadS MatchingRequest
$creadsPrec :: Int -> ReadS MatchingRequest
Prelude.Read, Int -> MatchingRequest -> ShowS
[MatchingRequest] -> ShowS
MatchingRequest -> String
(Int -> MatchingRequest -> ShowS)
-> (MatchingRequest -> String)
-> ([MatchingRequest] -> ShowS)
-> Show MatchingRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MatchingRequest] -> ShowS
$cshowList :: [MatchingRequest] -> ShowS
show :: MatchingRequest -> String
$cshow :: MatchingRequest -> String
showsPrec :: Int -> MatchingRequest -> ShowS
$cshowsPrec :: Int -> MatchingRequest -> ShowS
Prelude.Show, (forall x. MatchingRequest -> Rep MatchingRequest x)
-> (forall x. Rep MatchingRequest x -> MatchingRequest)
-> Generic MatchingRequest
forall x. Rep MatchingRequest x -> MatchingRequest
forall x. MatchingRequest -> Rep MatchingRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MatchingRequest x -> MatchingRequest
$cfrom :: forall x. MatchingRequest -> Rep MatchingRequest x
Prelude.Generic)
newMatchingRequest ::
Prelude.Bool ->
MatchingRequest
newMatchingRequest :: Bool -> MatchingRequest
newMatchingRequest Bool
pEnabled_ =
MatchingRequest' :: Bool -> MatchingRequest
MatchingRequest' {$sel:enabled:MatchingRequest' :: Bool
enabled = Bool
pEnabled_}
matchingRequest_enabled :: Lens.Lens' MatchingRequest Prelude.Bool
matchingRequest_enabled :: (Bool -> f Bool) -> MatchingRequest -> f MatchingRequest
matchingRequest_enabled = (MatchingRequest -> Bool)
-> (MatchingRequest -> Bool -> MatchingRequest)
-> Lens MatchingRequest MatchingRequest Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchingRequest' {Bool
enabled :: Bool
$sel:enabled:MatchingRequest' :: MatchingRequest -> Bool
enabled} -> Bool
enabled) (\s :: MatchingRequest
s@MatchingRequest' {} Bool
a -> MatchingRequest
s {$sel:enabled:MatchingRequest' :: Bool
enabled = Bool
a} :: MatchingRequest)
instance Prelude.Hashable MatchingRequest
instance Prelude.NFData MatchingRequest
instance Core.ToJSON MatchingRequest where
toJSON :: MatchingRequest -> Value
toJSON MatchingRequest' {Bool
enabled :: Bool
$sel:enabled:MatchingRequest' :: MatchingRequest -> Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
enabled)]
)