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