{-# 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.MatchingResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MatchingResponse = MatchingResponse'
{
MatchingResponse -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool
}
deriving (MatchingResponse -> MatchingResponse -> Bool
(MatchingResponse -> MatchingResponse -> Bool)
-> (MatchingResponse -> MatchingResponse -> Bool)
-> Eq MatchingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MatchingResponse -> MatchingResponse -> Bool
$c/= :: MatchingResponse -> MatchingResponse -> Bool
== :: MatchingResponse -> MatchingResponse -> Bool
$c== :: MatchingResponse -> MatchingResponse -> Bool
Prelude.Eq, ReadPrec [MatchingResponse]
ReadPrec MatchingResponse
Int -> ReadS MatchingResponse
ReadS [MatchingResponse]
(Int -> ReadS MatchingResponse)
-> ReadS [MatchingResponse]
-> ReadPrec MatchingResponse
-> ReadPrec [MatchingResponse]
-> Read MatchingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MatchingResponse]
$creadListPrec :: ReadPrec [MatchingResponse]
readPrec :: ReadPrec MatchingResponse
$creadPrec :: ReadPrec MatchingResponse
readList :: ReadS [MatchingResponse]
$creadList :: ReadS [MatchingResponse]
readsPrec :: Int -> ReadS MatchingResponse
$creadsPrec :: Int -> ReadS MatchingResponse
Prelude.Read, Int -> MatchingResponse -> ShowS
[MatchingResponse] -> ShowS
MatchingResponse -> String
(Int -> MatchingResponse -> ShowS)
-> (MatchingResponse -> String)
-> ([MatchingResponse] -> ShowS)
-> Show MatchingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MatchingResponse] -> ShowS
$cshowList :: [MatchingResponse] -> ShowS
show :: MatchingResponse -> String
$cshow :: MatchingResponse -> String
showsPrec :: Int -> MatchingResponse -> ShowS
$cshowsPrec :: Int -> MatchingResponse -> ShowS
Prelude.Show, (forall x. MatchingResponse -> Rep MatchingResponse x)
-> (forall x. Rep MatchingResponse x -> MatchingResponse)
-> Generic MatchingResponse
forall x. Rep MatchingResponse x -> MatchingResponse
forall x. MatchingResponse -> Rep MatchingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MatchingResponse x -> MatchingResponse
$cfrom :: forall x. MatchingResponse -> Rep MatchingResponse x
Prelude.Generic)
newMatchingResponse ::
MatchingResponse
newMatchingResponse :: MatchingResponse
newMatchingResponse =
MatchingResponse' :: Maybe Bool -> MatchingResponse
MatchingResponse' {$sel:enabled:MatchingResponse' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing}
matchingResponse_enabled :: Lens.Lens' MatchingResponse (Prelude.Maybe Prelude.Bool)
matchingResponse_enabled :: (Maybe Bool -> f (Maybe Bool))
-> MatchingResponse -> f MatchingResponse
matchingResponse_enabled = (MatchingResponse -> Maybe Bool)
-> (MatchingResponse -> Maybe Bool -> MatchingResponse)
-> Lens MatchingResponse MatchingResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MatchingResponse' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:MatchingResponse' :: MatchingResponse -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: MatchingResponse
s@MatchingResponse' {} Maybe Bool
a -> MatchingResponse
s {$sel:enabled:MatchingResponse' :: Maybe Bool
enabled = Maybe Bool
a} :: MatchingResponse)
instance Core.FromJSON MatchingResponse where
parseJSON :: Value -> Parser MatchingResponse
parseJSON =
String
-> (Object -> Parser MatchingResponse)
-> Value
-> Parser MatchingResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MatchingResponse"
( \Object
x ->
Maybe Bool -> MatchingResponse
MatchingResponse' (Maybe Bool -> MatchingResponse)
-> Parser (Maybe Bool) -> Parser MatchingResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Enabled")
)
instance Prelude.Hashable MatchingResponse
instance Prelude.NFData MatchingResponse